From 2c90015c06ac7b49eace0683c483b70e55bc91ba Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Sat, 13 Feb 2016 12:37:39 +0100 Subject: [PATCH] Make sure the OPENSSL_INIT flags are 32 bits and document the ssl range Reviewed-by: Rich Salz --- include/openssl/crypto.h | 35 ++++++++++++++++++----------------- include/openssl/ssl.h | 5 +++-- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/include/openssl/crypto.h b/include/openssl/crypto.h index f05fa1e186..7191915743 100644 --- a/include/openssl/crypto.h +++ b/include/openssl/crypto.h @@ -549,23 +549,24 @@ int CRYPTO_memcmp(const volatile void * volatile in_a, size_t len); /* Standard initialisation options */ -# define OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS 0x000001 -# define OPENSSL_INIT_LOAD_CRYPTO_STRINGS 0x000002 -# define OPENSSL_INIT_ADD_ALL_CIPHERS 0x000004 -# define OPENSSL_INIT_ADD_ALL_DIGESTS 0x000008 -# define OPENSSL_INIT_NO_ADD_ALL_CIPHERS 0x000010 -# define OPENSSL_INIT_NO_ADD_ALL_DIGESTS 0x000020 -# define OPENSSL_INIT_LOAD_CONFIG 0x000040 -# define OPENSSL_INIT_NO_LOAD_CONFIG 0x000080 -# define OPENSSL_INIT_ASYNC 0x000100 -# define OPENSSL_INIT_ENGINE_RDRAND 0x000200 -# define OPENSSL_INIT_ENGINE_DYNAMIC 0x000400 -# define OPENSSL_INIT_ENGINE_OPENSSL 0x000800 -# define OPENSSL_INIT_ENGINE_CRYPTODEV 0x001000 -# define OPENSSL_INIT_ENGINE_CAPI 0x002000 -# define OPENSSL_INIT_ENGINE_PADLOCK 0x004000 -# define OPENSSL_INIT_ENGINE_DASYNC 0x008000 -/* OPENSSL_INIT flag 0x010000 reserved for internal use */ +# define OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS 0x00000001L +# define OPENSSL_INIT_LOAD_CRYPTO_STRINGS 0x00000002L +# define OPENSSL_INIT_ADD_ALL_CIPHERS 0x00000004L +# define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L +# define OPENSSL_INIT_NO_ADD_ALL_CIPHERS 0x00000010L +# define OPENSSL_INIT_NO_ADD_ALL_DIGESTS 0x00000020L +# define OPENSSL_INIT_LOAD_CONFIG 0x00000040L +# define OPENSSL_INIT_NO_LOAD_CONFIG 0x00000080L +# define OPENSSL_INIT_ASYNC 0x00000100L +# define OPENSSL_INIT_ENGINE_RDRAND 0x00000200L +# define OPENSSL_INIT_ENGINE_DYNAMIC 0x00000400L +# define OPENSSL_INIT_ENGINE_OPENSSL 0x00000800L +# define OPENSSL_INIT_ENGINE_CRYPTODEV 0x00001000L +# define OPENSSL_INIT_ENGINE_CAPI 0x00002000L +# define OPENSSL_INIT_ENGINE_PADLOCK 0x00004000L +# define OPENSSL_INIT_ENGINE_DASYNC 0x00008000L +/* OPENSSL_INIT flag 0x00010000 reserved for internal use */ +/* OPENSSL_INIT flag range 0xfff00000 reserved for OPENSSL_init_ssl() */ /* Max OPENSSL_INIT flag value is 0x80000000 */ /* openssl and dasync not counted as builtin */ diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index d51c2d4840..36d17dd224 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h @@ -1934,8 +1934,9 @@ int (*SSL_CTX_get_security_callback(const SSL_CTX *ctx)) (SSL *s, void SSL_CTX_set0_security_ex_data(SSL_CTX *ctx, void *ex); __owur void *SSL_CTX_get0_security_ex_data(const SSL_CTX *ctx); -#define OPENSSL_INIT_NO_LOAD_SSL_STRINGS 0x0100000000 -#define OPENSSL_INIT_LOAD_SSL_STRINGS 0x0200000000 +/* OPENSSL_INIT flag 0x010000 reserved for internal use */ +#define OPENSSL_INIT_NO_LOAD_SSL_STRINGS 0x00100000L +#define OPENSSL_INIT_LOAD_SSL_STRINGS 0x00200000L #define OPENSSL_INIT_SSL_DEFAULT \ (OPENSSL_INIT_LOAD_SSL_STRINGS | OPENSSL_INIT_LOAD_CRYPTO_STRINGS) -- 2.25.1