summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorHannes Reinecke <hare@kernel.org>2025-07-01 16:46:57 +0200
committerPaolo Abeni <pabeni@redhat.com>2025-07-08 15:31:44 +0200
commite22da4685013922ade8e7b5e727ac6804fe5b51e (patch)
tree62569e37e6a2b6fa3deea5add9d9c82db85119b5 /net
parent5d288658eec1a2e00ccd231d2b336eed58c0e5c2 (diff)
net/handshake: Add new parameter 'HANDSHAKE_A_ACCEPT_KEYRING'
Add a new netlink parameter 'HANDSHAKE_A_ACCEPT_KEYRING' to provide the serial number of the keyring to use. Signed-off-by: Hannes Reinecke <hare@kernel.org> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Acked-by: Jakub Kicinski <kuba@kernel.org> Link: https://patch.msgid.link/20250701144657.104401-1-hare@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net')
-rw-r--r--net/handshake/tlshd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/handshake/tlshd.c b/net/handshake/tlshd.c
index d6f52839827e..081093dfd553 100644
--- a/net/handshake/tlshd.c
+++ b/net/handshake/tlshd.c
@@ -230,6 +230,12 @@ static int tls_handshake_accept(struct handshake_req *req,
if (ret < 0)
goto out_cancel;
}
+ if (treq->th_keyring) {
+ ret = nla_put_u32(msg, HANDSHAKE_A_ACCEPT_KEYRING,
+ treq->th_keyring);
+ if (ret < 0)
+ goto out_cancel;
+ }
ret = nla_put_u32(msg, HANDSHAKE_A_ACCEPT_AUTH_MODE,
treq->th_auth_mode);