Support RSA Opaque PK keys in ssl_server2
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
parent
6c242a01f7
commit
f0b1271a42
@ -2562,7 +2562,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 )
|
||||
@ -2573,7 +2574,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 )
|
||||
|
Loading…
Reference in New Issue
Block a user