diff options
-rw-r--r-- | crypto/bio/bss_conn.c | 14 | ||||
-rw-r--r-- | crypto/bio/bss_sock.c | 9 |
2 files changed, 8 insertions, 15 deletions
diff --git a/crypto/bio/bss_conn.c b/crypto/bio/bss_conn.c index 6cff2a99ac..79e31f80bf 100644 --- a/crypto/bio/bss_conn.c +++ b/crypto/bio/bss_conn.c @@ -377,11 +377,8 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr) long ret = 1; BIO_CONNECT *data; # ifndef OPENSSL_NO_KTLS -# ifdef __FreeBSD__ - struct tls_enable *crypto_info; -# else - struct tls12_crypto_info_aes_gcm_128 *crypto_info; -# endif + size_t crypto_info_len; + ktls_crypto_info_t *crypto_info; # endif data = (BIO_CONNECT *)b->ptr; @@ -544,12 +541,13 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr) break; # ifndef OPENSSL_NO_KTLS case BIO_CTRL_SET_KTLS: + crypto_info = (ktls_crypto_info_t *)ptr; # ifdef __FreeBSD__ - crypto_info = (struct tls_enable *)ptr; + crypto_info_len = sizeof(*crypto_info); # else - crypto_info = (struct tls12_crypto_info_aes_gcm_128 *)ptr; + crypto_info_len = crypto_info->tls_crypto_info_len; # endif - ret = ktls_start(b->num, crypto_info, sizeof(*crypto_info), num); + ret = ktls_start(b->num, crypto_info, crypto_info_len, num); if (ret) BIO_set_ktls_flag(b, num); break; diff --git a/crypto/bio/bss_sock.c b/crypto/bio/bss_sock.c index ff2bde7a58..6c6c610b0e 100644 --- a/crypto/bio/bss_sock.c +++ b/crypto/bio/bss_sock.c @@ -155,11 +155,7 @@ static long sock_ctrl(BIO *b, int cmd, long num, void *ptr) int *ip; # ifndef OPENSSL_NO_KTLS size_t crypto_info_len; -# ifdef __FreeBSD__ - struct tls_enable *crypto_info; -# else - struct tls_crypto_info_all *crypto_info; -# endif + ktls_crypto_info_t *crypto_info; # endif switch (cmd) { @@ -190,11 +186,10 @@ static long sock_ctrl(BIO *b, int cmd, long num, void *ptr) break; # ifndef OPENSSL_NO_KTLS case BIO_CTRL_SET_KTLS: + crypto_info = (ktls_crypto_info_t *)ptr; # ifdef __FreeBSD__ - crypto_info = (struct tls_enable *)ptr; crypto_info_len = sizeof(*crypto_info); # else - crypto_info = (struct tls_crypto_info_all *)ptr; crypto_info_len = crypto_info->tls_crypto_info_len; # endif ret = ktls_start(b->num, crypto_info, crypto_info_len, num); |