summaryrefslogtreecommitdiff
path: root/trust/builder.c
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2013-03-18 20:05:52 +0100
committerStef Walter <stefw@gnome.org>2013-03-18 21:53:24 +0100
commit1ad9f98b11f3f0d411bf9517f1dc8985ea3dbe2a (patch)
treee93f94fbe7522db404bca4c6794e8c3ae65ba341 /trust/builder.c
parentf40e5f7129ece4b74aa2cb23b28b24b381bbe223 (diff)
downloadp11-kit-1ad9f98b11f3f0d411bf9517f1dc8985ea3dbe2a.tar.gz
trust: Handle incorrectly encoded CKA_SERIAL_NUMBER lookups
Handle lookups for trust objects (by NSS) which expect CKA_SERIAL_NUMBER attributes without appropriate DER encoding. In addition allow creation of NSS trust objects as PKCS#11 session objects, so that we can test this behavior.
Diffstat (limited to 'trust/builder.c')
-rw-r--r--trust/builder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/trust/builder.c b/trust/builder.c
index 65aa5dd..0a020cf 100644
--- a/trust/builder.c
+++ b/trust/builder.c
@@ -728,7 +728,7 @@ build_for_schema (p11_builder *builder,
if (attrs != NULL)
attrs_filter_if_unchanged (attrs, merge);
- if (creating) {
+ if (creating && (builder->flags & P11_BUILDER_FLAG_TOKEN)) {
if (schema->build_flags & GENERATED_CLASS) {
p11_message ("objects of this type cannot be created");
return CKR_TEMPLATE_INCONSISTENT;