On Thu, Oct 30, 2025 at 6:50 PM Daniel P. Berrangé <[email protected]>
wrote:

> Now that the TLS session code no longer needs to look at the TLS
> credential structs, they can be made private.
>
> Signed-off-by: Daniel P. Berrangé <[email protected]>
>

Reviewed-by: Marc-André Lureau <[email protected]>


> ---
>  crypto/tlscredsanon.c |  3 +++
>  crypto/tlscredspriv.h | 15 ---------------
>  crypto/tlscredspsk.c  |  5 +++++
>  crypto/tlscredsx509.c |  6 ++++++
>  4 files changed, 14 insertions(+), 15 deletions(-)
>
> diff --git a/crypto/tlscredsanon.c b/crypto/tlscredsanon.c
> index 0a728ccbf6..69ed1d792a 100644
> --- a/crypto/tlscredsanon.c
> +++ b/crypto/tlscredsanon.c
> @@ -31,6 +31,9 @@
>
>  #include <gnutls/gnutls.h>
>
> +struct QCryptoTLSCredsAnon {
> +    QCryptoTLSCreds parent_obj;
> +};
>
>  static int
>  qcrypto_tls_creds_anon_load(QCryptoTLSCredsAnon *creds,
> 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..e437985260 100644
> --- a/crypto/tlscredspsk.c
> +++ b/crypto/tlscredspsk.c
> @@ -31,6 +31,11 @@
>
>  #include <gnutls/gnutls.h>
>
> +struct QCryptoTLSCredsPSK {
> +    QCryptoTLSCreds parent_obj;
> +    char *username;
> +};
> +
>  static int
>  lookup_key(const char *pskfile, const char *username, gnutls_datum_t *key,
>             Error **errp)
> diff --git a/crypto/tlscredsx509.c b/crypto/tlscredsx509.c
> index ef31ea664c..2fc0872627 100644
> --- a/crypto/tlscredsx509.c
> +++ b/crypto/tlscredsx509.c
> @@ -33,6 +33,12 @@
>  #include <gnutls/gnutls.h>
>  #include <gnutls/x509.h>
>
> +struct QCryptoTLSCredsX509 {
> +    QCryptoTLSCreds parent_obj;
> +    bool sanityCheck;
> +    char *passwordid;
> +};
> +
>
>  static int
>  qcrypto_tls_creds_check_cert_times(gnutls_x509_crt_t cert,
> --
> 2.51.1
>
>

Reply via email to