summaryrefslogtreecommitdiff
path: root/trust
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 18:44:51 +0200
commitc62ce78b8ae6961c9d1dda092781b6988488a135 (patch)
treed2c356e4525fbf06c9e89f1057bdff4dc42e3282 /trust
parent1576ac9495333d0f285e0ab69f444d3ae0630859 (diff)
trust: Don't use invalid public keys for looking up stapled extensions
https://bugs.freedesktop.org/show_bug.cgi?id=82328
Diffstat (limited to 'trust')
-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 */