diff options
author | Stef Walter <stefw@redhat.com> | 2014-08-08 08:47:23 +0200 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2014-08-08 17:41:54 +0200 |
commit | c48baeb74ecda3b7de9b43475c6f5f3616da50da (patch) | |
tree | a833a3c24d8a86731d51160c4256f8969f0dcf67 | |
parent | 88f45f46afdb89e72e80991e1470c553acf3a1db (diff) | |
download | p11-kit-c48baeb74ecda3b7de9b43475c6f5f3616da50da.tar.gz |
trust: Print label of certificate when complaining about basic constraints
https://bugs.freedesktop.org/show_bug.cgi?id=82328
-rw-r--r-- | trust/builder.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; } |