]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
No longer crash on a pkcs11 object without an ID.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 1 Mar 2012 15:41:11 +0000 (16:41 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 1 Mar 2012 15:41:11 +0000 (16:41 +0100)
NEWS
lib/pkcs11.c

diff --git a/NEWS b/NEWS
index 02ba4bf12dbb34e8163477482c846ef32212db16..db964f78f2b298ecf8d363a9199ba7d21353aa1b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,9 @@ Reported by Andreas Metzler.
 ** libgnutls: Corrected rehandshake and resumption
 operations in DTLS. Reported by Sean Buckheister.
 
+** libgnutls: PKCS #11 objects that do not have ID
+no longer crash listing. Reported by Sven Geggus.
+
 ** API and ABI modifications:
 No changes since last version.
 
index 40bcb66ee9c7256943177726fa48de2f3ea219d0..fee702384dedae685a086718481358960dfbb646 100644 (file)
@@ -400,6 +400,12 @@ pkcs11_get_info (struct p11_kit_uri *info,
                          (int)version->minor);
       terminate = 1;
     }
+  else
+    {
+      *output_size = 0;
+      if (output) ((uint8_t*)output)[0] = 0;
+      return 0;
+    }
 
   if (hexify)
     {