aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2020-07-24 13:47:35 -0700
committerMatt Caswell <matt@openssl.org>2020-08-31 09:34:19 +0100
commitc34ca13a60f2acb4509be0aec9f506853ffbd1ea (patch)
tree123b7cd5ebd0450349953cb68699c837f87063ed
parent23e77b0ba328afe3492d990cd24f7b8896b4246f (diff)
downloadopenssl-c34ca13a60f2acb4509be0aec9f506853ffbd1ea.zip
openssl-c34ca13a60f2acb4509be0aec9f506853ffbd1ea.tar.gz
openssl-c34ca13a60f2acb4509be0aec9f506853ffbd1ea.tar.bz2
Add a ktls_crypto_info_t typedef.
This type is defined to hold the OS-specific structure passed to BIO_set_ktls. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12111)
-rw-r--r--include/internal/ktls.h5
-rw-r--r--ssl/t1_enc.c6
-rw-r--r--ssl/tls13_enc.c2
3 files changed, 8 insertions, 5 deletions
diff --git a/include/internal/ktls.h b/include/internal/ktls.h
index 535e563..a9b1c74 100644
--- a/include/internal/ktls.h
+++ b/include/internal/ktls.h
@@ -37,6 +37,8 @@
*/
# define TLS_CIPHER_AES_GCM_128_REC_SEQ_SIZE 8
+typedef struct tls_enable ktls_crypto_info_t;
+
/*
* FreeBSD does not require any additional steps to enable KTLS before
* setting keys.
@@ -173,6 +175,9 @@ struct tls_crypto_info_all {
};
size_t tls_crypto_info_len;
};
+
+typedef struct tls_crypto_info_all ktls_crypto_info_t;
+
/*
* When successful, this socket option doesn't change the behaviour of the
* TCP socket, except changing the TCP setsockopt handler to enable the
diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c
index 2e46187..5ccf2e2 100644
--- a/ssl/t1_enc.c
+++ b/ssl/t1_enc.c
@@ -192,10 +192,8 @@ int tls1_change_cipher_state(SSL *s, int which)
size_t n, i, j, k, cl;
int reuse_dd = 0;
#ifndef OPENSSL_NO_KTLS
-# ifdef __FreeBSD__
- struct tls_enable crypto_info;
-# else
- struct tls_crypto_info_all crypto_info;
+ ktls_crypto_info_t crypto_info;
+# ifndef __FreeBSD__
unsigned char *rec_seq;
void *rl_sequence;
# ifndef OPENSSL_NO_KTLS_RX
diff --git a/ssl/tls13_enc.c b/ssl/tls13_enc.c
index ba385f6..75034f5 100644
--- a/ssl/tls13_enc.c
+++ b/ssl/tls13_enc.c
@@ -517,7 +517,7 @@ int tls13_change_cipher_state(SSL *s, int which)
const EVP_CIPHER *cipher = NULL;
#if !defined(OPENSSL_NO_KTLS) && defined(OPENSSL_KTLS_TLS13)
# ifndef __FreeBSD__
- struct tls_crypto_info_all crypto_info;
+ ktls_crypto_info_t crypto_info;
BIO *bio;
# endif
#endif