summaryrefslogtreecommitdiff
path: root/lib/gnutls_ui.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2003-03-04 07:47:57 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2003-03-04 07:47:57 +0000
commit94b36a2b79c6216cbb502c65f08829be1a5b1989 (patch)
treec3ec781bd94f0218f2c13115bd226671696ee9df /lib/gnutls_ui.c
parent9a740fdabd18b2b50097023dc72123dcfb8bb28c (diff)
downloadgnutls-94b36a2b79c6216cbb502c65f08829be1a5b1989.tar.gz
* Corrected a bug in 64 bit architectures, which affected the
serial number calculation in the record layer. * Added gnutls_certificate_free_keys() which deletes all the private keys and certificates from the credentials structure.
Diffstat (limited to 'lib/gnutls_ui.c')
-rw-r--r--lib/gnutls_ui.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gnutls_ui.c b/lib/gnutls_ui.c
index 36b21eb33b..aa5df95c06 100644
--- a/lib/gnutls_ui.c
+++ b/lib/gnutls_ui.c
@@ -212,7 +212,9 @@ const gnutls_datum *gnutls_certificate_get_ours(gnutls_session session)
return NULL; /* no certificate */
}
- return &cred->cert_list[index][0].raw;
+ if (cred->ncerts > index)
+ return &cred->cert_list[index][0].raw;
+ return NULL;
}
/**