From 775136e643e10e2375af8f58fbf7d2a161d02224 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 86e233d..93c85c5 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 8ae0e11..bc98e22 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 """