mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-06-02 02:01:43 +03:00
Initialize PSA to fix move_handshake_to_state when USE_PSA is enabled
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
parent
537e915a6e
commit
06baf04870
@ -4862,13 +4862,15 @@ exit:
|
|||||||
}
|
}
|
||||||
/* END_CASE */
|
/* END_CASE */
|
||||||
|
|
||||||
/* BEGIN_CASE depends_on:MBEDTLS_X509_CRT_PARSE_C:MBEDTLS_RSA_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED:!MBEDTLS_USE_PSA_CRYPTO:!MBEDTLS_SSL_PROTO_TLS1_3:MBEDTLS_PKCS1_V15:MBEDTLS_ENTROPY_C:MBEDTLS_ENTROPY_C:MBEDTLS_CTR_DRBG_C */
|
/* BEGIN_CASE depends_on:MBEDTLS_X509_CRT_PARSE_C:MBEDTLS_RSA_C:MBEDTLS_ECP_DP_SECP384R1_ENABLED:!MBEDTLS_SSL_PROTO_TLS1_3:MBEDTLS_PKCS1_V15:MBEDTLS_ENTROPY_C:MBEDTLS_ENTROPY_C:MBEDTLS_CTR_DRBG_C */
|
||||||
void move_handshake_to_state(int endpoint_type, int state, int need_pass)
|
void move_handshake_to_state(int endpoint_type, int state, int need_pass)
|
||||||
{
|
{
|
||||||
enum { BUFFSIZE = 1024 };
|
enum { BUFFSIZE = 1024 };
|
||||||
mbedtls_endpoint base_ep, second_ep;
|
mbedtls_endpoint base_ep, second_ep;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
|
USE_PSA_INIT( );
|
||||||
|
|
||||||
ret = mbedtls_endpoint_init( &base_ep, endpoint_type, MBEDTLS_PK_RSA,
|
ret = mbedtls_endpoint_init( &base_ep, endpoint_type, MBEDTLS_PK_RSA,
|
||||||
NULL, NULL, NULL );
|
NULL, NULL, NULL );
|
||||||
TEST_ASSERT( ret == 0 );
|
TEST_ASSERT( ret == 0 );
|
||||||
@ -4901,6 +4903,7 @@ void move_handshake_to_state(int endpoint_type, int state, int need_pass)
|
|||||||
exit:
|
exit:
|
||||||
mbedtls_endpoint_free( &base_ep, NULL );
|
mbedtls_endpoint_free( &base_ep, NULL );
|
||||||
mbedtls_endpoint_free( &second_ep, NULL );
|
mbedtls_endpoint_free( &second_ep, NULL );
|
||||||
|
USE_PSA_DONE( );
|
||||||
}
|
}
|
||||||
/* END_CASE */
|
/* END_CASE */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user