aboutsummaryrefslogtreecommitdiff
path: root/crypto/tlscredspriv.h
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/tlscredspriv.h')
-rw-r--r--crypto/tlscredspriv.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/crypto/tlscredspriv.h b/crypto/tlscredspriv.h
index 39f1a91..df9815a 100644
--- a/crypto/tlscredspriv.h
+++ b/crypto/tlscredspriv.h
@@ -24,6 +24,51 @@
#include "crypto/tlscreds.h"
#ifdef CONFIG_GNUTLS
+#include <gnutls/gnutls.h>
+#endif
+
+struct QCryptoTLSCreds {
+ Object parent_obj;
+ char *dir;
+ QCryptoTLSCredsEndpoint endpoint;
+#ifdef CONFIG_GNUTLS
+ gnutls_dh_params_t dh_params;
+#endif
+ bool verifyPeer;
+ char *priority;
+};
+
+struct QCryptoTLSCredsAnon {
+ QCryptoTLSCreds parent_obj;
+#ifdef CONFIG_GNUTLS
+ union {
+ gnutls_anon_server_credentials_t server;
+ gnutls_anon_client_credentials_t client;
+ } data;
+#endif
+};
+
+struct QCryptoTLSCredsPSK {
+ QCryptoTLSCreds parent_obj;
+ char *username;
+#ifdef CONFIG_GNUTLS
+ union {
+ gnutls_psk_server_credentials_t server;
+ gnutls_psk_client_credentials_t client;
+ } data;
+#endif
+};
+
+struct QCryptoTLSCredsX509 {
+ QCryptoTLSCreds parent_obj;
+#ifdef CONFIG_GNUTLS
+ gnutls_certificate_credentials_t data;
+#endif
+ bool sanityCheck;
+ char *passwordid;
+};
+
+#ifdef CONFIG_GNUTLS
int qcrypto_tls_creds_get_path(QCryptoTLSCreds *creds,
const char *filename,