Remove a double call to ssl3_send_alert()
authorMatt Caswell <matt@openssl.org>
Wed, 8 Feb 2017 17:27:09 +0000 (17:27 +0000)
committerMatt Caswell <matt@openssl.org>
Tue, 14 Feb 2017 13:14:25 +0000 (13:14 +0000)
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2341)

ssl/statem/statem_srvr.c

index 66743c37ad1224ed774e222bd1522abca245627c..93ba63e6505a6a64dd746da20f0ec11f17ca686a 100644 (file)
@@ -3638,7 +3638,7 @@ STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,
 
 static int tls_construct_hello_retry_request(SSL *s, WPACKET *pkt)
 {
-    int al;
+    int al = SSL_AD_INTERNAL_ERROR;
 
     /*
      * TODO(TLS1.3): Remove the DRAFT version before release
@@ -3647,7 +3647,6 @@ static int tls_construct_hello_retry_request(SSL *s, WPACKET *pkt)
     if (!WPACKET_put_bytes_u16(pkt, TLS1_3_VERSION_DRAFT)
             || !tls_construct_extensions(s, pkt, EXT_TLS1_3_HELLO_RETRY_REQUEST,
                                          NULL, 0, &al)) {
-        ssl3_send_alert(s, SSL3_AL_FATAL, al);
         SSLerr(SSL_F_TLS_CONSTRUCT_HELLO_RETRY_REQUEST, ERR_R_INTERNAL_ERROR);
         ssl3_send_alert(s, SSL3_AL_FATAL, al);
         return 0;