summaryrefslogtreecommitdiffstats
path: root/ssl/tls13_enc.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2020-06-10 13:36:38 -0700
committerMatt Caswell <matt@openssl.org>2020-08-31 09:34:19 +0100
commit3e5826061baa7948ab1d2835357403d16470108d (patch)
treef4c54cc831099ef7536ee41f525c25d38a059f4a /ssl/tls13_enc.c
parentc34ca13a60f2acb4509be0aec9f506853ffbd1ea (diff)
Add helper functions for FreeBSD KTLS.
These are similar to the helpers added in 95badfeb60. I've adjusted the arguments passed to ktls_check_supported_cipher and ktls_configure_crypto so that FreeBSD and Linux can both use the same signature to avoid OS-specific #ifdef's in libssl. This also required moving the check on valid TLS versions into ktls_check_supported_cipher for Linux. This has largely removed OS-specific code and OS-specific #ifdef's for KTLS outside of <internal/ktls.h>. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12111)
Diffstat (limited to 'ssl/tls13_enc.c')
-rw-r--r--ssl/tls13_enc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ssl/tls13_enc.c b/ssl/tls13_enc.c
index 75034f5179..714ffbff41 100644
--- a/ssl/tls13_enc.c
+++ b/ssl/tls13_enc.c
@@ -798,7 +798,7 @@ int tls13_change_cipher_state(SSL *s, int which)
goto skip_ktls;
/* check that cipher is supported */
- if (!ktls_check_supported_cipher(cipher, ciph_ctx))
+ if (!ktls_check_supported_cipher(s, cipher, ciph_ctx))
goto skip_ktls;
bio = s->wbio;
@@ -814,9 +814,9 @@ int tls13_change_cipher_state(SSL *s, int which)
goto skip_ktls;
/* configure kernel crypto structure */
- if (!ktls_configure_crypto(cipher, s->version, ciph_ctx,
+ if (!ktls_configure_crypto(s, cipher, ciph_ctx,
RECORD_LAYER_get_write_sequence(&s->rlayer),
- &crypto_info, NULL, iv, key))
+ &crypto_info, NULL, iv, key, NULL, 0))
goto skip_ktls;
/* ktls works with user provided buffers directly */