summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2004-02-12 09:57:12 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2004-02-12 09:57:12 +0000
commit843af6e703f9e8d0a67c8bea707a63536e78bbfa (patch)
tree7c34577e2b09319cc8f131f47961d7966d1df4ac /includes
parentc174501b7dd3ed405fbfe60df1248db58e33407a (diff)
downloadgnutls-843af6e703f9e8d0a67c8bea707a63536e78bbfa.tar.gz
backported all the changes from the development branch to 1.0.x, except for TLS 1.1 which is untested.
Diffstat (limited to 'includes')
-rw-r--r--includes/gnutls/openpgp.h22
-rw-r--r--includes/gnutls/openssl.h1
2 files changed, 21 insertions, 2 deletions
diff --git a/includes/gnutls/openpgp.h b/includes/gnutls/openpgp.h
index 208050da54..85d741841f 100644
--- a/includes/gnutls/openpgp.h
+++ b/includes/gnutls/openpgp.h
@@ -32,8 +32,8 @@ extern "C" {
#include <gnutls/gnutls.h>
-struct gnutls_openpgp_key_int; /* object to hold (parsed) openpgp keys */
-typedef struct gnutls_openpgp_key_int* gnutls_openpgp_key;
+/* gnutls_openpgp_key should be defined in gnutls.h
+ */
typedef enum gnutls_openpgp_key_fmt { GNUTLS_OPENPGP_FMT_RAW,
GNUTLS_OPENPGP_FMT_BASE64 } gnutls_openpgp_key_fmt;
@@ -47,6 +47,10 @@ int gnutls_openpgp_key_export(gnutls_openpgp_key key,
gnutls_openpgp_key_fmt format, void* output_data,
size_t* output_data_size);
+/* The key_usage flags are defined in gnutls.h. They are
+ * the GNUTLS_KEY_* definitions.
+ */
+int gnutls_openpgp_key_get_key_usage( gnutls_openpgp_key cert, unsigned int* key_usage);
int gnutls_openpgp_key_get_fingerprint( gnutls_openpgp_key key,
void* result, size_t* result_size);
@@ -68,6 +72,15 @@ int gnutls_openpgp_key_check_hostname( gnutls_openpgp_key key, const char *hostn
int gnutls_openpgp_key_to_xml( gnutls_openpgp_key key, gnutls_datum *xmlkey,
int ext);
+/* privkey stuff.
+ */
+int gnutls_openpgp_privkey_init(gnutls_openpgp_privkey * key);
+void gnutls_openpgp_privkey_deinit(gnutls_openpgp_privkey key);
+int gnutls_openpgp_privkey_get_pk_algorithm( gnutls_openpgp_privkey key, unsigned int *bits);
+int gnutls_openpgp_privkey_import(gnutls_openpgp_privkey key,
+ const gnutls_datum * data, gnutls_openpgp_key_fmt format,
+ const char* pass, unsigned int flags);
+
/* Keyring stuff.
*/
struct gnutls_openpgp_keyring_int; /* object to hold (parsed) openpgp keyrings */
@@ -107,6 +120,11 @@ int gnutls_openpgp_key_verify_trustdb(
unsigned int * verify /* the output of the verification */);
+/* certificate authentication stuff.
+ */
+int gnutls_certificate_set_openpgp_key(gnutls_certificate_credentials res,
+ gnutls_openpgp_key key, gnutls_openpgp_privkey pkey);
+
#ifdef __cplusplus
}
#endif
diff --git a/includes/gnutls/openssl.h b/includes/gnutls/openssl.h
index eb4667af9c..3b214f2b6a 100644
--- a/includes/gnutls/openssl.h
+++ b/includes/gnutls/openssl.h
@@ -34,6 +34,7 @@ extern "C" {
#endif
#include <gnutls/gnutls.h>
+#include <gnutls/compat8.h>
#include <gcrypt.h>
#define OPENSSL_VERSION_NUMBER (0x0090604F)