Remove dead code from pk_parse_key_pkcs8_unencrypted_der
pk_get_pk_alg will either return 0 or a pk error code. This means that the error code will always be a high level module ID and so we just return ret. Signed-off-by: Chris Jones <christopher.jones@arm.com>
This commit is contained in:
parent
860f509421
commit
4d01c5b5c3
1 changed files with 1 additions and 8 deletions
|
@ -1041,14 +1041,7 @@ static int pk_parse_key_pkcs8_unencrypted_der(
|
|||
|
||||
if( ( ret = pk_get_pk_alg( &p, end, &pk_alg, ¶ms ) ) != 0 )
|
||||
{
|
||||
if( ret >= -0x007F )
|
||||
{
|
||||
return( MBEDTLS_ERROR_ADD( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT, ret ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
return( ret );
|
||||
}
|
||||
|
||||
if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, MBEDTLS_ASN1_OCTET_STRING ) ) != 0 )
|
||||
|
|
Loading…
Reference in a new issue