summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--lib/pkcs11.c6
2 files changed, 9 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 41c0c50467..a5c56c8451 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,9 @@ Version 2.12.17 (unreleased)
** libgnutls: Corrections in record packet parsing.
Reported by Matthew Hall.
+** 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.
diff --git a/lib/pkcs11.c b/lib/pkcs11.c
index 83fad64b89..f4f64f702b 100644
--- a/lib/pkcs11.c
+++ b/lib/pkcs11.c
@@ -396,6 +396,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)
{