import CS ktls-utils-0.11-2.el9

This commit is contained in:
eabdullin 2025-03-11 07:33:36 +00:00
parent ae74480538
commit 3a6cd9870d
3 changed files with 56 additions and 2 deletions

View File

@ -0,0 +1,43 @@
From 311d9438b984e3b2a36bd88fb3ab8c87c38701fa Mon Sep 17 00:00:00 2001
From: Daniel Wagner <wagi@monom.org>
Date: Thu, 24 Oct 2024 13:15:44 +0200
Subject: [PATCH] tlshd: always link .nvme default keyring into the session
A common use case for tlshd is to authenticate TLS sessions for the nvme
subsystem. Currently, the user has to explicitly list a keyring (even
the defautl one) in the configuration file so that tlshd running
as daemon (started via systemd) to find any key.
Thus always link the default .nvme keyring into the current session,
which makes the daemon work out of the box for default configurations.
Signed-off-by: Daniel Wagner <wagi@monom.org>
---
src/tlshd/config.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/tlshd/config.c b/src/tlshd/config.c
index fae83b3..8becbe0 100644
--- a/src/tlshd/config.c
+++ b/src/tlshd/config.c
@@ -91,10 +91,17 @@ bool tlshd_config_init(const gchar *pathname)
"keyrings", &length, NULL);
if (keyrings) {
for (i = 0; i < length; i++) {
+ if (!strcmp(keyrings[i], ".nvme"))
+ continue;
tlshd_keyring_link_session(keyrings[i]);
}
g_strfreev(keyrings);
}
+ /*
+ * Always link the default nvme subsystem keyring into the
+ * session.
+ */
+ tlshd_keyring_link_session(".nvme");
return true;
}
--
2.47.1

View File

@ -3,7 +3,7 @@
Name: ktls-utils
Version: %{baseversion}
Release: 1%{?dist}
Release: 2%{?dist}
Summary: TLS handshake agent for kernel sockets
%forgemeta
@ -14,6 +14,11 @@ URL: %{forgeurl}
# FIXME: is this a bug in the tagging scheme or forgesource macro?
Source0: %{forgeurl}/releases/download/%{name}-%{baseversion}/%{name}-%{baseversion}.tar.gz
#
# RHEL-9.6
#
Patch001: ktls-utils-0.11-nvme-default-keyring.patch
BuildRequires: bash systemd-rpm-macros
BuildRequires: gcc make coreutils
BuildRequires: pkgconfig(gnutls) >= 3.3.0
@ -66,7 +71,13 @@ standard kTLS socket options.
%systemd_postun_with_restart tlshd.service
%changelog
* Mon Jun 17 2024 Steve Dickson <steved@redhat.com> 0.11-1
* Wed Feb 12 2025 Scott Mayhew <smayhew@redhat.com> 0.11-2
- Bump release to satisfy the errata automation
* Tue Feb 04 2025 Steve Dickson <steved@redhat.com> 0.11-1
- tlshd: link .nvme default keyring into the session (RHEL-71505)
* Mon Jun 17 2024 Steve Dickson <steved@redhat.com> 0.11-0
- Release ktls-utils 0.11 (RHEL-39442)
* Thu Feb 29 2024 Steve Dickson <steved@redhat.com> 0.10-0