Rm a few unneeded tests
diff --git a/library/ssl_cli.c b/library/ssl_cli.c
index 08d3bda..79bba42 100644
--- a/library/ssl_cli.c
+++ b/library/ssl_cli.c
@@ -1449,8 +1449,7 @@
/*
* Verify signature
*/
- if( pk_alg != POLARSSL_PK_NONE &&
- ! pk_can_do( &ssl->session_negotiate->peer_cert->pk, pk_alg ) )
+ if( ! pk_can_do( &ssl->session_negotiate->peer_cert->pk, pk_alg ) )
{
SSL_DEBUG_MSG( 1, ( "bad server key exchange message" ) );
return( POLARSSL_ERR_SSL_PK_TYPE_MISMATCH );
@@ -1939,7 +1938,7 @@
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" ) );
return( POLARSSL_ERR_SSL_PRIVATE_KEY_REQUIRED );