diff options
| author | djm <> | 2012-10-13 21:23:50 +0000 |
|---|---|---|
| committer | djm <> | 2012-10-13 21:23:50 +0000 |
| commit | 228cae30b117c2493f69ad3c195341cd6ec8d430 (patch) | |
| tree | 29ff00b10d52c0978077c4fd83c33b065bade73e /src/lib/libcrypto/engine | |
| parent | 731838c66b52c0ae5888333005b74115a620aa96 (diff) | |
| download | openbsd-228cae30b117c2493f69ad3c195341cd6ec8d430.tar.gz openbsd-228cae30b117c2493f69ad3c195341cd6ec8d430.tar.bz2 openbsd-228cae30b117c2493f69ad3c195341cd6ec8d430.zip | |
import OpenSSL-1.0.1c
Diffstat (limited to 'src/lib/libcrypto/engine')
| -rw-r--r-- | src/lib/libcrypto/engine/eng_all.c | 9 | ||||
| -rw-r--r-- | src/lib/libcrypto/engine/eng_fat.c | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/engine/engine.h | 9 |
3 files changed, 20 insertions, 1 deletions
diff --git a/src/lib/libcrypto/engine/eng_all.c b/src/lib/libcrypto/engine/eng_all.c index 22c120454f..6093376df4 100644 --- a/src/lib/libcrypto/engine/eng_all.c +++ b/src/lib/libcrypto/engine/eng_all.c | |||
| @@ -61,6 +61,8 @@ | |||
| 61 | 61 | ||
| 62 | void ENGINE_load_builtin_engines(void) | 62 | void ENGINE_load_builtin_engines(void) |
| 63 | { | 63 | { |
| 64 | /* Some ENGINEs need this */ | ||
| 65 | OPENSSL_cpuid_setup(); | ||
| 64 | #if 0 | 66 | #if 0 |
| 65 | /* There's no longer any need for an "openssl" ENGINE unless, one day, | 67 | /* There's no longer any need for an "openssl" ENGINE unless, one day, |
| 66 | * it is the *only* way for standard builtin implementations to be be | 68 | * it is the *only* way for standard builtin implementations to be be |
| @@ -71,6 +73,12 @@ void ENGINE_load_builtin_engines(void) | |||
| 71 | #if !defined(OPENSSL_NO_HW) && (defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV)) | 73 | #if !defined(OPENSSL_NO_HW) && (defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV)) |
| 72 | ENGINE_load_cryptodev(); | 74 | ENGINE_load_cryptodev(); |
| 73 | #endif | 75 | #endif |
| 76 | #ifndef OPENSSL_NO_RSAX | ||
| 77 | ENGINE_load_rsax(); | ||
| 78 | #endif | ||
| 79 | #ifndef OPENSSL_NO_RDRAND | ||
| 80 | ENGINE_load_rdrand(); | ||
| 81 | #endif | ||
| 74 | ENGINE_load_dynamic(); | 82 | ENGINE_load_dynamic(); |
| 75 | #ifndef OPENSSL_NO_STATIC_ENGINE | 83 | #ifndef OPENSSL_NO_STATIC_ENGINE |
| 76 | #ifndef OPENSSL_NO_HW | 84 | #ifndef OPENSSL_NO_HW |
| @@ -112,6 +120,7 @@ void ENGINE_load_builtin_engines(void) | |||
| 112 | ENGINE_load_capi(); | 120 | ENGINE_load_capi(); |
| 113 | #endif | 121 | #endif |
| 114 | #endif | 122 | #endif |
| 123 | ENGINE_register_all_complete(); | ||
| 115 | } | 124 | } |
| 116 | 125 | ||
| 117 | #if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV) | 126 | #if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV) |
diff --git a/src/lib/libcrypto/engine/eng_fat.c b/src/lib/libcrypto/engine/eng_fat.c index db66e62350..789b8d57e5 100644 --- a/src/lib/libcrypto/engine/eng_fat.c +++ b/src/lib/libcrypto/engine/eng_fat.c | |||
| @@ -176,6 +176,7 @@ int ENGINE_register_all_complete(void) | |||
| 176 | ENGINE *e; | 176 | ENGINE *e; |
| 177 | 177 | ||
| 178 | for(e=ENGINE_get_first() ; e ; e=ENGINE_get_next(e)) | 178 | for(e=ENGINE_get_first() ; e ; e=ENGINE_get_next(e)) |
| 179 | ENGINE_register_complete(e); | 179 | if (!(e->flags & ENGINE_FLAGS_NO_REGISTER_ALL)) |
| 180 | ENGINE_register_complete(e); | ||
| 180 | return 1; | 181 | return 1; |
| 181 | } | 182 | } |
diff --git a/src/lib/libcrypto/engine/engine.h b/src/lib/libcrypto/engine/engine.h index 943aeae215..f8be497724 100644 --- a/src/lib/libcrypto/engine/engine.h +++ b/src/lib/libcrypto/engine/engine.h | |||
| @@ -141,6 +141,13 @@ extern "C" { | |||
| 141 | * the existing ENGINE's structural reference count. */ | 141 | * the existing ENGINE's structural reference count. */ |
| 142 | #define ENGINE_FLAGS_BY_ID_COPY (int)0x0004 | 142 | #define ENGINE_FLAGS_BY_ID_COPY (int)0x0004 |
| 143 | 143 | ||
| 144 | /* This flag if for an ENGINE that does not want its methods registered as | ||
| 145 | * part of ENGINE_register_all_complete() for example if the methods are | ||
| 146 | * not usable as default methods. | ||
| 147 | */ | ||
| 148 | |||
| 149 | #define ENGINE_FLAGS_NO_REGISTER_ALL (int)0x0008 | ||
| 150 | |||
| 144 | /* ENGINEs can support their own command types, and these flags are used in | 151 | /* ENGINEs can support their own command types, and these flags are used in |
| 145 | * ENGINE_CTRL_GET_CMD_FLAGS to indicate to the caller what kind of input each | 152 | * ENGINE_CTRL_GET_CMD_FLAGS to indicate to the caller what kind of input each |
| 146 | * command expects. Currently only numeric and string input is supported. If a | 153 | * command expects. Currently only numeric and string input is supported. If a |
| @@ -344,6 +351,8 @@ void ENGINE_load_gost(void); | |||
| 344 | #endif | 351 | #endif |
| 345 | #endif | 352 | #endif |
| 346 | void ENGINE_load_cryptodev(void); | 353 | void ENGINE_load_cryptodev(void); |
| 354 | void ENGINE_load_rsax(void); | ||
| 355 | void ENGINE_load_rdrand(void); | ||
| 347 | void ENGINE_load_builtin_engines(void); | 356 | void ENGINE_load_builtin_engines(void); |
| 348 | 357 | ||
| 349 | /* Get and set global flags (ENGINE_TABLE_FLAG_***) for the implementation | 358 | /* Get and set global flags (ENGINE_TABLE_FLAG_***) for the implementation |
