Support ALPN.
This change adds support for ALPN[1] in OpenSSL. ALPN is the IETF blessed version of NPN and we'll be supporting both ALPN and NPN for some time yet. [1] https://tools.ietf.org/html/draft-ietf-tls-applayerprotoneg-00 Conflicts: ssl/ssl3.h ssl/t1_lib.c
This commit is contained in:
13
ssl/s3_lib.c
13
ssl/s3_lib.c
@@ -3020,6 +3020,11 @@ void ssl3_free(SSL *s)
|
||||
BIO_free(s->s3->handshake_buffer);
|
||||
}
|
||||
if (s->s3->handshake_dgst) ssl3_free_digest_list(s);
|
||||
#ifndef OPENSSL_NO_TLSEXT
|
||||
if (s->s3->alpn_selected)
|
||||
OPENSSL_free(s->s3->alpn_selected);
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
SSL_SRP_CTX_free(s);
|
||||
#endif
|
||||
@@ -3098,6 +3103,14 @@ void ssl3_clear(SSL *s)
|
||||
if (s->s3->handshake_dgst) {
|
||||
ssl3_free_digest_list(s);
|
||||
}
|
||||
|
||||
#if !defined(OPENSSL_NO_TLSEXT)
|
||||
if (s->s3->alpn_selected)
|
||||
{
|
||||
free(s->s3->alpn_selected);
|
||||
s->s3->alpn_selected = NULL;
|
||||
}
|
||||
#endif
|
||||
memset(s->s3,0,sizeof *s->s3);
|
||||
s->s3->rbuf.buf = rp;
|
||||
s->s3->wbuf.buf = wp;
|
||||
|
Reference in New Issue
Block a user