Remove ext_alpn_init. We do not change ALPN on renego, so the value should carry over and not be cleared. Change-Id: Id54a083945542b4457d9c2787f0fe7c30239b76f Reviewed-on: https://boringssl-review.googlesource.com/12306 Reviewed-by: David Benjamin <davidben@google.com>
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 1b346d0..bc39440 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c
@@ -1421,11 +1421,6 @@ * * https://tools.ietf.org/html/rfc7301 */ -static void ext_alpn_init(SSL *ssl) { - OPENSSL_free(ssl->s3->alpn_selected); - ssl->s3->alpn_selected = NULL; -} - static int ext_alpn_add_clienthello(SSL *ssl, CBB *out) { if (ssl->alpn_client_proto_list == NULL || ssl->s3->initial_handshake_complete) { @@ -2517,7 +2512,7 @@ }, { TLSEXT_TYPE_application_layer_protocol_negotiation, - ext_alpn_init, + NULL, ext_alpn_add_clienthello, ext_alpn_parse_serverhello, /* ALPN is negotiated late in |ssl_negotiate_alpn|. */