Skip to content

Commit 4343ffb

Browse files
committed
Declare destroyable attr
This is useful when handling persistent objects, like 802.1AR IDevID.
1 parent 0af82a3 commit 4343ffb

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

pkcs11/attributes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def _enum(type_: type[IntEnum]) -> Handler:
6868
Attribute.LOCAL: handle_bool,
6969
Attribute.MODIFIABLE: handle_bool,
7070
Attribute.COPYABLE: handle_bool,
71+
Attribute.DESTROYABLE: handle_bool,
7172
Attribute.MODULUS: handle_biginteger,
7273
Attribute.MODULUS_BITS: handle_ulong,
7374
Attribute.NEVER_EXTRACTABLE: handle_bool,

pkcs11/constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@ class Attribute(IntEnum):
265265
"""Object can be modified (:class:`bool`)."""
266266
COPYABLE = 0x00000171
267267
"""Object can be copied (:class:`bool`)."""
268+
DESTROYABLE = 0x00000172
269+
"""Object can be destroyed (:class:`bool`)."""
268270

269271
EC_PARAMS = 0x00000180
270272
"""

0 commit comments

Comments
 (0)