mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 15:35:42 +01:00
Rm a few unneeded tests
This commit is contained in:
parent
d11eb7c789
commit
f484282e96
@ -1449,8 +1449,7 @@ static int ssl_parse_server_key_exchange( ssl_context *ssl )
|
|||||||
/*
|
/*
|
||||||
* Verify signature
|
* Verify signature
|
||||||
*/
|
*/
|
||||||
if( pk_alg != POLARSSL_PK_NONE &&
|
if( ! pk_can_do( &ssl->session_negotiate->peer_cert->pk, pk_alg ) )
|
||||||
! pk_can_do( &ssl->session_negotiate->peer_cert->pk, pk_alg ) )
|
|
||||||
{
|
{
|
||||||
SSL_DEBUG_MSG( 1, ( "bad server key exchange message" ) );
|
SSL_DEBUG_MSG( 1, ( "bad server key exchange message" ) );
|
||||||
return( POLARSSL_ERR_SSL_PK_TYPE_MISMATCH );
|
return( POLARSSL_ERR_SSL_PK_TYPE_MISMATCH );
|
||||||
@ -1939,7 +1938,7 @@ static int ssl_write_certificate_verify( ssl_context *ssl )
|
|||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ssl->pk_key == NULL || ssl->pk_key->pk_info == NULL )
|
if( ssl->pk_key == NULL )
|
||||||
{
|
{
|
||||||
SSL_DEBUG_MSG( 1, ( "got no private key" ) );
|
SSL_DEBUG_MSG( 1, ( "got no private key" ) );
|
||||||
return( POLARSSL_ERR_SSL_PRIVATE_KEY_REQUIRED );
|
return( POLARSSL_ERR_SSL_PRIVATE_KEY_REQUIRED );
|
||||||
|
@ -2029,7 +2029,7 @@ static int ssl_write_server_key_exchange( ssl_context *ssl )
|
|||||||
/*
|
/*
|
||||||
* Make the signature
|
* Make the signature
|
||||||
*/
|
*/
|
||||||
if( ssl->pk_key == NULL || ssl->pk_key->pk_info == NULL )
|
if( ssl->pk_key == NULL )
|
||||||
{
|
{
|
||||||
SSL_DEBUG_MSG( 1, ( "got no private key" ) );
|
SSL_DEBUG_MSG( 1, ( "got no private key" ) );
|
||||||
return( POLARSSL_ERR_SSL_PRIVATE_KEY_REQUIRED );
|
return( POLARSSL_ERR_SSL_PRIVATE_KEY_REQUIRED );
|
||||||
|
Loading…
Reference in New Issue
Block a user