Remove ssl3_check_finished.
The client sends a session ID with the session ticket, and uses
the returned ID to detect resumption, so we do not need to peek
at handshake messages: s->hit tells us explicitly if we're resuming.
An equivalent change was independently made in BoringSSL, see commit
407886f589cf2dbaed82db0a44173036c3bc3317.
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 980bc1ec61)
Conflicts:
	ssl/s3_clnt.c
			
			
This commit is contained in:
		@@ -388,20 +388,6 @@ int dtls1_connect(SSL *s)
 | 
			
		||||
 | 
			
		||||
		case SSL3_ST_CR_CERT_A:
 | 
			
		||||
		case SSL3_ST_CR_CERT_B:
 | 
			
		||||
#ifndef OPENSSL_NO_TLSEXT
 | 
			
		||||
			ret=ssl3_check_finished(s);
 | 
			
		||||
			if (ret <= 0) goto end;
 | 
			
		||||
			if (ret == 2)
 | 
			
		||||
				{
 | 
			
		||||
				s->hit = 1;
 | 
			
		||||
				if (s->tlsext_ticket_expected)
 | 
			
		||||
					s->state=SSL3_ST_CR_SESSION_TICKET_A;
 | 
			
		||||
				else
 | 
			
		||||
					s->state=SSL3_ST_CR_FINISHED_A;
 | 
			
		||||
				s->init_num=0;
 | 
			
		||||
				break;
 | 
			
		||||
				}
 | 
			
		||||
#endif
 | 
			
		||||
			/* Check if it is anon DH or PSK */
 | 
			
		||||
			if (!(s->s3->tmp.new_cipher->algorithm_auth & SSL_aNULL) &&
 | 
			
		||||
			    !(s->s3->tmp.new_cipher->algorithm_mkey & SSL_kPSK))
 | 
			
		||||
@@ -850,4 +836,3 @@ f_err:
 | 
			
		||||
	ssl3_send_alert(s, SSL3_AL_FATAL, al);
 | 
			
		||||
	return -1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user