summaryrefslogtreecommitdiff
path: root/lib/includes/gnutls
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2013-03-21 17:50:09 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2013-03-21 17:59:02 +0100
commit26c8c8ed8bd6d7f1848adf59f6cf0371c3c6232b (patch)
treefd193d81a9610e96bdec14ed59fcfe7bac863211 /lib/includes/gnutls
parent2f28a301dcda092626833b58ba95ebc2187bebb6 (diff)
downloadgnutls-26c8c8ed8bd6d7f1848adf59f6cf0371c3c6232b.tar.gz
Fixes in openpgp handshake with fingerprints. Reported by Joke de Buhr.
Diffstat (limited to 'lib/includes/gnutls')
-rw-r--r--lib/includes/gnutls/abstract.h7
-rw-r--r--lib/includes/gnutls/openpgp.h3
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/includes/gnutls/abstract.h b/lib/includes/gnutls/abstract.h
index 50c1ecac35..e9b0e0fa23 100644
--- a/lib/includes/gnutls/abstract.h
+++ b/lib/includes/gnutls/abstract.h
@@ -36,6 +36,12 @@ extern "C"
/* Public key operations */
+#define GNUTLS_PUBKEY_VERIFY_FLAG_TLS_RSA 1
+/* The following flag disables call to PIN callbacks etc.
+ * Only works for TPM keys.
+ */
+#define GNUTLS_PUBKEY_GET_OPENPGP_FINGERPRINT (1<<3)
+
struct gnutls_pubkey_st;
typedef struct gnutls_pubkey_st *gnutls_pubkey_t;
@@ -135,7 +141,6 @@ int gnutls_x509_crt_set_pubkey (gnutls_x509_crt_t crt, gnutls_pubkey_t key);
int gnutls_x509_crq_set_pubkey (gnutls_x509_crq_t crq, gnutls_pubkey_t key);
-#define GNUTLS_PUBKEY_VERIFY_FLAG_TLS_RSA 1
int
gnutls_pubkey_verify_hash (gnutls_pubkey_t key, unsigned int flags,
const gnutls_datum_t * hash,
diff --git a/lib/includes/gnutls/openpgp.h b/lib/includes/gnutls/openpgp.h
index b53b165484..4c0dbf87f2 100644
--- a/lib/includes/gnutls/openpgp.h
+++ b/lib/includes/gnutls/openpgp.h
@@ -52,6 +52,7 @@ extern "C"
} gnutls_openpgp_crt_fmt_t;
#define GNUTLS_OPENPGP_KEYID_SIZE 8
+#define GNUTLS_OPENPGP_V4_FINGERPRINT_SIZE 20
typedef unsigned char gnutls_openpgp_keyid_t[GNUTLS_OPENPGP_KEYID_SIZE];
/* gnutls_openpgp_cert_t should be defined in gnutls.h
@@ -302,6 +303,8 @@ extern "C"
* fingerprint instead of a full key. See also
* gnutls_openpgp_set_recv_key_function().
*
+ * The variable @key must be allocated using gnutls_malloc().
+ *
* Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned,
* otherwise an error code is returned.
*/