test: ssl: Enable client authentication in handshake state tests
The endpoint initialization function was setting up a certificate but the client certificate was not used because client authentication was not enabled (not enabled in the default SSL server configuration). Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
209cae9c42
commit
bdddaef9bb
@ -238,11 +238,11 @@ move_handshake_to_state:MBEDTLS_SSL_IS_SERVER:MBEDTLS_SSL_ENCRYPTED_EXTENSIONS:1
|
||||
|
||||
TLS 1.3:Test moving clients handshake to state: CLIENT_CERTIFICATE_VERIFY
|
||||
depends_on:MBEDTLS_SSL_PROTO_TLS1_3:!MBEDTLS_SSL_PROTO_TLS1_2
|
||||
move_handshake_to_state:MBEDTLS_SSL_IS_CLIENT:MBEDTLS_SSL_CLIENT_CERTIFICATE_VERIFY:0
|
||||
move_handshake_to_state:MBEDTLS_SSL_IS_CLIENT:MBEDTLS_SSL_CLIENT_CERTIFICATE_VERIFY:1
|
||||
|
||||
TLS 1.3:Test moving servers handshake to state: CLIENT_CERTIFICATE_VERIFY
|
||||
depends_on:MBEDTLS_SSL_PROTO_TLS1_3:!MBEDTLS_SSL_PROTO_TLS1_2
|
||||
move_handshake_to_state:MBEDTLS_SSL_IS_SERVER:MBEDTLS_SSL_CLIENT_CERTIFICATE_VERIFY:0
|
||||
move_handshake_to_state:MBEDTLS_SSL_IS_SERVER:MBEDTLS_SSL_CLIENT_CERTIFICATE_VERIFY:1
|
||||
|
||||
Handshake, tls1_2
|
||||
depends_on:MBEDTLS_SSL_PROTO_TLS1_2
|
||||
|
@ -967,6 +967,8 @@ int mbedtls_endpoint_init( mbedtls_endpoint *ep, int endpoint_type, int pk_alg,
|
||||
if( group_list != NULL )
|
||||
mbedtls_ssl_conf_groups( &(ep->conf), group_list );
|
||||
|
||||
mbedtls_ssl_conf_authmode( &( ep->conf ), MBEDTLS_SSL_VERIFY_REQUIRED );
|
||||
|
||||
ret = mbedtls_ssl_setup( &( ep->ssl ), &( ep->conf ) );
|
||||
TEST_ASSERT( ret == 0 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user