Merge pull request #4904 from kennethsoerensen/pkparse-warning_2_16

Backport 2.16: Remove compiler warning if only MBEDTLS_PK_PARSE_C is …
This commit is contained in:
Gilles Peskine
2021-09-01 16:53:54 +02:00
committed by GitHub

View File

@@ -1408,8 +1408,11 @@ int mbedtls_pk_parse_key( mbedtls_pk_context *pk,
}
#endif /* MBEDTLS_PKCS12_C || MBEDTLS_PKCS5_C */
if( ( ret = pk_parse_key_pkcs8_unencrypted_der( pk, key, keylen ) ) == 0 )
ret = pk_parse_key_pkcs8_unencrypted_der( pk, key, keylen );
if( ret == 0 )
{
return( 0 );
}
mbedtls_pk_free( pk );
mbedtls_pk_init( pk );