mirror of https://github.com/openssl/openssl.git
				
				
				
			ssl_old_test.c: Check inconsistent values from SSL_get0_alpn_selected()
Fixes Coverity 1534838 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21755)
This commit is contained in:
		
							parent
							
								
									20baa24f9f
								
							
						
					
					
						commit
						8b940b6945
					
				|  | @ -332,6 +332,18 @@ static int verify_alpn(SSL *client, SSL *server) | |||
|     OPENSSL_free(alpn_selected); | ||||
|     alpn_selected = NULL; | ||||
| 
 | ||||
|     if (client_proto == NULL && client_proto_len != 0) { | ||||
|         BIO_printf(bio_stdout, | ||||
|                    "Inconsistent SSL_get0_alpn_selected() for client!\n"); | ||||
|         goto err; | ||||
|     } | ||||
| 
 | ||||
|     if (server_proto == NULL && server_proto_len != 0) { | ||||
|         BIO_printf(bio_stdout, | ||||
|                    "Inconsistent SSL_get0_alpn_selected() for server!\n"); | ||||
|         goto err; | ||||
|     } | ||||
| 
 | ||||
|     if (client_proto_len != server_proto_len) { | ||||
|         BIO_printf(bio_stdout, "ALPN selected protocols differ!\n"); | ||||
|         goto err; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue