File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 14
14
import struct
15
15
from enum import Enum
16
16
17
+ import attr
17
18
from cryptography .hazmat .primitives import hashes
18
19
from cryptography .hazmat .primitives .asymmetric import ec , padding , rsa
19
20
from cryptography .hazmat .primitives .ciphers import algorithms , modes
@@ -333,8 +334,13 @@ class ContentAADString(Enum):
333
334
class KeyringTraceFlag (Enum ):
334
335
"""KeyRing Trace actions."""
335
336
336
- WRAPPING_KEY_GENERATED_DATA_KEY = 1
337
- WRAPPING_KEY_ENCRYPTED_DATA_KEY = 1 << 1
338
- WRAPPING_KEY_DECRYPTED_DATA_KEY = 1 << 2
339
- WRAPPING_KEY_SIGNED_ENC_CTX = 1 << 3
340
- WRAPPING_KEY_VERIFIED_ENC_CTX = 1 << 4
337
+ @attr .s
338
+ class KeyringTraceFlagValue (object ):
339
+ """Keyring trace flags do not have defined serializable values."""
340
+ name = attr .ib ()
341
+
342
+ WRAPPING_KEY_GENERATED_DATA_KEY = KeyringTraceFlagValue ("WRAPPING_KEY_GENERATED_DATA_KEY" )
343
+ WRAPPING_KEY_ENCRYPTED_DATA_KEY = KeyringTraceFlagValue ("WRAPPING_KEY_ENCRYPTED_DATA_KEY" )
344
+ WRAPPING_KEY_DECRYPTED_DATA_KEY = KeyringTraceFlagValue ("WRAPPING_KEY_DECRYPTED_DATA_KEY" )
345
+ WRAPPING_KEY_SIGNED_ENC_CTX = KeyringTraceFlagValue ("WRAPPING_KEY_SIGNED_ENC_CTX" )
346
+ WRAPPING_KEY_VERIFIED_ENC_CTX = KeyringTraceFlagValue ("WRAPPING_KEY_VERIFIED_ENC_CTX" )
You can’t perform that action at this time.
0 commit comments