summaryrefslogtreecommitdiffstats
path: root/ssl/t1_lib.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2014-12-05 13:39:14 +0000
committerDr. Stephen Henson <steve@openssl.org>2015-01-02 22:27:40 +0000
commit47606dda672a5008168f62d4b7d7f94cd2d31313 (patch)
treef143ff0c3087126992e724f69a9f3864ef832258 /ssl/t1_lib.c
parentc30c8761766d98c7fcd257b7332df5cd56c40a6f (diff)
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 <matt@openssl.org> (cherry picked from commit 4f605ccb779e32a770093d687e0554e0bbb137d3) Conflicts: ssl/t1_lib.c
Diffstat (limited to 'ssl/t1_lib.c')
-rw-r--r--ssl/t1_lib.c10
1 files changed, 10 insertions, 0 deletions
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);