diff options
Diffstat (limited to 'lib/auth_cert.h')
-rw-r--r-- | lib/auth_cert.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/auth_cert.h b/lib/auth_cert.h index 94085ca53d..3e26c21207 100644 --- a/lib/auth_cert.h +++ b/lib/auth_cert.h @@ -3,6 +3,30 @@ # include "gnutls_cert.h" # include "gnutls_auth.h" # include "x509/x509.h" +#include "../libextra/openpgp/openpgp.h" + +typedef struct retr_st { + gnutls_certificate_type type; + union cert { + gnutls_x509_crt* x509; + gnutls_openpgp_key pgp; + } cert; + uint ncerts; + + union key { + gnutls_x509_privkey x509; + gnutls_openpgp_privkey pgp; + } key; + + uint deinit_all; +} retr_st; + +typedef int gnutls_certificate_client_retrieve_function( + struct gnutls_session_int*, const gnutls_datum* req_ca_cert, int nreqs, + retr_st*); + +typedef int gnutls_certificate_server_retrieve_function( + struct gnutls_session_int*, retr_st*); /* This structure may be complex, but it's the only way to * support a server that has multiple certificates @@ -59,6 +83,9 @@ typedef struct { * generating on every handshake. */ gnutls_datum x509_rdn_sequence; + + gnutls_certificate_client_retrieve_function* client_get_cert_callback; + gnutls_certificate_server_retrieve_function* server_get_cert_callback; } CERTIFICATE_CREDENTIALS_INT; /* typedef CERTIFICATE_CREDENTIALS_INT * CERTIFICATE_CREDENTIALS; */ |