Adapt SSL record protection unit test to setup TLS 1.3 transforms

Signed-off-by: Hanno Becker <hanno.becker@arm.com>
This commit is contained in:
Hanno Becker 2020-05-28 08:29:58 +01:00
parent f93c2d7ca5
commit e683287710

View file

@ -1306,8 +1306,18 @@ static int build_transforms( mbedtls_ssl_transform *t_in,
{
case MBEDTLS_MODE_GCM:
case MBEDTLS_MODE_CCM:
t_out->fixed_ivlen = 4;
t_in->fixed_ivlen = 4;
#if defined(MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL)
if( ver == MBEDTLS_SSL_MINOR_VERSION_4 )
{
t_out->fixed_ivlen = 12;
t_in->fixed_ivlen = 12;
}
else
#endif /* MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL */
{
t_out->fixed_ivlen = 4;
t_in->fixed_ivlen = 4;
}
t_out->maclen = 0;
t_in->maclen = 0;
switch( tag_mode )