mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-10 20:45:45 +00:00
Fix minor issues raised in PR review
1. Style issues fixes - remove redundant spacing. 2. Remove depency of `MBEDTLS_RSA_C` in `pk_parse_public_keyfile_rsa()` tests, as the function itself is dependent on it.
This commit is contained in:
parent
1072e5c7e5
commit
9566ff7913
|
@ -1325,16 +1325,16 @@ int mbedtls_pk_parse_public_key( mbedtls_pk_context *ctx,
|
||||||
if( ( ret = mbedtls_pk_setup( ctx, pk_info ) ) != 0 )
|
if( ( ret = mbedtls_pk_setup( ctx, pk_info ) ) != 0 )
|
||||||
return( ret );
|
return( ret );
|
||||||
|
|
||||||
p = (unsigned char *) key;
|
p = (unsigned char *)key;
|
||||||
ret = pk_get_rsapubkey( &p, p + keylen, mbedtls_pk_rsa( *ctx ) );
|
ret = pk_get_rsapubkey( &p, p + keylen, mbedtls_pk_rsa( *ctx ) );
|
||||||
if ( ret == 0 )
|
if( ret == 0 )
|
||||||
{
|
{
|
||||||
return( ret );
|
return( ret );
|
||||||
}
|
}
|
||||||
mbedtls_pk_free( ctx );
|
mbedtls_pk_free( ctx );
|
||||||
if ( ret != ( MBEDTLS_ERR_PK_INVALID_PUBKEY + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) )
|
if( ret != ( MBEDTLS_ERR_PK_INVALID_PUBKEY + MBEDTLS_ERR_ASN1_UNEXPECTED_TAG ) )
|
||||||
{
|
{
|
||||||
return ( ret );
|
return( ret );
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_RSA_C */
|
#endif /* MBEDTLS_RSA_C */
|
||||||
p = (unsigned char *) key;
|
p = (unsigned char *) key;
|
||||||
|
|
|
@ -110,11 +110,10 @@ Parse Public RSA Key #1 (PKCS#8 wrapped, DER)
|
||||||
pk_parse_public_keyfile_rsa:"data_files/rsa_pkcs8_2048_public.der":0
|
pk_parse_public_keyfile_rsa:"data_files/rsa_pkcs8_2048_public.der":0
|
||||||
|
|
||||||
Parse Public RSA Key #3 (PKCS#1 wrapped)
|
Parse Public RSA Key #3 (PKCS#1 wrapped)
|
||||||
depends_on:MBEDTLS_RSA_C:MBEDTLS_PEM_PARSE_C
|
depends_on:MBEDTLS_PEM_PARSE_C
|
||||||
pk_parse_public_keyfile_rsa:"data_files/rsa_pkcs1_2048_public.pem":0
|
pk_parse_public_keyfile_rsa:"data_files/rsa_pkcs1_2048_public.pem":0
|
||||||
|
|
||||||
Parse Public RSA Key #4 (PKCS#1 wrapped, DER)
|
Parse Public RSA Key #4 (PKCS#1 wrapped, DER)
|
||||||
depends_on:MBEDTLS_RSA_C
|
|
||||||
pk_parse_public_keyfile_rsa:"data_files/rsa_pkcs1_2048_public.der":0
|
pk_parse_public_keyfile_rsa:"data_files/rsa_pkcs1_2048_public.der":0
|
||||||
|
|
||||||
Parse Public EC Key #1 (RFC 5480, DER)
|
Parse Public EC Key #1 (RFC 5480, DER)
|
||||||
|
|
Loading…
Reference in a new issue