qemu-kvm/kvm-crypto-make-TLS-credentials-structs-private.patch
Miroslav Rezanina e880766b3c Reset to RHEL
Resolves: VOYAGER-1263
2026-07-10 10:35:27 +02:00

110 lines
2.8 KiB
Diff

From 9d646bf156d87b6b267b2e3bda3a9ddc90b76e55 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
Date: Wed, 29 Oct 2025 15:24:25 +0000
Subject: [PATCH 22/30] crypto: make TLS credentials structs private
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
RH-Author: Daniel P. Berrangé <berrange@redhat.com>
RH-MergeRequest: 460: crypto: changes to support multiple certificates for PQC
RH-Jira: RHEL-111934
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
RH-Commit: [21/27] dcbf85f9e9c241de0af69823bac7ac8d9d5a5580 (berrange/centos-src-qemu)
Now that the TLS session code no longer needs to look at the TLS
credential structs, they can be made private.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
(cherry picked from commit fac244b0190bbffa7ff6811549ff1cea1ecbb3a1)
---
crypto/tlscredsanon.c | 5 ++++-
crypto/tlscredspriv.h | 15 ---------------
crypto/tlscredspsk.c | 5 +++++
crypto/tlscredsx509.c | 6 ++++++
4 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/crypto/tlscredsanon.c b/crypto/tlscredsanon.c
index 0a728ccbf6..646574d6ae 100644
--- a/crypto/tlscredsanon.c
+++ b/crypto/tlscredsanon.c
@@ -27,11 +27,14 @@
#include "trace.h"
+struct QCryptoTLSCredsAnon {
+ QCryptoTLSCreds parent_obj;
+};
+
#ifdef CONFIG_GNUTLS
#include <gnutls/gnutls.h>
-
static int
qcrypto_tls_creds_anon_load(QCryptoTLSCredsAnon *creds,
Error **errp)
diff --git a/crypto/tlscredspriv.h b/crypto/tlscredspriv.h
index 4e6dffa22f..69dac02437 100644
--- a/crypto/tlscredspriv.h
+++ b/crypto/tlscredspriv.h
@@ -37,21 +37,6 @@ struct QCryptoTLSCreds {
QCryptoTLSCredsBox *box;
};
-struct QCryptoTLSCredsAnon {
- QCryptoTLSCreds parent_obj;
-};
-
-struct QCryptoTLSCredsPSK {
- QCryptoTLSCreds parent_obj;
- char *username;
-};
-
-struct QCryptoTLSCredsX509 {
- QCryptoTLSCreds parent_obj;
- bool sanityCheck;
- char *passwordid;
-};
-
#ifdef CONFIG_GNUTLS
int qcrypto_tls_creds_get_path(QCryptoTLSCreds *creds,
diff --git a/crypto/tlscredspsk.c b/crypto/tlscredspsk.c
index 5568f1ad0c..8879c84ea7 100644
--- a/crypto/tlscredspsk.c
+++ b/crypto/tlscredspsk.c
@@ -27,6 +27,11 @@
#include "trace.h"
+struct QCryptoTLSCredsPSK {
+ QCryptoTLSCreds parent_obj;
+ char *username;
+};
+
#ifdef CONFIG_GNUTLS
#include <gnutls/gnutls.h>
diff --git a/crypto/tlscredsx509.c b/crypto/tlscredsx509.c
index 388ddb7f0e..397ff4caa9 100644
--- a/crypto/tlscredsx509.c
+++ b/crypto/tlscredsx509.c
@@ -28,6 +28,12 @@
#include "trace.h"
+struct QCryptoTLSCredsX509 {
+ QCryptoTLSCreds parent_obj;
+ bool sanityCheck;
+ char *passwordid;
+};
+
#ifdef CONFIG_GNUTLS
#include <gnutls/gnutls.h>
--
2.52.0