summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_lib.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-02-10 13:59:15 +0000
committerMatt Caswell <matt@openssl.org>2016-02-10 17:40:59 +0000
commit0fc32b0718ec210e03b6d8623d4819ed04615a1b (patch)
tree9491a02a740d05b415790bcfeb16eb65f6a06267 /ssl/ssl_lib.c
parent8bd8221be80708825ddb9771d4c9fff67860119b (diff)
The new init functions can now fail so shouldn't be void
The new init functions can fail if the library has already been stopped. We should be able to indicate failure with a 0 return value. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r--ssl/ssl_lib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index e4b5d9f05e..d0802207ce 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -2270,7 +2270,8 @@ SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth)
return (NULL);
}
- OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL);
+ if (!OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL))
+ return NULL;
if (FIPS_mode() && (meth->version < TLS1_VERSION)) {
SSLerr(SSL_F_SSL_CTX_NEW, SSL_R_AT_LEAST_TLS_1_0_NEEDED_IN_FIPS_MODE);