summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNikos <nmav@crystal.(none)>2008-03-29 12:09:52 +0200
committerNikos <nmav@crystal.(none)>2008-03-29 12:09:52 +0200
commit7758b7e732d39367ca97783be596146479d0831e (patch)
tree1585e909a06cfb1fe69ab5e19c442718c617a41f /lib
parent67afa71917b3ebe90997268de9980fc6cab453df (diff)
downloadgnutls-7758b7e732d39367ca97783be596146479d0831e.tar.gz
Reverted to gnutls 2.2 behaviour of allowing an empty key (for PKCS #11).
Reported by Joe Orton.
Diffstat (limited to 'lib')
-rw-r--r--lib/auth_cert.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/auth_cert.c b/lib/auth_cert.c
index d4f55d0fb3..cfa80cefb8 100644
--- a/lib/auth_cert.c
+++ b/lib/auth_cert.c
@@ -456,7 +456,7 @@ call_get_cert_callback (gnutls_session_t session,
if (type == GNUTLS_CRT_X509)
{
local_certs = alloc_and_load_x509_certs (st.cert.x509, st.ncerts);
- if (local_certs != NULL)
+ if (local_certs != NULL && st.key.x509 != NULL)
{
local_key = alloc_and_load_x509_key (st.key.x509);
if (local_key == NULL)
@@ -480,7 +480,7 @@ call_get_cert_callback (gnutls_session_t session,
#ifdef ENABLE_OPENPGP
{
local_certs = alloc_and_load_pgp_certs (st.cert.pgp);
- if (local_certs != NULL)
+ if (local_certs != NULL && st.key.pgp != NULL)
{
local_key = alloc_and_load_pgp_key (st.key.pgp);
if (local_key == NULL)