diff options
author | Matt Caswell <matt@openssl.org> | 2016-02-08 16:43:03 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-02-09 15:11:38 +0000 |
commit | 7b9f8f7f03eda2faa1cdd42ed29a0b70e60eaf59 (patch) | |
tree | 30f805756265bd1d016aead84dcf1c909cca8b4b /crypto/engine | |
parent | b184e3ef73200cb3b7914a603b43a5b8a074c85f (diff) | |
download | openssl-new-7b9f8f7f03eda2faa1cdd42ed29a0b70e60eaf59.tar.gz |
Auto init/deinit libcrypto
This builds on the previous commit to auto initialise/deinitialise
libcrypto.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/engine')
-rw-r--r-- | crypto/engine/eng_cryptodev.c | 9 | ||||
-rw-r--r-- | crypto/engine/eng_dyn.c | 3 | ||||
-rw-r--r-- | crypto/engine/eng_int.h | 3 | ||||
-rw-r--r-- | crypto/engine/eng_openssl.c | 4 | ||||
-rw-r--r-- | crypto/engine/eng_rdrand.c | 7 |
5 files changed, 14 insertions, 12 deletions
diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c index eb8a8bb218..eb25790ae0 100644 --- a/crypto/engine/eng_cryptodev.c +++ b/crypto/engine/eng_cryptodev.c @@ -27,9 +27,10 @@ */ #include <openssl/objects.h> -#include <openssl/engine.h> +#include <internal/engine.h> #include <openssl/evp.h> #include <openssl/bn.h> +#include <openssl/crypto.h> #if (defined(__unix__) || defined(unix)) && !defined(USG) && \ (defined(OpenBSD) || defined(__FreeBSD__)) @@ -64,7 +65,7 @@ #ifndef HAVE_CRYPTODEV -void ENGINE_load_cryptodev(void) +void engine_load_cryptodev_internal(void) { /* This is a NOP on platforms without /dev/crypto */ return; @@ -136,7 +137,7 @@ static int cryptodev_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, #endif static int cryptodev_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void)); -void ENGINE_load_cryptodev(void); +void engine_load_cryptodev_internal(void); static const ENGINE_CMD_DEFN cryptodev_defns[] = { {0, NULL, NULL, 0} @@ -1619,7 +1620,7 @@ cryptodev_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void)) return (1); } -void ENGINE_load_cryptodev(void) +void engine_load_cryptodev_internal(void) { ENGINE *engine = ENGINE_new(); int fd; diff --git a/crypto/engine/eng_dyn.c b/crypto/engine/eng_dyn.c index 607317b355..3ca24807c7 100644 --- a/crypto/engine/eng_dyn.c +++ b/crypto/engine/eng_dyn.c @@ -58,6 +58,7 @@ #include "eng_int.h" #include <openssl/dso.h> +#include <openssl/crypto.h> /* * Shared libraries implementing ENGINEs for use by the "dynamic" ENGINE @@ -294,7 +295,7 @@ static ENGINE *engine_dynamic(void) return ret; } -void ENGINE_load_dynamic(void) +void engine_load_dynamic_internal(void) { ENGINE *toadd = engine_dynamic(); if (!toadd) diff --git a/crypto/engine/eng_int.h b/crypto/engine/eng_int.h index 804214d9ae..9d58d93ecd 100644 --- a/crypto/engine/eng_int.h +++ b/crypto/engine/eng_int.h @@ -65,8 +65,7 @@ # define HEADER_ENGINE_INT_H # include "internal/cryptlib.h" -/* Take public definitions from engine.h */ -# include <openssl/engine.h> +# include <internal/engine.h> #ifdef __cplusplus extern "C" { diff --git a/crypto/engine/eng_openssl.c b/crypto/engine/eng_openssl.c index 8540673bd1..152c1881fa 100644 --- a/crypto/engine/eng_openssl.c +++ b/crypto/engine/eng_openssl.c @@ -64,7 +64,7 @@ #include <stdio.h> #include <openssl/crypto.h> #include "internal/cryptlib.h" -#include <openssl/engine.h> +#include <internal/engine.h> #include <openssl/dso.h> #include <openssl/pem.h> #include <openssl/evp.h> @@ -196,7 +196,7 @@ static ENGINE *engine_openssl(void) return ret; } -void ENGINE_load_openssl(void) +void engine_load_openssl_internal(void) { ENGINE *toadd = engine_openssl(); if (!toadd) diff --git a/crypto/engine/eng_rdrand.c b/crypto/engine/eng_rdrand.c index 48726e2543..1be10dbeae 100644 --- a/crypto/engine/eng_rdrand.c +++ b/crypto/engine/eng_rdrand.c @@ -51,9 +51,10 @@ #include <stdio.h> #include <string.h> -#include <openssl/engine.h> +#include <internal/engine.h> #include <openssl/rand.h> #include <openssl/err.h> +#include <openssl/crypto.h> #if (defined(__i386) || defined(__i386__) || defined(_M_IX86) || \ defined(__x86_64) || defined(__x86_64__) || \ @@ -129,7 +130,7 @@ static ENGINE *ENGINE_rdrand(void) return ret; } -void ENGINE_load_rdrand(void) +void engine_load_rdrand_internal(void) { extern unsigned int OPENSSL_ia32cap_P[]; @@ -143,7 +144,7 @@ void ENGINE_load_rdrand(void) } } #else -void ENGINE_load_rdrand(void) +void engine_load_rdrand_internal(void) { } #endif |