ssl_client2/ssl_server_2: use PSA_ALG_ANY_HASH as algorithm for opaque key

Signed-off-by: Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
Przemyslaw Stekiel 2021-10-26 12:21:45 +02:00
parent 8132c2ff46
commit c2d2f217fb
2 changed files with 3 additions and 3 deletions

View File

@ -1692,7 +1692,7 @@ int main( int argc, char *argv[] )
if( opt.key_opaque != 0 )
{
if( ( ret = mbedtls_pk_wrap_as_opaque( &pkey, &key_slot,
PSA_ALG_SHA_256 ) ) != 0 )
PSA_ALG_ANY_HASH ) ) != 0 )
{
mbedtls_printf( " failed\n ! "
"mbedtls_pk_wrap_as_opaque returned -0x%x\n\n", (unsigned int) -ret );

View File

@ -2502,7 +2502,7 @@ int main( int argc, char *argv[] )
if ( mbedtls_pk_get_type( &pkey ) == MBEDTLS_PK_ECKEY )
{
if( ( ret = mbedtls_pk_wrap_as_opaque( &pkey, &key_slot,
PSA_ALG_SHA_256 ) ) != 0 )
PSA_ALG_ANY_HASH ) ) != 0 )
{
mbedtls_printf( " failed\n ! "
"mbedtls_pk_wrap_as_opaque returned -0x%x\n\n", (unsigned int) -ret );
@ -2513,7 +2513,7 @@ int main( int argc, char *argv[] )
if ( mbedtls_pk_get_type( &pkey2 ) == MBEDTLS_PK_ECKEY )
{
if( ( ret = mbedtls_pk_wrap_as_opaque( &pkey2, &key_slot2,
PSA_ALG_SHA_256 ) ) != 0 )
PSA_ALG_ANY_HASH ) ) != 0 )
{
mbedtls_printf( " failed\n ! "
"mbedtls_pk_wrap_as_opaque returned -0x%x\n\n", (unsigned int) -ret );