aboutsummaryrefslogtreecommitdiffstats
path: root/test/tls13encryptiontest.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2022-11-14 14:19:53 +0000
committerMatt Caswell <matt@openssl.org>2023-01-24 17:16:29 +0000
commit3f9175c7a46b13a3528d9b5776030a78eb1f9454 (patch)
treed114752dce6626fe749c8bec4b8721424c701461 /test/tls13encryptiontest.c
parentbea8d70498c9ad0e2cca3652c748d327be7b841e (diff)
downloadopenssl-3f9175c7a46b13a3528d9b5776030a78eb1f9454.tar.gz
Extend the new_record_layer function
Add the ability to pass the main secret and length, as well as the digest used for the KDF. Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19748)
Diffstat (limited to 'test/tls13encryptiontest.c')
-rw-r--r--test/tls13encryptiontest.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/tls13encryptiontest.c b/test/tls13encryptiontest.c
index 1529e1b1ba..cecbb4296b 100644
--- a/test/tls13encryptiontest.c
+++ b/test/tls13encryptiontest.c
@@ -335,10 +335,11 @@ static int test_tls13_encryption(void)
if (!TEST_true(ossl_tls_record_method.new_record_layer(
NULL, NULL, TLS1_3_VERSION, OSSL_RECORD_ROLE_SERVER,
OSSL_RECORD_DIRECTION_WRITE,
- OSSL_RECORD_PROTECTION_LEVEL_APPLICATION, 0, key, 16,
- iv, ivlen, NULL, 0, EVP_aes_128_gcm(),
+ OSSL_RECORD_PROTECTION_LEVEL_APPLICATION, 0, NULL, 0,
+ key, 16, iv, ivlen, NULL, 0, EVP_aes_128_gcm(),
EVP_GCM_TLS_TAG_LEN, 0, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, &wrl)))
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ &wrl)))
goto err;
memcpy(wrl->sequence, seqbuf, sizeof(seqbuf));
@@ -357,10 +358,11 @@ static int test_tls13_encryption(void)
if (!TEST_true(ossl_tls_record_method.new_record_layer(
NULL, NULL, TLS1_3_VERSION, OSSL_RECORD_ROLE_SERVER,
OSSL_RECORD_DIRECTION_READ,
- OSSL_RECORD_PROTECTION_LEVEL_APPLICATION, 0, key, 16,
- iv, ivlen, NULL, 0, EVP_aes_128_gcm(),
+ OSSL_RECORD_PROTECTION_LEVEL_APPLICATION, 0, NULL, 0,
+ key, 16, iv, ivlen, NULL, 0, EVP_aes_128_gcm(),
EVP_GCM_TLS_TAG_LEN, 0, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, &rrl)))
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ &rrl)))
goto err;
memcpy(rrl->sequence, seqbuf, sizeof(seqbuf));