Latest update.
This commit is contained in:
@@ -9,7 +9,7 @@ for masochists" document *and* a rather extensive commit log message. (I'd get
|
||||
lynched for sticking all this in CHANGES or the commit mails :-).
|
||||
|
||||
ENGINE_TABLE underlies this restructuring, as described in the internal header
|
||||
"eng_int.h", implemented in eng_table.c, and used in each of the "class" files;
|
||||
"eng_local.h", implemented in eng_table.c, and used in each of the "class" files;
|
||||
tb_rsa.c, tb_dsa.c, etc.
|
||||
|
||||
However, "EVP_CIPHER" underlies the motivation and design of ENGINE_TABLE so
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "internal/cryptlib.h"
|
||||
#include "eng_int.h"
|
||||
#include "eng_local.h"
|
||||
|
||||
void ENGINE_load_builtin_engines(void)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include "eng_int.h"
|
||||
#include "eng_local.h"
|
||||
#include <openssl/conf.h>
|
||||
#include <openssl/trace.h>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include "eng_int.h"
|
||||
#include "eng_local.h"
|
||||
|
||||
/*
|
||||
* When querying a ENGINE-specific control command's 'description', this
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include "eng_int.h"
|
||||
#include "eng_local.h"
|
||||
#include "internal/dso.h"
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
@@ -343,7 +343,7 @@ static int dynamic_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void))
|
||||
return 1;
|
||||
case DYNAMIC_CMD_DIR_ADD:
|
||||
/* a NULL 'p' or a string of zero-length is the same thing */
|
||||
if (!p || (strlen((const char *)p) < 1)) {
|
||||
if (p == NULL || (strlen((const char *)p) < 1)) {
|
||||
ENGINEerr(ENGINE_F_DYNAMIC_CTRL, ENGINE_R_INVALID_ARGUMENT);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include "eng_int.h"
|
||||
#include "eng_local.h"
|
||||
#include <openssl/conf.h>
|
||||
|
||||
int ENGINE_set_default(ENGINE *e, unsigned int flags)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "e_os.h"
|
||||
#include "eng_int.h"
|
||||
#include "eng_local.h"
|
||||
|
||||
/*
|
||||
* Initialise a engine type for use (or up its functional reference count if
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "e_os.h"
|
||||
#include "eng_int.h"
|
||||
#include "eng_local.h"
|
||||
#include <openssl/rand.h>
|
||||
#include "internal/refcount.h"
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include "eng_int.h"
|
||||
#include "eng_local.h"
|
||||
|
||||
/*
|
||||
* The linked-list of pointers to engine types. engine_list_head incorporates
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef HEADER_ENGINE_INT_H
|
||||
# define HEADER_ENGINE_INT_H
|
||||
#ifndef OSSL_CRYPTO_ENGINE_ENG_LOCAL_H
|
||||
# define OSSL_CRYPTO_ENGINE_ENG_LOCAL_H
|
||||
|
||||
# include <openssl/trace.h>
|
||||
# include "internal/cryptlib.h"
|
||||
# include "internal/engine.h"
|
||||
# include "crypto/engine.h"
|
||||
# include "internal/thread_once.h"
|
||||
# include "internal/refcount.h"
|
||||
|
||||
@@ -151,4 +151,4 @@ typedef struct st_engine_pile ENGINE_PILE;
|
||||
|
||||
DEFINE_LHASH_OF(ENGINE_PILE);
|
||||
|
||||
#endif /* HEADER_ENGINE_INT_H */
|
||||
#endif /* OSSL_CRYPTO_ENGINE_ENG_LOCAL_H */
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <stdio.h>
|
||||
#include <openssl/crypto.h>
|
||||
#include "internal/cryptlib.h"
|
||||
#include "internal/engine.h"
|
||||
#include "crypto/engine.h"
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/rand.h>
|
||||
@@ -625,7 +625,8 @@ static int ossl_pkey_meths(ENGINE *e, EVP_PKEY_METHOD **pmeth,
|
||||
EVP_PKEY_HMAC,
|
||||
0
|
||||
};
|
||||
if (!pmeth) {
|
||||
|
||||
if (pmeth == NULL) {
|
||||
*nids = ossl_pkey_nids;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include "eng_int.h"
|
||||
#include "eng_local.h"
|
||||
|
||||
/* Basic get/set stuff */
|
||||
|
||||
@@ -73,7 +73,7 @@ EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
|
||||
return 0;
|
||||
}
|
||||
pkey = e->load_privkey(e, key_id, ui_method, callback_data);
|
||||
if (!pkey) {
|
||||
if (pkey == NULL) {
|
||||
ENGINEerr(ENGINE_F_ENGINE_LOAD_PRIVATE_KEY,
|
||||
ENGINE_R_FAILED_LOADING_PRIVATE_KEY);
|
||||
return 0;
|
||||
@@ -103,7 +103,7 @@ EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id,
|
||||
return 0;
|
||||
}
|
||||
pkey = e->load_pubkey(e, key_id, ui_method, callback_data);
|
||||
if (!pkey) {
|
||||
if (pkey == NULL) {
|
||||
ENGINEerr(ENGINE_F_ENGINE_LOAD_PUBLIC_KEY,
|
||||
ENGINE_R_FAILED_LOADING_PUBLIC_KEY);
|
||||
return 0;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "internal/engine.h"
|
||||
#include "crypto/engine.h"
|
||||
#include "internal/cryptlib.h"
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/err.h>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/lhash.h>
|
||||
#include <openssl/trace.h>
|
||||
#include "eng_int.h"
|
||||
#include "eng_local.h"
|
||||
|
||||
/* The type of the items in the table */
|
||||
struct st_engine_pile {
|
||||
@@ -27,7 +27,7 @@ struct st_engine_pile {
|
||||
int uptodate;
|
||||
};
|
||||
|
||||
/* The type exposed in eng_int.h */
|
||||
/* The type exposed in eng_local.h */
|
||||
struct st_engine_table {
|
||||
LHASH_OF(ENGINE_PILE) piles;
|
||||
}; /* ENGINE_TABLE */
|
||||
@@ -77,7 +77,7 @@ static int int_table_check(ENGINE_TABLE **t, int create)
|
||||
}
|
||||
|
||||
/*
|
||||
* Privately exposed (via eng_int.h) functions for adding and/or removing
|
||||
* Privately exposed (via eng_local.h) functions for adding and/or removing
|
||||
* ENGINEs from the implementation table
|
||||
*/
|
||||
int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup,
|
||||
@@ -170,7 +170,7 @@ void engine_table_unregister(ENGINE_TABLE **table, ENGINE *e)
|
||||
|
||||
static void int_cleanup_cb_doall(ENGINE_PILE *p)
|
||||
{
|
||||
if (!p)
|
||||
if (p == NULL)
|
||||
return;
|
||||
sk_ENGINE_free(p->sk);
|
||||
if (p->funct)
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
*/
|
||||
|
||||
#include "e_os.h"
|
||||
#include "eng_int.h"
|
||||
#include "eng_local.h"
|
||||
#include <openssl/evp.h>
|
||||
#include "internal/asn1_int.h"
|
||||
#include "crypto/asn1.h"
|
||||
|
||||
/*
|
||||
* If this symbol is defined then ENGINE_get_pkey_asn1_meth_engine(), the
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include "eng_int.h"
|
||||
#include "eng_local.h"
|
||||
|
||||
static ENGINE_TABLE *cipher_table = NULL;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include "eng_int.h"
|
||||
#include "eng_local.h"
|
||||
|
||||
static ENGINE_TABLE *dh_table = NULL;
|
||||
static const int dummy_nid = 1;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include "eng_int.h"
|
||||
#include "eng_local.h"
|
||||
|
||||
static ENGINE_TABLE *digest_table = NULL;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include "eng_int.h"
|
||||
#include "eng_local.h"
|
||||
|
||||
static ENGINE_TABLE *dsa_table = NULL;
|
||||
static const int dummy_nid = 1;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include "eng_int.h"
|
||||
#include "eng_local.h"
|
||||
|
||||
static ENGINE_TABLE *dh_table = NULL;
|
||||
static const int dummy_nid = 1;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include "eng_int.h"
|
||||
#include "eng_local.h"
|
||||
#include <openssl/evp.h>
|
||||
|
||||
static ENGINE_TABLE *pkey_meth_table = NULL;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include "eng_int.h"
|
||||
#include "eng_local.h"
|
||||
|
||||
static ENGINE_TABLE *rand_table = NULL;
|
||||
static const int dummy_nid = 1;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include "eng_int.h"
|
||||
#include "eng_local.h"
|
||||
|
||||
static ENGINE_TABLE *rsa_table = NULL;
|
||||
static const int dummy_nid = 1;
|
||||
|
||||
Reference in New Issue
Block a user