Commit 500d67f1 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

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: default avatarMatt Caswell <matt@openssl.org>

(cherry picked from commit 47606dda)

Conflicts:
	ssl/t1_lib.c
parent 40fb8587
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1005,6 +1005,16 @@ int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in
		ssl_check_for_safari(s, data, d, n);
#endif /* !OPENSSL_NO_EC */

#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);