summaryrefslogtreecommitdiff
path: root/trust
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2013-09-05 11:20:57 +0200
committerStef Walter <stef@thewalter.net>2013-09-05 11:27:06 +0200
commit00dc2340eab9f9504ef78006686802eb8e3542ad (patch)
tree34a9e5e7dd7c1e28b4a27bf5b5320c02089bbb92 /trust
parent3c7553a1fd47671a98a6d496ac7eeedb1b43df7c (diff)
trust: More appropriate rv when non-modifiable object deleted
This will change once the spec has a specific attribute and code to signify deletability.
Diffstat (limited to 'trust')
-rw-r--r--trust/anchor.c1
-rw-r--r--trust/module.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/trust/anchor.c b/trust/anchor.c
index e20282b..7854c5f 100644
--- a/trust/anchor.c
+++ b/trust/anchor.c
@@ -508,6 +508,7 @@ remove_all (p11_kit_iter *iter)
continue;
case CKR_TOKEN_WRITE_PROTECTED:
case CKR_SESSION_READ_ONLY:
+ case CKR_ATTRIBUTE_READ_ONLY:
p11_message ("couldn't remove read-only %s", desc);
continue;
default:
diff --git a/trust/module.c b/trust/module.c
index 5ebe1ff..852d74f 100644
--- a/trust/module.c
+++ b/trust/module.c
@@ -975,7 +975,7 @@ sys_C_DestroyObject (CK_SESSION_HANDLE handle,
if (rv == CKR_OK && p11_attrs_find_bool (attrs, CKA_MODIFIABLE, &val) && !val) {
/* TODO: This should be replaced with CKR_ACTION_PROHIBITED */
- rv = CKR_FUNCTION_REJECTED;
+ rv = CKR_ATTRIBUTE_READ_ONLY;
}
if (rv == CKR_OK)