- kvm-net-tap-linux.c-avoid-abort-when-setting-invalid-fd.patch [RHEL-113894] - kvm-crypto-only-verify-CA-certs-in-chain-of-trust.patch [RHEL-111934] - kvm-crypto-remove-extraneous-pointer-usage-in-gnutls-cer.patch [RHEL-111934] - kvm-crypto-fix-error-reporting-in-cert-chain-checks.patch [RHEL-111934] - kvm-crypto-allow-client-server-cert-chains.patch [RHEL-111934] - kvm-crypto-stop-requiring-key-encipherment-usage-in-x509.patch [RHEL-111934] - kvm-crypto-switch-to-newer-gnutls-API-for-distinguished-.patch [RHEL-111934] - kvm-crypto-remove-redundant-parameter-checking-CA-certs.patch [RHEL-111934] - kvm-crypto-add-missing-free-of-certs-array.patch [RHEL-111934] - kvm-crypto-replace-stat-with-access-for-credential-check.patch [RHEL-111934] - kvm-crypto-remove-redundant-access-checks-before-loading.patch [RHEL-111934] - kvm-crypto-move-check-for-TLS-creds-dir-property.patch [RHEL-111934] - kvm-crypto-use-g_autofree-when-loading-x509-credentials.patch [RHEL-111934] - kvm-crypto-remove-needless-indirection-via-parent_obj-fi.patch [RHEL-111934] - kvm-crypto-move-release-of-DH-parameters-into-TLS-creds-.patch [RHEL-111934] - kvm-crypto-shorten-the-endpoint-server-check-in-TLS-cred.patch [RHEL-111934] - kvm-crypto-remove-duplication-loading-x509-CA-cert.patch [RHEL-111934] - kvm-crypto-reduce-duplication-in-handling-TLS-priority-s.patch [RHEL-111934] - kvm-crypto-introduce-method-for-reloading-TLS-creds.patch [RHEL-111934] - kvm-crypto-introduce-a-wrapper-around-gnutls-credentials.patch [RHEL-111934] - kvm-crypto-fix-lifecycle-handling-of-gnutls-credentials-.patch [RHEL-111934] - kvm-crypto-make-TLS-credentials-structs-private.patch [RHEL-111934] - kvm-crypto-deprecate-use-of-external-dh-params.pem-file.patch [RHEL-111934] - kvm-crypto-avoid-loading-the-CA-certs-twice.patch [RHEL-111934] - kvm-crypto-avoid-loading-the-identity-certs-twice.patch [RHEL-111934] - kvm-crypto-expand-logic-to-cope-with-multiple-certificat.patch [RHEL-111934] - kvm-crypto-support-upto-5-parallel-certificate-identitie.patch [RHEL-111934] - kvm-docs-creation-of-x509-certs-compliant-with-post-quan.patch [RHEL-111934] - kvm-iommufd-Introduce-handler-for-device-ATS-support.patch [RHEL-184675] - kvm-vfio-pci-Add-ats-property.patch [RHEL-184675] - Resolves: RHEL-113894 ([RHEL.10.2][virual network] Hit qemu coredump when removed an interface that the guest is using from the host) - Resolves: RHEL-111934 (QEMU support for loading multiple sets of x509 certs for PQC hybrid mode) - Resolves: RHEL-184675 (NVIDIA:Backport vfio/pci: add vfio-pci ATS control property - RHEL 10.3)
110 lines
2.8 KiB
Diff
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
|
|
|