summaryrefslogtreecommitdiff
path: root/include/internal
diff options
context:
space:
mode:
authorVadim Fedorenko <vadimjunk@gmail.com>2020-01-24 16:11:02 +0300
committerMatt Caswell <matt@openssl.org>2020-06-08 11:13:52 +0100
commit996a6ac32bc4dd02098b68445b71f8fa286ef91b (patch)
tree397be5250dc5d9ff18db8e77e91220ad9758804a /include/internal
parentc8636ebf4a951447754d446810349618ddc77a60 (diff)
downloadopenssl-new-996a6ac32bc4dd02098b68445b71f8fa286ef91b.tar.gz
kTLS: make ktls_start type independed
Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11589)
Diffstat (limited to 'include/internal')
-rw-r--r--include/internal/ktls.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/include/internal/ktls.h b/include/internal/ktls.h
index 209dff1689..62343b1495 100644
--- a/include/internal/ktls.h
+++ b/include/internal/ktls.h
@@ -40,12 +40,12 @@ static ossl_inline int ktls_enable(int fd)
* provided here.
*/
static ossl_inline int ktls_start(int fd,
- struct tls_enable *tls_en,
+ void *tls_en,
size_t len, int is_tx)
{
if (is_tx)
return setsockopt(fd, IPPROTO_TCP, TCP_TXTLS_ENABLE,
- tls_en, sizeof(*tls_en)) ? 0 : 1;
+ tls_en, len) ? 0 : 1;
else
return 0;
}
@@ -152,9 +152,8 @@ static ossl_inline int ktls_enable(int fd)
return 0;
}
-static ossl_inline int ktls_start(int fd,
- struct tls12_crypto_info_aes_gcm_128
- *crypto_info, size_t len, int is_tx)
+static ossl_inline int ktls_start(int fd, void *crypto_info,
+ size_t len, int is_tx)
{
return 0;
}
@@ -216,12 +215,11 @@ static ossl_inline int ktls_enable(int fd)
* If successful, then data received using this socket will be decrypted,
* authenticated and decapsulated using the crypto_info provided here.
*/
-static ossl_inline int ktls_start(int fd,
- struct tls12_crypto_info_aes_gcm_128
- *crypto_info, size_t len, int is_tx)
+static ossl_inline int ktls_start(int fd, void *crypto_info,
+ size_t len, int is_tx)
{
return setsockopt(fd, SOL_TLS, is_tx ? TLS_TX : TLS_RX,
- crypto_info, sizeof(*crypto_info)) ? 0 : 1;
+ crypto_info, len) ? 0 : 1;
}
/*