mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-30 05:04:14 +01:00
psa_get_domain_parameters: for RSA, if e=65537, output an empty string
This commit is contained in:
parent
b699f07af0
commit
772c8b16b4
@ -1044,6 +1044,12 @@ static psa_status_t psa_get_rsa_public_exponent(
|
|||||||
ret = mbedtls_rsa_export( rsa, NULL, NULL, NULL, NULL, &mpi );
|
ret = mbedtls_rsa_export( rsa, NULL, NULL, NULL, NULL, &mpi );
|
||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
goto exit;
|
goto exit;
|
||||||
|
if( mbedtls_mpi_cmp_int( &mpi, 65537 ) == 0 )
|
||||||
|
{
|
||||||
|
/* It's the default value, which is reported as an empty string,
|
||||||
|
* so there's nothing to do. */
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
|
||||||
buflen = mbedtls_mpi_size( &mpi );
|
buflen = mbedtls_mpi_size( &mpi );
|
||||||
buffer = mbedtls_calloc( 1, buflen );
|
buffer = mbedtls_calloc( 1, buflen );
|
||||||
|
Loading…
Reference in New Issue
Block a user