From: Dr. Stephen Henson Date: Fri, 5 Dec 2014 13:39:14 +0000 (+0000) Subject: Clear existing extension state. X-Git-Tag: master-post-reformat~106 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4f605ccb779e32a770093d687e0554e0bbb137d3;p=oweals%2Fopenssl.git Clear existing extension state. When parsing ClientHello clear any existing extension state from SRP login and SRTP profile. Thanks to Karthikeyan Bhargavan for reporting this issue. Reviewed-by: Matt Caswell --- diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index fec7ace0a1..2180c54254 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -1996,6 +1996,16 @@ static int ssl_scan_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char s->s3->flags &= ~TLS1_FLAGS_ENCRYPT_THEN_MAC; #endif +#ifndef OPENSSL_NO_SRP + if (s->srp_ctx.login != NULL) + { + OPENSSL_free(s->srp_ctx.login); + s->srp_ctx.login = NULL; + } +#endif + + s->srtp_profile = NULL; + if (data >= (d+n-2)) goto ri_check; n2s(data,len);