summaryrefslogtreecommitdiffstats
path: root/ssl/s3_enc.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-05-19 09:35:19 +0100
committerMatt Caswell <matt@openssl.org>2017-05-22 14:00:19 +0100
commit380a522f689252e7f19e0c44ea49461ec7bd040f (patch)
tree81a5820773c28b57d18610fea28e4b5dd074b18c /ssl/s3_enc.c
parent98d132cf6a879faf0147aa83ea0c07ff326260ed (diff)
Replace instances of OPENSSL_assert() with soft asserts in libssl
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3496)
Diffstat (limited to 'ssl/s3_enc.c')
-rw-r--r--ssl/s3_enc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c
index 0d75567fc6..1cd28ee2b0 100644
--- a/ssl/s3_enc.c
+++ b/ssl/s3_enc.c
@@ -120,7 +120,10 @@ int ssl3_change_cipher_state(SSL *s, int which)
c = s->s3->tmp.new_sym_enc;
m = s->s3->tmp.new_hash;
/* m == NULL will lead to a crash later */
- OPENSSL_assert(m);
+ if (!ossl_assert(m != NULL)) {
+ SSLerr(SSL_F_SSL3_CHANGE_CIPHER_STATE, ERR_R_INTERNAL_ERROR);
+ goto err2;
+ }
#ifndef OPENSSL_NO_COMP
if (s->s3->tmp.new_compression == NULL)
comp = NULL;