summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stefw@redhat.com>2014-08-08 08:47:54 +0200
committerStef Walter <stef@thewalter.net>2014-08-08 17:41:54 +0200
commitc6cbda8be408d4d160a92d665cf5aad76d4fe1f5 (patch)
tree33995623d91cc6ed44fa8c2d2dd243fdb83a070e
parentc48baeb74ecda3b7de9b43475c6f5f3616da50da (diff)
downloadp11-kit-c6cbda8be408d4d160a92d665cf5aad76d4fe1f5.tar.gz
trust: Don't use invalid public keys for looking up stapled extensions
https://bugs.freedesktop.org/show_bug.cgi?id=82328
-rw-r--r--trust/builder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/trust/builder.c b/trust/builder.c
index f7ea86a..fd7a662 100644
--- a/trust/builder.c
+++ b/trust/builder.c
@@ -125,7 +125,7 @@ lookup_extension (p11_builder *builder,
{ CKA_INVALID },
};
- if (public_key == NULL)
+ if (public_key == NULL || public_key->type == CKA_INVALID)
public_key = p11_attrs_find_valid (cert, CKA_X_PUBLIC_KEY_INFO);
/* Look for a stapled certificate extension */