diff options
author | Adam Langley <agl@chromium.org> | 2013-04-15 18:07:47 -0400 |
---|---|---|
committer | Ben Laurie <ben@links.org> | 2013-07-22 15:28:20 +0100 |
commit | 6f017a8f9db3a79f3a3406cf8d493ccd346db691 (patch) | |
tree | 68d7c91646105cb2e1fe65852c09458108ea2e01 /ssl/s3_lib.c | |
parent | 584ac22110b2ff367d3632a89cf7b15c015903b8 (diff) |
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
Diffstat (limited to 'ssl/s3_lib.c')
-rw-r--r-- | ssl/s3_lib.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index 67eb92089e..98a7621508 100644 --- a/ssl/s3_lib.c +++ b/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; |