summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2008-12-09 19:04:44 +0000
committerStef Walter <stef@memberwebs.com>2008-12-09 19:04:44 +0000
commite89d0fa8e27a6ffce016228ff10bb14b77fad577 (patch)
treee9ba1328ae6d85bddadc34ad3d2846c1f2a350bc
parent128d6627d8a03544137ada01934bf62934982172 (diff)
Add some remaining attributes.
-rw-r--r--ckcapi-key.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/ckcapi-key.c b/ckcapi-key.c
index 69c845d..34a6ae1 100644
--- a/ckcapi-key.c
+++ b/ckcapi-key.c
@@ -313,6 +313,32 @@ key_bool_attribute(CkCapiObjectData* objdata, CK_ATTRIBUTE_PTR attr)
val = CK_TRUE;
break;
+ /*
+ * Is this key trusted?
+ * - A nebulous question.
+ */
+ case CKA_TRUSTED:
+ val = CK_FALSE;
+ break;
+
+ /*
+ * Key wrapping with public keys.
+ */
+ case CKA_WRAP:
+ if(is_private)
+ return CKR_ATTRIBUTE_TYPE_INVALID;
+ val = CK_FALSE;
+ break;
+
+ /*
+ * Key wrapping on private keys.
+ */
+ case CKA_WRAP_WITH_TRUSTED:
+ if(!is_private)
+ return CKR_ATTRIBUTE_TYPE_INVALID;
+ val = CK_FALSE;
+ break;
+
/*
* Can do a unwrap operation?
* - We don't implement this.
@@ -326,7 +352,6 @@ key_bool_attribute(CkCapiObjectData* objdata, CK_ATTRIBUTE_PTR attr)
* - We don't implement this.
*/
case CKA_UNWRAP_TEMPLATE:
- case CKA_WRAP_WITH_TRUSTED:
return CKR_ATTRIBUTE_TYPE_INVALID;
/*