From 00dc2340eab9f9504ef78006686802eb8e3542ad Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Thu, 5 Sep 2013 11:20:57 +0200 Subject: trust: More appropriate rv when non-modifiable object deleted This will change once the spec has a specific attribute and code to signify deletability. --- trust/anchor.c | 1 + trust/module.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'trust') 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) -- cgit v1.1