diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2004-04-18 12:20:42 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2004-04-18 12:20:42 +0000 |
commit | e8fe22652741e726835d05d7088a1b4a9c8b4daf (patch) | |
tree | e2db26461fc5fcbb48eab8cb173f109eb62570a4 | |
parent | e74dd04ae73bf3f61873aea3856d24b318149aa8 (diff) | |
download | gnutls-e8fe22652741e726835d05d7088a1b4a9c8b4daf.tar.gz |
Corrected bug in OpenPGP key loading using a callback.
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | includes/gnutls/openpgp.h | 1 | ||||
-rw-r--r-- | lib/auth_cert.c | 15 |
4 files changed, 15 insertions, 6 deletions
@@ -1,3 +1,6 @@ +Version 1.0.12 +- Corrected bug in OpenPGP key loading using a callback. + Version 1.0.11 (17/04/2004) - Added gnutls_sign_algorithm_get_name() and gnutls_pk_algorithm_get_name() - Corrected bug in TLS renegotiation. diff --git a/configure.in b/configure.in index e64e04ebfa..45425b440b 100644 --- a/configure.in +++ b/configure.in @@ -12,7 +12,7 @@ AC_DEFINE_UNQUOTED(T_OS, "$target_os", [OS name]) dnl Gnutls Version GNUTLS_MAJOR_VERSION=1 GNUTLS_MINOR_VERSION=0 -GNUTLS_MICRO_VERSION=11 +GNUTLS_MICRO_VERSION=12 GNUTLS_VERSION=$GNUTLS_MAJOR_VERSION.$GNUTLS_MINOR_VERSION.$GNUTLS_MICRO_VERSION AC_DEFINE_UNQUOTED(GNUTLS_VERSION, "$GNUTLS_VERSION", [version of gnutls]) diff --git a/includes/gnutls/openpgp.h b/includes/gnutls/openpgp.h index 85d741841f..6960e1d957 100644 --- a/includes/gnutls/openpgp.h +++ b/includes/gnutls/openpgp.h @@ -31,6 +31,7 @@ extern "C" { #endif #include <gnutls/gnutls.h> +#include <gnutls/extra.h> /* gnutls_openpgp_key should be defined in gnutls.h */ diff --git a/lib/auth_cert.c b/lib/auth_cert.c index 8b6392d125..fdaf59ff8c 100644 --- a/lib/auth_cert.c +++ b/lib/auth_cert.c @@ -1460,6 +1460,8 @@ static gnutls_cert *alloc_and_load_x509_certs(gnutls_x509_crt * certs, gnutls_cert *local_certs; int ret = 0; uint i, j; + + if (certs==NULL) return NULL; local_certs = gnutls_malloc(sizeof(gnutls_cert) * ncerts); if (local_certs == NULL) { @@ -1494,6 +1496,8 @@ static gnutls_privkey *alloc_and_load_x509_key(gnutls_x509_privkey key) gnutls_privkey *local_key; int ret = 0; + if (key==NULL) return NULL; + local_key = gnutls_malloc(sizeof(gnutls_privkey)); if (local_key == NULL) { gnutls_assert(); @@ -1521,7 +1525,8 @@ static gnutls_cert *alloc_and_load_pgp_certs(gnutls_openpgp_key cert) { gnutls_cert *local_certs; int ret = 0; - uint i, j; + + if (cert==NULL) return NULL; local_certs = gnutls_malloc(sizeof(gnutls_cert)); if (local_certs == NULL) { @@ -1534,7 +1539,7 @@ static gnutls_cert *alloc_and_load_pgp_certs(gnutls_openpgp_key cert) return NULL; } - ret = _E_gnutls_openpgp_key_to_gcert(&local_certs[i], cert); + ret = _E_gnutls_openpgp_key_to_gcert(local_certs, cert); if (ret < 0) { gnutls_assert(); return NULL; @@ -1542,9 +1547,7 @@ static gnutls_cert *alloc_and_load_pgp_certs(gnutls_openpgp_key cert) if (ret < 0) { gnutls_assert(); - for (j = 0; j < i; j++) { - _gnutls_gcert_deinit(&local_certs[j]); - } + _gnutls_gcert_deinit(local_certs); gnutls_free(local_certs); return NULL; } @@ -1560,6 +1563,8 @@ static gnutls_privkey *alloc_and_load_pgp_key(const gnutls_openpgp_privkey key) gnutls_privkey *local_key; int ret = 0; + if (key==NULL) return NULL; + local_key = gnutls_malloc(sizeof(gnutls_privkey)); if (local_key == NULL) { gnutls_assert(); |