Fix from stable branch.
This commit is contained in:
		| @@ -438,7 +438,7 @@ int ssl_get_prev_session(SSL *s, unsigned char *session_id, int len, | |||||||
| 		fatal = 1; | 		fatal = 1; | ||||||
| 		goto err; | 		goto err; | ||||||
| 		} | 		} | ||||||
| 	else if (r == 0 || (!ret || !len)) | 	else if (r == 0 || (!ret && !len)) | ||||||
| 		goto err; | 		goto err; | ||||||
| 	else if (!ret && !(s->session_ctx->session_cache_mode & SSL_SESS_CACHE_NO_INTERNAL_LOOKUP)) | 	else if (!ret && !(s->session_ctx->session_cache_mode & SSL_SESS_CACHE_NO_INTERNAL_LOOKUP)) | ||||||
| #else | #else | ||||||
|   | |||||||
							
								
								
									
										11
									
								
								ssl/t1_lib.c
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								ssl/t1_lib.c
									
									
									
									
									
								
							| @@ -1388,6 +1388,13 @@ int tls1_process_ticket(SSL *s, unsigned char *session_id, int len, | |||||||
| 	/* Point after session ID in client hello */ | 	/* Point after session ID in client hello */ | ||||||
| 	const unsigned char *p = session_id + len; | 	const unsigned char *p = session_id + len; | ||||||
| 	unsigned short i; | 	unsigned short i; | ||||||
|  |  | ||||||
|  | 	/* If tickets disabled behave as if no ticket present | ||||||
|  |  	 * to permit stateful resumption. | ||||||
|  |  	 */ | ||||||
|  | 	if (SSL_get_options(s) & SSL_OP_NO_TICKET) | ||||||
|  | 		return 1; | ||||||
|  |  | ||||||
| 	if ((s->version <= SSL3_VERSION) || !limit) | 	if ((s->version <= SSL3_VERSION) || !limit) | ||||||
| 		return 1; | 		return 1; | ||||||
| 	if (p >= limit) | 	if (p >= limit) | ||||||
| @@ -1419,8 +1426,8 @@ int tls1_process_ticket(SSL *s, unsigned char *session_id, int len, | |||||||
|  			 * trigger a full handshake |  			 * trigger a full handshake | ||||||
|  			 */ |  			 */ | ||||||
| 			if (SSL_get_options(s) & SSL_OP_NO_TICKET) | 			if (SSL_get_options(s) & SSL_OP_NO_TICKET) | ||||||
| 				return 0; | 				return 1; | ||||||
| 			/* If zero length not client will accept a ticket | 			/* If zero length note client will accept a ticket | ||||||
|  			 * and indicate cache miss to trigger full handshake |  			 * and indicate cache miss to trigger full handshake | ||||||
|  			 */ |  			 */ | ||||||
| 			if (size == 0) | 			if (size == 0) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Dr. Stephen Henson
					Dr. Stephen Henson