From 47606dda672a5008168f62d4b7d7f94cd2d31313 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Fri, 5 Dec 2014 13:39:14 +0000 Subject: [PATCH] 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 (cherry picked from commit 4f605ccb779e32a770093d687e0554e0bbb137d3) Conflicts: ssl/t1_lib.c --- ssl/t1_lib.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 962861de92..4deab88891 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -2016,6 +2016,16 @@ static int ssl_scan_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char s->cert->peer_sigalgs = NULL; } +#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); -- 2.25.1