diff options
Diffstat (limited to 'src/lib/libcrypto/engine')
-rw-r--r-- | src/lib/libcrypto/engine/eng_all.c | 15 | ||||
-rw-r--r-- | src/lib/libcrypto/engine/eng_err.c | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/engine/eng_fat.c | 8 | ||||
-rw-r--r-- | src/lib/libcrypto/engine/eng_init.c | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/engine/eng_list.c | 33 | ||||
-rw-r--r-- | src/lib/libcrypto/engine/eng_openssl.c | 18 | ||||
-rw-r--r-- | src/lib/libcrypto/engine/engine.h | 10 | ||||
-rw-r--r-- | src/lib/libcrypto/engine/tb_cipher.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/engine/tb_dh.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/engine/tb_digest.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/engine/tb_dsa.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/engine/tb_rand.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/engine/tb_rsa.c | 4 |
13 files changed, 79 insertions, 34 deletions
diff --git a/src/lib/libcrypto/engine/eng_all.c b/src/lib/libcrypto/engine/eng_all.c index b3030fe505..0f6992a40d 100644 --- a/src/lib/libcrypto/engine/eng_all.c +++ b/src/lib/libcrypto/engine/eng_all.c | |||
@@ -95,8 +95,19 @@ void ENGINE_load_builtin_engines(void) | |||
95 | #ifndef OPENSSL_NO_HW_4758_CCA | 95 | #ifndef OPENSSL_NO_HW_4758_CCA |
96 | ENGINE_load_4758cca(); | 96 | ENGINE_load_4758cca(); |
97 | #endif | 97 | #endif |
98 | #ifdef OPENSSL_OPENBSD_DEV_CRYPTO | 98 | #if defined(__OpenBSD__) || defined(__FreeBSD__) |
99 | ENGINE_load_openbsd_dev_crypto(); | 99 | ENGINE_load_cryptodev(); |
100 | #endif | 100 | #endif |
101 | #endif | 101 | #endif |
102 | } | 102 | } |
103 | |||
104 | #if defined(__OpenBSD__) || defined(__FreeBSD__) | ||
105 | void ENGINE_setup_bsd_cryptodev(void) { | ||
106 | static int bsd_cryptodev_default_loaded = 0; | ||
107 | if (!bsd_cryptodev_default_loaded) { | ||
108 | ENGINE_load_cryptodev(); | ||
109 | ENGINE_register_all_complete(); | ||
110 | } | ||
111 | bsd_cryptodev_default_loaded=1; | ||
112 | } | ||
113 | #endif | ||
diff --git a/src/lib/libcrypto/engine/eng_err.c b/src/lib/libcrypto/engine/eng_err.c index f6c5630395..814d95ee32 100644 --- a/src/lib/libcrypto/engine/eng_err.c +++ b/src/lib/libcrypto/engine/eng_err.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* crypto/engine/eng_err.c */ | 1 | /* crypto/engine/eng_err.c */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions | 6 | * modification, are permitted provided that the following conditions |
@@ -96,6 +96,7 @@ static ERR_STRING_DATA ENGINE_str_functs[]= | |||
96 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_NAME,0), "ENGINE_set_name"}, | 96 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_NAME,0), "ENGINE_set_name"}, |
97 | {ERR_PACK(0,ENGINE_F_ENGINE_TABLE_REGISTER,0), "ENGINE_TABLE_REGISTER"}, | 97 | {ERR_PACK(0,ENGINE_F_ENGINE_TABLE_REGISTER,0), "ENGINE_TABLE_REGISTER"}, |
98 | {ERR_PACK(0,ENGINE_F_ENGINE_UNLOAD_KEY,0), "ENGINE_UNLOAD_KEY"}, | 98 | {ERR_PACK(0,ENGINE_F_ENGINE_UNLOAD_KEY,0), "ENGINE_UNLOAD_KEY"}, |
99 | {ERR_PACK(0,ENGINE_F_ENGINE_UP_REF,0), "ENGINE_up_ref"}, | ||
99 | {ERR_PACK(0,ENGINE_F_INT_CTRL_HELPER,0), "INT_CTRL_HELPER"}, | 100 | {ERR_PACK(0,ENGINE_F_INT_CTRL_HELPER,0), "INT_CTRL_HELPER"}, |
100 | {ERR_PACK(0,ENGINE_F_INT_ENGINE_CONFIGURE,0), "INT_ENGINE_CONFIGURE"}, | 101 | {ERR_PACK(0,ENGINE_F_INT_ENGINE_CONFIGURE,0), "INT_ENGINE_CONFIGURE"}, |
101 | {ERR_PACK(0,ENGINE_F_LOG_MESSAGE,0), "LOG_MESSAGE"}, | 102 | {ERR_PACK(0,ENGINE_F_LOG_MESSAGE,0), "LOG_MESSAGE"}, |
diff --git a/src/lib/libcrypto/engine/eng_fat.c b/src/lib/libcrypto/engine/eng_fat.c index f7edb5ad32..0d7dae00b2 100644 --- a/src/lib/libcrypto/engine/eng_fat.c +++ b/src/lib/libcrypto/engine/eng_fat.c | |||
@@ -66,18 +66,18 @@ int ENGINE_set_default(ENGINE *e, unsigned int flags) | |||
66 | if((flags & ENGINE_METHOD_DIGESTS) && !ENGINE_set_default_digests(e)) | 66 | if((flags & ENGINE_METHOD_DIGESTS) && !ENGINE_set_default_digests(e)) |
67 | return 0; | 67 | return 0; |
68 | #ifndef OPENSSL_NO_RSA | 68 | #ifndef OPENSSL_NO_RSA |
69 | if((flags & ENGINE_METHOD_RSA) & !ENGINE_set_default_RSA(e)) | 69 | if((flags & ENGINE_METHOD_RSA) && !ENGINE_set_default_RSA(e)) |
70 | return 0; | 70 | return 0; |
71 | #endif | 71 | #endif |
72 | #ifndef OPENSSL_NO_DSA | 72 | #ifndef OPENSSL_NO_DSA |
73 | if((flags & ENGINE_METHOD_DSA) & !ENGINE_set_default_DSA(e)) | 73 | if((flags & ENGINE_METHOD_DSA) && !ENGINE_set_default_DSA(e)) |
74 | return 0; | 74 | return 0; |
75 | #endif | 75 | #endif |
76 | #ifndef OPENSSL_NO_DH | 76 | #ifndef OPENSSL_NO_DH |
77 | if((flags & ENGINE_METHOD_DH) & !ENGINE_set_default_DH(e)) | 77 | if((flags & ENGINE_METHOD_DH) && !ENGINE_set_default_DH(e)) |
78 | return 0; | 78 | return 0; |
79 | #endif | 79 | #endif |
80 | if((flags & ENGINE_METHOD_RAND) & !ENGINE_set_default_RAND(e)) | 80 | if((flags & ENGINE_METHOD_RAND) && !ENGINE_set_default_RAND(e)) |
81 | return 0; | 81 | return 0; |
82 | return 1; | 82 | return 1; |
83 | } | 83 | } |
diff --git a/src/lib/libcrypto/engine/eng_init.c b/src/lib/libcrypto/engine/eng_init.c index 98caa21e32..170c1791b3 100644 --- a/src/lib/libcrypto/engine/eng_init.c +++ b/src/lib/libcrypto/engine/eng_init.c | |||
@@ -93,7 +93,7 @@ int engine_unlocked_finish(ENGINE *e, int unlock_for_handlers) | |||
93 | * there's a chance that both threads will together take the count from | 93 | * there's a chance that both threads will together take the count from |
94 | * 2 to 0 without either calling finish(). */ | 94 | * 2 to 0 without either calling finish(). */ |
95 | e->funct_ref--; | 95 | e->funct_ref--; |
96 | engine_ref_debug(e, 1, -1) | 96 | engine_ref_debug(e, 1, -1); |
97 | if((e->funct_ref == 0) && e->finish) | 97 | if((e->funct_ref == 0) && e->finish) |
98 | { | 98 | { |
99 | if(unlock_for_handlers) | 99 | if(unlock_for_handlers) |
diff --git a/src/lib/libcrypto/engine/eng_list.c b/src/lib/libcrypto/engine/eng_list.c index 0c220558e7..1cc3217f4c 100644 --- a/src/lib/libcrypto/engine/eng_list.c +++ b/src/lib/libcrypto/engine/eng_list.c | |||
@@ -191,14 +191,14 @@ ENGINE *ENGINE_get_first(void) | |||
191 | { | 191 | { |
192 | ENGINE *ret; | 192 | ENGINE *ret; |
193 | 193 | ||
194 | CRYPTO_r_lock(CRYPTO_LOCK_ENGINE); | 194 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); |
195 | ret = engine_list_head; | 195 | ret = engine_list_head; |
196 | if(ret) | 196 | if(ret) |
197 | { | 197 | { |
198 | ret->struct_ref++; | 198 | ret->struct_ref++; |
199 | engine_ref_debug(ret, 0, 1) | 199 | engine_ref_debug(ret, 0, 1) |
200 | } | 200 | } |
201 | CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE); | 201 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); |
202 | return ret; | 202 | return ret; |
203 | } | 203 | } |
204 | 204 | ||
@@ -206,14 +206,14 @@ ENGINE *ENGINE_get_last(void) | |||
206 | { | 206 | { |
207 | ENGINE *ret; | 207 | ENGINE *ret; |
208 | 208 | ||
209 | CRYPTO_r_lock(CRYPTO_LOCK_ENGINE); | 209 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); |
210 | ret = engine_list_tail; | 210 | ret = engine_list_tail; |
211 | if(ret) | 211 | if(ret) |
212 | { | 212 | { |
213 | ret->struct_ref++; | 213 | ret->struct_ref++; |
214 | engine_ref_debug(ret, 0, 1) | 214 | engine_ref_debug(ret, 0, 1) |
215 | } | 215 | } |
216 | CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE); | 216 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); |
217 | return ret; | 217 | return ret; |
218 | } | 218 | } |
219 | 219 | ||
@@ -227,7 +227,7 @@ ENGINE *ENGINE_get_next(ENGINE *e) | |||
227 | ERR_R_PASSED_NULL_PARAMETER); | 227 | ERR_R_PASSED_NULL_PARAMETER); |
228 | return 0; | 228 | return 0; |
229 | } | 229 | } |
230 | CRYPTO_r_lock(CRYPTO_LOCK_ENGINE); | 230 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); |
231 | ret = e->next; | 231 | ret = e->next; |
232 | if(ret) | 232 | if(ret) |
233 | { | 233 | { |
@@ -235,7 +235,7 @@ ENGINE *ENGINE_get_next(ENGINE *e) | |||
235 | ret->struct_ref++; | 235 | ret->struct_ref++; |
236 | engine_ref_debug(ret, 0, 1) | 236 | engine_ref_debug(ret, 0, 1) |
237 | } | 237 | } |
238 | CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE); | 238 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); |
239 | /* Release the structural reference to the previous ENGINE */ | 239 | /* Release the structural reference to the previous ENGINE */ |
240 | ENGINE_free(e); | 240 | ENGINE_free(e); |
241 | return ret; | 241 | return ret; |
@@ -250,7 +250,7 @@ ENGINE *ENGINE_get_prev(ENGINE *e) | |||
250 | ERR_R_PASSED_NULL_PARAMETER); | 250 | ERR_R_PASSED_NULL_PARAMETER); |
251 | return 0; | 251 | return 0; |
252 | } | 252 | } |
253 | CRYPTO_r_lock(CRYPTO_LOCK_ENGINE); | 253 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); |
254 | ret = e->prev; | 254 | ret = e->prev; |
255 | if(ret) | 255 | if(ret) |
256 | { | 256 | { |
@@ -258,7 +258,7 @@ ENGINE *ENGINE_get_prev(ENGINE *e) | |||
258 | ret->struct_ref++; | 258 | ret->struct_ref++; |
259 | engine_ref_debug(ret, 0, 1) | 259 | engine_ref_debug(ret, 0, 1) |
260 | } | 260 | } |
261 | CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE); | 261 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); |
262 | /* Release the structural reference to the previous ENGINE */ | 262 | /* Release the structural reference to the previous ENGINE */ |
263 | ENGINE_free(e); | 263 | ENGINE_free(e); |
264 | return ret; | 264 | return ret; |
@@ -346,7 +346,7 @@ ENGINE *ENGINE_by_id(const char *id) | |||
346 | ERR_R_PASSED_NULL_PARAMETER); | 346 | ERR_R_PASSED_NULL_PARAMETER); |
347 | return NULL; | 347 | return NULL; |
348 | } | 348 | } |
349 | CRYPTO_r_lock(CRYPTO_LOCK_ENGINE); | 349 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); |
350 | iterator = engine_list_head; | 350 | iterator = engine_list_head; |
351 | while(iterator && (strcmp(id, iterator->id) != 0)) | 351 | while(iterator && (strcmp(id, iterator->id) != 0)) |
352 | iterator = iterator->next; | 352 | iterator = iterator->next; |
@@ -372,7 +372,7 @@ ENGINE *ENGINE_by_id(const char *id) | |||
372 | engine_ref_debug(iterator, 0, 1) | 372 | engine_ref_debug(iterator, 0, 1) |
373 | } | 373 | } |
374 | } | 374 | } |
375 | CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE); | 375 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); |
376 | if(iterator == NULL) | 376 | if(iterator == NULL) |
377 | { | 377 | { |
378 | ENGINEerr(ENGINE_F_ENGINE_BY_ID, | 378 | ENGINEerr(ENGINE_F_ENGINE_BY_ID, |
@@ -381,3 +381,14 @@ ENGINE *ENGINE_by_id(const char *id) | |||
381 | } | 381 | } |
382 | return iterator; | 382 | return iterator; |
383 | } | 383 | } |
384 | |||
385 | int ENGINE_up_ref(ENGINE *e) | ||
386 | { | ||
387 | if (e == NULL) | ||
388 | { | ||
389 | ENGINEerr(ENGINE_F_ENGINE_UP_REF,ERR_R_PASSED_NULL_PARAMETER); | ||
390 | return 0; | ||
391 | } | ||
392 | CRYPTO_add(&e->struct_ref,1,CRYPTO_LOCK_ENGINE); | ||
393 | return 1; | ||
394 | } | ||
diff --git a/src/lib/libcrypto/engine/eng_openssl.c b/src/lib/libcrypto/engine/eng_openssl.c index e9d976f46b..54579eea2e 100644 --- a/src/lib/libcrypto/engine/eng_openssl.c +++ b/src/lib/libcrypto/engine/eng_openssl.c | |||
@@ -63,6 +63,7 @@ | |||
63 | #include <openssl/engine.h> | 63 | #include <openssl/engine.h> |
64 | #include <openssl/dso.h> | 64 | #include <openssl/dso.h> |
65 | #include <openssl/pem.h> | 65 | #include <openssl/pem.h> |
66 | #include <openssl/evp.h> | ||
66 | 67 | ||
67 | /* This testing gunk is implemented (and explained) lower down. It also assumes | 68 | /* This testing gunk is implemented (and explained) lower down. It also assumes |
68 | * the application explicitly calls "ENGINE_load_openssl()" because this is no | 69 | * the application explicitly calls "ENGINE_load_openssl()" because this is no |
@@ -78,6 +79,21 @@ | |||
78 | /* #define TEST_ENG_OPENSSL_SHA_P_UPDATE */ | 79 | /* #define TEST_ENG_OPENSSL_SHA_P_UPDATE */ |
79 | /* #define TEST_ENG_OPENSSL_SHA_P_FINAL */ | 80 | /* #define TEST_ENG_OPENSSL_SHA_P_FINAL */ |
80 | 81 | ||
82 | /* Now check what of those algorithms are actually enabled */ | ||
83 | #ifdef OPENSSL_NO_RC4 | ||
84 | #undef TEST_ENG_OPENSSL_RC4 | ||
85 | #undef TEST_ENG_OPENSSL_RC4_OTHERS | ||
86 | #undef TEST_ENG_OPENSSL_RC4_P_INIT | ||
87 | #undef TEST_ENG_OPENSSL_RC4_P_CIPHER | ||
88 | #endif | ||
89 | #if defined(OPENSSL_NO_SHA) || defined(OPENSSL_NO_SHA0) || defined(OPENSSL_NO_SHA1) | ||
90 | #undef TEST_ENG_OPENSSL_SHA | ||
91 | #undef TEST_ENG_OPENSSL_SHA_OTHERS | ||
92 | #undef TEST_ENG_OPENSSL_SHA_P_INIT | ||
93 | #undef TEST_ENG_OPENSSL_SHA_P_UPDATE | ||
94 | #undef TEST_ENG_OPENSSL_SHA_P_FINAL | ||
95 | #endif | ||
96 | |||
81 | #ifdef TEST_ENG_OPENSSL_RC4 | 97 | #ifdef TEST_ENG_OPENSSL_RC4 |
82 | static int openssl_ciphers(ENGINE *e, const EVP_CIPHER **cipher, | 98 | static int openssl_ciphers(ENGINE *e, const EVP_CIPHER **cipher, |
83 | const int **nids, int nid); | 99 | const int **nids, int nid); |
@@ -180,7 +196,6 @@ IMPLEMENT_DYNAMIC_BIND_FN(bind_fn) | |||
180 | * the "init_key" handler is called. | 196 | * the "init_key" handler is called. |
181 | * TEST_ENG_OPENSSL_RC4_P_CIPHER - ditto for the "cipher" handler. | 197 | * TEST_ENG_OPENSSL_RC4_P_CIPHER - ditto for the "cipher" handler. |
182 | */ | 198 | */ |
183 | #include <openssl/evp.h> | ||
184 | #include <openssl/rc4.h> | 199 | #include <openssl/rc4.h> |
185 | #define TEST_RC4_KEY_SIZE 16 | 200 | #define TEST_RC4_KEY_SIZE 16 |
186 | static int test_cipher_nids[] = {NID_rc4,NID_rc4_40}; | 201 | static int test_cipher_nids[] = {NID_rc4,NID_rc4_40}; |
@@ -265,7 +280,6 @@ static int openssl_ciphers(ENGINE *e, const EVP_CIPHER **cipher, | |||
265 | 280 | ||
266 | #ifdef TEST_ENG_OPENSSL_SHA | 281 | #ifdef TEST_ENG_OPENSSL_SHA |
267 | /* Much the same sort of comment as for TEST_ENG_OPENSSL_RC4 */ | 282 | /* Much the same sort of comment as for TEST_ENG_OPENSSL_RC4 */ |
268 | #include <openssl/evp.h> | ||
269 | #include <openssl/sha.h> | 283 | #include <openssl/sha.h> |
270 | static int test_digest_nids[] = {NID_sha1}; | 284 | static int test_digest_nids[] = {NID_sha1}; |
271 | static int test_digest_nids_number = 1; | 285 | static int test_digest_nids_number = 1; |
diff --git a/src/lib/libcrypto/engine/engine.h b/src/lib/libcrypto/engine/engine.h index cf06618286..8686879e1a 100644 --- a/src/lib/libcrypto/engine/engine.h +++ b/src/lib/libcrypto/engine/engine.h | |||
@@ -59,6 +59,12 @@ | |||
59 | #ifndef HEADER_ENGINE_H | 59 | #ifndef HEADER_ENGINE_H |
60 | #define HEADER_ENGINE_H | 60 | #define HEADER_ENGINE_H |
61 | 61 | ||
62 | #include <openssl/opensslconf.h> | ||
63 | |||
64 | #ifdef OPENSSL_NO_ENGINE | ||
65 | #error ENGINE is disabled. | ||
66 | #endif | ||
67 | |||
62 | #include <openssl/ossl_typ.h> | 68 | #include <openssl/ossl_typ.h> |
63 | #include <openssl/bn.h> | 69 | #include <openssl/bn.h> |
64 | #ifndef OPENSSL_NO_RSA | 70 | #ifndef OPENSSL_NO_RSA |
@@ -307,7 +313,7 @@ void ENGINE_load_ubsec(void); | |||
307 | void ENGINE_load_aep(void); | 313 | void ENGINE_load_aep(void); |
308 | void ENGINE_load_sureware(void); | 314 | void ENGINE_load_sureware(void); |
309 | void ENGINE_load_4758cca(void); | 315 | void ENGINE_load_4758cca(void); |
310 | void ENGINE_load_openbsd_dev_crypto(void); | 316 | void ENGINE_load_cryptodev(void); |
311 | void ENGINE_load_builtin_engines(void); | 317 | void ENGINE_load_builtin_engines(void); |
312 | 318 | ||
313 | /* Get and set global flags (ENGINE_TABLE_FLAG_***) for the implementation | 319 | /* Get and set global flags (ENGINE_TABLE_FLAG_***) for the implementation |
@@ -406,6 +412,7 @@ int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg, | |||
406 | * compatibility! */ | 412 | * compatibility! */ |
407 | ENGINE *ENGINE_new(void); | 413 | ENGINE *ENGINE_new(void); |
408 | int ENGINE_free(ENGINE *e); | 414 | int ENGINE_free(ENGINE *e); |
415 | int ENGINE_up_ref(ENGINE *e); | ||
409 | int ENGINE_set_id(ENGINE *e, const char *id); | 416 | int ENGINE_set_id(ENGINE *e, const char *id); |
410 | int ENGINE_set_name(ENGINE *e, const char *name); | 417 | int ENGINE_set_name(ENGINE *e, const char *name); |
411 | int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth); | 418 | int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth); |
@@ -662,6 +669,7 @@ void ERR_load_ENGINE_strings(void); | |||
662 | #define ENGINE_F_ENGINE_SET_NAME 130 | 669 | #define ENGINE_F_ENGINE_SET_NAME 130 |
663 | #define ENGINE_F_ENGINE_TABLE_REGISTER 184 | 670 | #define ENGINE_F_ENGINE_TABLE_REGISTER 184 |
664 | #define ENGINE_F_ENGINE_UNLOAD_KEY 152 | 671 | #define ENGINE_F_ENGINE_UNLOAD_KEY 152 |
672 | #define ENGINE_F_ENGINE_UP_REF 190 | ||
665 | #define ENGINE_F_INT_CTRL_HELPER 172 | 673 | #define ENGINE_F_INT_CTRL_HELPER 172 |
666 | #define ENGINE_F_INT_ENGINE_CONFIGURE 188 | 674 | #define ENGINE_F_INT_ENGINE_CONFIGURE 188 |
667 | #define ENGINE_F_LOG_MESSAGE 141 | 675 | #define ENGINE_F_LOG_MESSAGE 141 |
diff --git a/src/lib/libcrypto/engine/tb_cipher.c b/src/lib/libcrypto/engine/tb_cipher.c index c5a50fc910..50b3cec1fa 100644 --- a/src/lib/libcrypto/engine/tb_cipher.c +++ b/src/lib/libcrypto/engine/tb_cipher.c | |||
@@ -81,7 +81,7 @@ int ENGINE_register_ciphers(ENGINE *e) | |||
81 | int num_nids = e->ciphers(e, NULL, &nids, 0); | 81 | int num_nids = e->ciphers(e, NULL, &nids, 0); |
82 | if(num_nids > 0) | 82 | if(num_nids > 0) |
83 | return engine_table_register(&cipher_table, | 83 | return engine_table_register(&cipher_table, |
84 | &engine_unregister_all_ciphers, e, nids, | 84 | engine_unregister_all_ciphers, e, nids, |
85 | num_nids, 0); | 85 | num_nids, 0); |
86 | } | 86 | } |
87 | return 1; | 87 | return 1; |
@@ -103,7 +103,7 @@ int ENGINE_set_default_ciphers(ENGINE *e) | |||
103 | int num_nids = e->ciphers(e, NULL, &nids, 0); | 103 | int num_nids = e->ciphers(e, NULL, &nids, 0); |
104 | if(num_nids > 0) | 104 | if(num_nids > 0) |
105 | return engine_table_register(&cipher_table, | 105 | return engine_table_register(&cipher_table, |
106 | &engine_unregister_all_ciphers, e, nids, | 106 | engine_unregister_all_ciphers, e, nids, |
107 | num_nids, 1); | 107 | num_nids, 1); |
108 | } | 108 | } |
109 | return 1; | 109 | return 1; |
diff --git a/src/lib/libcrypto/engine/tb_dh.c b/src/lib/libcrypto/engine/tb_dh.c index c9347235ea..e290e1702b 100644 --- a/src/lib/libcrypto/engine/tb_dh.c +++ b/src/lib/libcrypto/engine/tb_dh.c | |||
@@ -78,7 +78,7 @@ int ENGINE_register_DH(ENGINE *e) | |||
78 | { | 78 | { |
79 | if(e->dh_meth) | 79 | if(e->dh_meth) |
80 | return engine_table_register(&dh_table, | 80 | return engine_table_register(&dh_table, |
81 | &engine_unregister_all_DH, e, &dummy_nid, 1, 0); | 81 | engine_unregister_all_DH, e, &dummy_nid, 1, 0); |
82 | return 1; | 82 | return 1; |
83 | } | 83 | } |
84 | 84 | ||
@@ -94,7 +94,7 @@ int ENGINE_set_default_DH(ENGINE *e) | |||
94 | { | 94 | { |
95 | if(e->dh_meth) | 95 | if(e->dh_meth) |
96 | return engine_table_register(&dh_table, | 96 | return engine_table_register(&dh_table, |
97 | &engine_unregister_all_DH, e, &dummy_nid, 1, 1); | 97 | engine_unregister_all_DH, e, &dummy_nid, 1, 1); |
98 | return 1; | 98 | return 1; |
99 | } | 99 | } |
100 | 100 | ||
diff --git a/src/lib/libcrypto/engine/tb_digest.c b/src/lib/libcrypto/engine/tb_digest.c index 2c4dd6f796..e82d2a17c9 100644 --- a/src/lib/libcrypto/engine/tb_digest.c +++ b/src/lib/libcrypto/engine/tb_digest.c | |||
@@ -81,7 +81,7 @@ int ENGINE_register_digests(ENGINE *e) | |||
81 | int num_nids = e->digests(e, NULL, &nids, 0); | 81 | int num_nids = e->digests(e, NULL, &nids, 0); |
82 | if(num_nids > 0) | 82 | if(num_nids > 0) |
83 | return engine_table_register(&digest_table, | 83 | return engine_table_register(&digest_table, |
84 | &engine_unregister_all_digests, e, nids, | 84 | engine_unregister_all_digests, e, nids, |
85 | num_nids, 0); | 85 | num_nids, 0); |
86 | } | 86 | } |
87 | return 1; | 87 | return 1; |
@@ -103,7 +103,7 @@ int ENGINE_set_default_digests(ENGINE *e) | |||
103 | int num_nids = e->digests(e, NULL, &nids, 0); | 103 | int num_nids = e->digests(e, NULL, &nids, 0); |
104 | if(num_nids > 0) | 104 | if(num_nids > 0) |
105 | return engine_table_register(&digest_table, | 105 | return engine_table_register(&digest_table, |
106 | &engine_unregister_all_digests, e, nids, | 106 | engine_unregister_all_digests, e, nids, |
107 | num_nids, 1); | 107 | num_nids, 1); |
108 | } | 108 | } |
109 | return 1; | 109 | return 1; |
diff --git a/src/lib/libcrypto/engine/tb_dsa.c b/src/lib/libcrypto/engine/tb_dsa.c index e9209476b8..80170591f2 100644 --- a/src/lib/libcrypto/engine/tb_dsa.c +++ b/src/lib/libcrypto/engine/tb_dsa.c | |||
@@ -78,7 +78,7 @@ int ENGINE_register_DSA(ENGINE *e) | |||
78 | { | 78 | { |
79 | if(e->dsa_meth) | 79 | if(e->dsa_meth) |
80 | return engine_table_register(&dsa_table, | 80 | return engine_table_register(&dsa_table, |
81 | &engine_unregister_all_DSA, e, &dummy_nid, 1, 0); | 81 | engine_unregister_all_DSA, e, &dummy_nid, 1, 0); |
82 | return 1; | 82 | return 1; |
83 | } | 83 | } |
84 | 84 | ||
@@ -94,7 +94,7 @@ int ENGINE_set_default_DSA(ENGINE *e) | |||
94 | { | 94 | { |
95 | if(e->dsa_meth) | 95 | if(e->dsa_meth) |
96 | return engine_table_register(&dsa_table, | 96 | return engine_table_register(&dsa_table, |
97 | &engine_unregister_all_DSA, e, &dummy_nid, 1, 0); | 97 | engine_unregister_all_DSA, e, &dummy_nid, 1, 0); |
98 | return 1; | 98 | return 1; |
99 | } | 99 | } |
100 | 100 | ||
diff --git a/src/lib/libcrypto/engine/tb_rand.c b/src/lib/libcrypto/engine/tb_rand.c index 0b1d031f1e..69b67111bc 100644 --- a/src/lib/libcrypto/engine/tb_rand.c +++ b/src/lib/libcrypto/engine/tb_rand.c | |||
@@ -78,7 +78,7 @@ int ENGINE_register_RAND(ENGINE *e) | |||
78 | { | 78 | { |
79 | if(e->rand_meth) | 79 | if(e->rand_meth) |
80 | return engine_table_register(&rand_table, | 80 | return engine_table_register(&rand_table, |
81 | &engine_unregister_all_RAND, e, &dummy_nid, 1, 0); | 81 | engine_unregister_all_RAND, e, &dummy_nid, 1, 0); |
82 | return 1; | 82 | return 1; |
83 | } | 83 | } |
84 | 84 | ||
@@ -94,7 +94,7 @@ int ENGINE_set_default_RAND(ENGINE *e) | |||
94 | { | 94 | { |
95 | if(e->rand_meth) | 95 | if(e->rand_meth) |
96 | return engine_table_register(&rand_table, | 96 | return engine_table_register(&rand_table, |
97 | &engine_unregister_all_RAND, e, &dummy_nid, 1, 1); | 97 | engine_unregister_all_RAND, e, &dummy_nid, 1, 1); |
98 | return 1; | 98 | return 1; |
99 | } | 99 | } |
100 | 100 | ||
diff --git a/src/lib/libcrypto/engine/tb_rsa.c b/src/lib/libcrypto/engine/tb_rsa.c index f84fea3968..fee4867f52 100644 --- a/src/lib/libcrypto/engine/tb_rsa.c +++ b/src/lib/libcrypto/engine/tb_rsa.c | |||
@@ -78,7 +78,7 @@ int ENGINE_register_RSA(ENGINE *e) | |||
78 | { | 78 | { |
79 | if(e->rsa_meth) | 79 | if(e->rsa_meth) |
80 | return engine_table_register(&rsa_table, | 80 | return engine_table_register(&rsa_table, |
81 | &engine_unregister_all_RSA, e, &dummy_nid, 1, 0); | 81 | engine_unregister_all_RSA, e, &dummy_nid, 1, 0); |
82 | return 1; | 82 | return 1; |
83 | } | 83 | } |
84 | 84 | ||
@@ -94,7 +94,7 @@ int ENGINE_set_default_RSA(ENGINE *e) | |||
94 | { | 94 | { |
95 | if(e->rsa_meth) | 95 | if(e->rsa_meth) |
96 | return engine_table_register(&rsa_table, | 96 | return engine_table_register(&rsa_table, |
97 | &engine_unregister_all_RSA, e, &dummy_nid, 1, 1); | 97 | engine_unregister_all_RSA, e, &dummy_nid, 1, 1); |
98 | return 1; | 98 | return 1; |
99 | } | 99 | } |
100 | 100 | ||