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)
diff --git a/ssl/statem/statem_clnt.c b/ssl/statem/statem_clnt.c
index 4bd9457..038fac9 100644
--- a/ssl/statem/statem_clnt.c
+++ b/ssl/statem/statem_clnt.c
@@ -2938,10 +2938,12 @@
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)