summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 */