Files
p11-kit/trust-Print-label-of-certificate-when-complaining-.patch
Ludwig Nussel 8af1cf2f17 - new version 0.20.3
* Fix problems reinitializing managed modules after fork
  * Fix bad bookeeping when fail initializing one of the modules
  * Fix case where module would be unloaded while in use [#74919]
  * Remove assertions when module used before initialized [#74919]
  * Fix handling of mmap failure and mapping empty files [#74773]
  * Stable p11_kit_be_quiet() and p11_kit_be_loud() functions
  * Require automake 1.12 or later
  * Build fixes for Windows [#76594 #74149]

OBS-URL: https://build.opensuse.org/package/show/Base:System/p11-kit?expand=0&rev=15
2014-08-29 06:55:53 +00:00

37 lines
1.2 KiB
Diff

From 70228770eb96e7121e12632a85e603727ed42431 Mon Sep 17 00:00:00 2001
From: Stef Walter <stefw@redhat.com>
Date: Fri, 8 Aug 2014 08:47:23 +0200
Subject: [PATCH] trust: Print label of certificate when complaining about
basic constraints
https://bugs.freedesktop.org/show_bug.cgi?id=82328
---
trust/builder.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/trust/builder.c b/trust/builder.c
index 18c09ad..f7ea86a 100644
--- a/trust/builder.c
+++ b/trust/builder.c
@@ -551,6 +551,7 @@ calc_certificate_category (p11_builder *builder,
CK_ATTRIBUTE *public_key,
CK_ULONG *category)
{
+ CK_ATTRIBUTE *label;
unsigned char *ext;
size_t ext_len;
bool is_ca = 0;
@@ -570,7 +571,10 @@ calc_certificate_category (p11_builder *builder,
ret = p11_x509_parse_basic_constraints (builder->asn1_defs, ext, ext_len, &is_ca);
free (ext);
if (!ret) {
- p11_message ("invalid basic constraints certificate extension");
+ label = p11_attrs_find_valid (cert, CKA_LABEL);
+ p11_message ("%.*s: invalid basic constraints certificate extension",
+ label ? (int)label->ulValueLen : 7,
+ label ? (char *)label->pValue : "unknown");
return false;
}
--
1.9.3