summaryrefslogtreecommitdiffstats
path: root/ssl/statem/statem_clnt.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-11-23 12:33:11 +0000
committerMatt Caswell <matt@openssl.org>2017-12-04 13:31:48 +0000
commitf9f674eb76a7c00e3f158f673a7ec01286b02907 (patch)
treeacaa9d9ffd0f28c2c7e62d71a8c090cb8662c4ca /ssl/statem/statem_clnt.c
parent47e2ee072290db534720565318f0a8110a2e7d92 (diff)
Assert that SSLfatal() only gets called once
We shouldn't call SSLfatal() multiple times for the same error condition. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4778)
Diffstat (limited to 'ssl/statem/statem_clnt.c')
-rw-r--r--ssl/statem/statem_clnt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ssl/statem/statem_clnt.c b/ssl/statem/statem_clnt.c
index 4bd94572bb..038fac93c6 100644
--- a/ssl/statem/statem_clnt.c
+++ b/ssl/statem/statem_clnt.c
@@ -2938,10 +2938,12 @@ static int tls_construct_cke_dhe(SSL *s, WPACKET *pkt)
return 1;
err:
EVP_PKEY_free(ckey);
-#endif
+ return 0;
+#else
SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS_CONSTRUCT_CKE_DHE,
ERR_R_INTERNAL_ERROR);
return 0;
+#endif
}
static int tls_construct_cke_ecdhe(SSL *s, WPACKET *pkt)