mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 13:25:28 +00:00
Remove unreachable branches in pkparse.c
This commit is contained in:
parent
5a4f172522
commit
66a0f83d58
|
@ -1080,12 +1080,7 @@ int mbedtls_pk_parse_key( mbedtls_pk_context *pk,
|
||||||
|
|
||||||
if( ret == 0 )
|
if( ret == 0 )
|
||||||
{
|
{
|
||||||
if( ( pk_info = mbedtls_pk_info_from_type( MBEDTLS_PK_RSA ) ) == NULL )
|
pk_info = mbedtls_pk_info_from_type( MBEDTLS_PK_RSA );
|
||||||
{
|
|
||||||
mbedtls_pem_free( &pem );
|
|
||||||
return( MBEDTLS_ERR_PK_UNKNOWN_PK_ALG );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( ( ret = mbedtls_pk_setup( pk, pk_info ) ) != 0 ||
|
if( ( ret = mbedtls_pk_setup( pk, pk_info ) ) != 0 ||
|
||||||
( ret = pk_parse_key_pkcs1_der( mbedtls_pk_rsa( *pk ),
|
( ret = pk_parse_key_pkcs1_der( mbedtls_pk_rsa( *pk ),
|
||||||
pem.buf, pem.buflen ) ) != 0 )
|
pem.buf, pem.buflen ) ) != 0 )
|
||||||
|
@ -1115,11 +1110,7 @@ int mbedtls_pk_parse_key( mbedtls_pk_context *pk,
|
||||||
key, pwd, pwdlen, &len );
|
key, pwd, pwdlen, &len );
|
||||||
if( ret == 0 )
|
if( ret == 0 )
|
||||||
{
|
{
|
||||||
if( ( pk_info = mbedtls_pk_info_from_type( MBEDTLS_PK_ECKEY ) ) == NULL )
|
pk_info = mbedtls_pk_info_from_type( MBEDTLS_PK_ECKEY );
|
||||||
{
|
|
||||||
mbedtls_pem_free( &pem );
|
|
||||||
return( MBEDTLS_ERR_PK_UNKNOWN_PK_ALG );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( ( ret = mbedtls_pk_setup( pk, pk_info ) ) != 0 ||
|
if( ( ret = mbedtls_pk_setup( pk, pk_info ) ) != 0 ||
|
||||||
( ret = pk_parse_key_sec1_der( mbedtls_pk_ec( *pk ),
|
( ret = pk_parse_key_sec1_der( mbedtls_pk_ec( *pk ),
|
||||||
|
|
Loading…
Reference in a new issue