1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

Merge pull request #5709 from superna9999/5625-pk-opaque-rsa-tls12

RSA sign 3b: TLS 1.2 integration testing
This commit is contained in:
Manuel Pégourié-Gonnard
2022-04-22 10:05:43 +02:00
committed by GitHub
2 changed files with 130 additions and 8 deletions

View File

@ -2575,7 +2575,8 @@ int main( int argc, char *argv[] )
#if defined(MBEDTLS_USE_PSA_CRYPTO)
if( opt.key_opaque != 0 )
{
if ( mbedtls_pk_get_type( &pkey ) == MBEDTLS_PK_ECKEY )
if ( mbedtls_pk_get_type( &pkey ) == MBEDTLS_PK_ECKEY ||
mbedtls_pk_get_type( &pkey ) == MBEDTLS_PK_RSA )
{
if( ( ret = mbedtls_pk_wrap_as_opaque( &pkey, &key_slot,
PSA_ALG_ANY_HASH ) ) != 0 )
@ -2586,7 +2587,8 @@ int main( int argc, char *argv[] )
}
}
if ( mbedtls_pk_get_type( &pkey2 ) == MBEDTLS_PK_ECKEY )
if ( mbedtls_pk_get_type( &pkey2 ) == MBEDTLS_PK_ECKEY ||
mbedtls_pk_get_type( &pkey2 ) == MBEDTLS_PK_RSA )
{
if( ( ret = mbedtls_pk_wrap_as_opaque( &pkey2, &key_slot2,
PSA_ALG_ANY_HASH ) ) != 0 )