tls-server: Remove unused variable
authorTobias Brunner <tobias@strongswan.org>
Fri, 22 Jan 2021 08:41:22 +0000 (09:41 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 12 Feb 2021 13:35:23 +0000 (14:35 +0100)
src/libtls/tls_server.c

index 2753231..6562fc4 100644 (file)
@@ -563,7 +563,6 @@ static status_t process_client_hello(private_tls_server_t *this,
                diffie_hellman_group_t group;
                tls_named_group_t curve, requesting_curve = 0;
                enumerator_t *enumerator;
-               chunk_t shared_secret = chunk_empty;
                array_t *peer_key_shares;
 
                peer_key_shares = array_create(sizeof(key_share_t), 1);
@@ -650,10 +649,8 @@ static status_t process_client_hello(private_tls_server_t *this,
                        {
                                DBG1(DBG_TLS, "DH key derivation failed");
                                this->alert->add(this->alert, TLS_FATAL, TLS_HANDSHAKE_FAILURE);
-                               chunk_clear(&shared_secret);
                                return NEED_MORE;
                        }
-                       chunk_clear(&shared_secret);
                        this->requested_curve = 0;
                }
        }