Browse Source

crypto: make TLS credentials structs private

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>
pull/307/head
Daniel P. Berrangé 9 months ago
parent
commit
fac244b019
  1. 5
      crypto/tlscredsanon.c
  2. 15
      crypto/tlscredspriv.h
  3. 5
      crypto/tlscredspsk.c
  4. 6
      crypto/tlscredsx509.c

5
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)

15
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,

5
crypto/tlscredspsk.c

@ -27,6 +27,11 @@
#include "trace.h"
struct QCryptoTLSCredsPSK {
QCryptoTLSCreds parent_obj;
char *username;
};
#ifdef CONFIG_GNUTLS
#include <gnutls/gnutls.h>

6
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>

Loading…
Cancel
Save