37 lines
1.1 KiB
Diff
37 lines
1.1 KiB
Diff
From 945c2f10eeda441f32404d1328761e311915add0 Mon Sep 17 00:00:00 2001
|
|
From: Daiki Ueno <ueno@gnu.org>
|
|
Date: Tue, 23 Jan 2024 11:54:32 +0900
|
|
Subject: [PATCH] ktls: fix kernel version checking using utsname
|
|
|
|
Signed-off-by: Daiki Ueno <ueno@gnu.org>
|
|
---
|
|
lib/system/ktls.c | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/lib/system/ktls.c b/lib/system/ktls.c
|
|
index 8efb913cda..432c70c5a2 100644
|
|
--- a/lib/system/ktls.c
|
|
+++ b/lib/system/ktls.c
|
|
@@ -482,7 +482,7 @@ int _gnutls_ktls_set_keys(gnutls_session_t session,
|
|
return GNUTLS_E_INTERNAL_ERROR;
|
|
}
|
|
|
|
- if (strcmp(utsname.sysname, "Linux") == 0) {
|
|
+ if (strcmp(utsname.sysname, "Linux") != 0) {
|
|
return GNUTLS_E_INTERNAL_ERROR;
|
|
}
|
|
|
|
@@ -495,6 +495,9 @@ int _gnutls_ktls_set_keys(gnutls_session_t session,
|
|
return GNUTLS_E_INTERNAL_ERROR;
|
|
}
|
|
|
|
+ _gnutls_debug_log("Linux kernel version %lu.%lu has been detected\n",
|
|
+ major, minor);
|
|
+
|
|
/* setsockopt(SOL_TLS, TLS_RX) support added in 5.10 */
|
|
if (major < 5 || (major == 5 && minor < 10)) {
|
|
return GNUTLS_E_UNIMPLEMENTED_FEATURE;
|
|
--
|
|
2.43.0
|
|
|