From 4343ffbbfb1918a280730191c4bfa3d5d9db0894 Mon Sep 17 00:00:00 2001 From: Mykyta Syrencrantz Date: Wed, 17 Jun 2026 15:17:35 +0200 Subject: [PATCH] Declare destroyable attr This is useful when handling persistent objects, like 802.1AR IDevID. --- pkcs11/attributes.py | 1 + pkcs11/constants.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pkcs11/attributes.py b/pkcs11/attributes.py index 3ac92a1e..207b059c 100644 --- a/pkcs11/attributes.py +++ b/pkcs11/attributes.py @@ -68,6 +68,7 @@ def _enum(type_: type[IntEnum]) -> Handler: Attribute.LOCAL: handle_bool, Attribute.MODIFIABLE: handle_bool, Attribute.COPYABLE: handle_bool, + Attribute.DESTROYABLE: handle_bool, Attribute.MODULUS: handle_biginteger, Attribute.MODULUS_BITS: handle_ulong, Attribute.NEVER_EXTRACTABLE: handle_bool, diff --git a/pkcs11/constants.py b/pkcs11/constants.py index e06fc9e0..c4c86ec5 100644 --- a/pkcs11/constants.py +++ b/pkcs11/constants.py @@ -265,6 +265,8 @@ class Attribute(IntEnum): """Object can be modified (:class:`bool`).""" COPYABLE = 0x00000171 """Object can be copied (:class:`bool`).""" + DESTROYABLE = 0x00000172 + """Object can be destroyed (:class:`bool`).""" EC_PARAMS = 0x00000180 """