summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS6
-rw-r--r--includes/gnutls/openpgp.h12
-rw-r--r--libextra/openpgp/pgp.c4
-rw-r--r--libextra/openpgp/privkey.c4
4 files changed, 17 insertions, 9 deletions
diff --git a/NEWS b/NEWS
index 383ebb49c3..ede1c42156 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,12 @@ See the end for copying conditions.
* Version 1.5.4 (unreleased)
+** Fix return value of gnutls_openpgp_privkey_get_pk_algorithm and
+** gnutls_openpgp_key_get_pk_algorithm.
+Before they were 'int', now they are 'gnutls_pk_algorithm_t', which is
+an enum type (and thus API/ABI compatible with 'int'). Reported by
+ludovic.courtes@laas.fr (Ludovic Courtès).
+
** When a GnuTLS server receive a SSLv2 Client Hello for an unknown TLS
** version, try to negotiate the highest version support by the GnuTLS server,
** instead of the lowest.
diff --git a/includes/gnutls/openpgp.h b/includes/gnutls/openpgp.h
index 1c7412b4bb..be7a2b5297 100644
--- a/includes/gnutls/openpgp.h
+++ b/includes/gnutls/openpgp.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003, 2004, 2005 Free Software Foundation
+ * Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation
*
* Author: Nikos Mavroyanopoulos
*
@@ -67,8 +67,9 @@ extern "C"
int gnutls_openpgp_key_get_name (gnutls_openpgp_key_t key,
int idx, char *buf, size_t * sizeof_buf);
- int gnutls_openpgp_key_get_pk_algorithm (gnutls_openpgp_key_t key,
- unsigned int *bits);
+ gnutls_pk_algorithm_t
+ gnutls_openpgp_key_get_pk_algorithm (gnutls_openpgp_key_t key,
+ unsigned int *bits);
int gnutls_openpgp_key_get_version (gnutls_openpgp_key_t key);
@@ -88,8 +89,9 @@ extern "C"
*/
int gnutls_openpgp_privkey_init (gnutls_openpgp_privkey_t * key);
void gnutls_openpgp_privkey_deinit (gnutls_openpgp_privkey_t key);
- int gnutls_openpgp_privkey_get_pk_algorithm (gnutls_openpgp_privkey_t key,
- unsigned int *bits);
+ gnutls_pk_algorithm_t
+ gnutls_openpgp_privkey_get_pk_algorithm (gnutls_openpgp_privkey_t key,
+ unsigned int *bits);
int gnutls_openpgp_privkey_import (gnutls_openpgp_privkey_t key,
const gnutls_datum_t * data,
gnutls_openpgp_key_fmt format,
diff --git a/libextra/openpgp/pgp.c b/libextra/openpgp/pgp.c
index 02f9b22808..0821a5ef88 100644
--- a/libextra/openpgp/pgp.c
+++ b/libextra/openpgp/pgp.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation
+ * Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation
*
* Author: Timo Schulz, Nikos Mavroyanopoulos
*
@@ -369,7 +369,7 @@ leave:
* or a negative value on error.
*
**/
-int
+gnutls_pk_algorithm_t
gnutls_openpgp_key_get_pk_algorithm (gnutls_openpgp_key_t key,
unsigned int *bits)
{
diff --git a/libextra/openpgp/privkey.c b/libextra/openpgp/privkey.c
index fb6f8e7aae..e9a9f10af3 100644
--- a/libextra/openpgp/privkey.c
+++ b/libextra/openpgp/privkey.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003, 2004, 2005 Free Software Foundation
+ * Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation
*
* Author: Nikos Mavroyanopoulos
*
@@ -120,7 +120,7 @@ gnutls_openpgp_privkey_import (gnutls_openpgp_privkey_t key,
* or a negative value on error.
*
**/
-int
+gnutls_pk_algorithm_t
gnutls_openpgp_privkey_get_pk_algorithm (gnutls_openpgp_privkey_t key,
unsigned int *bits)
{