Skip to content

Commit 2d12dc3

Browse files
authored
[Key Vault] Move wrap algo emums (Azure#41468)
The enums for `CKM_AES_KEY_WRAP` and `CKM_AES_KEY_WRAP_PAD` belong in the `KeyWrapAlgorithm` enum class. Signed-off-by: Paul Van Eck <[email protected]>
1 parent 17c5712 commit 2d12dc3

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

sdk/keyvault/azure-keyvault-keys/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,16 @@
1010
[#37507](https://github.com/Azure/azure-sdk-for-python/pull/37507)
1111

1212
### Bugs Fixed
13+
1314
- Fixed a bug where `KeyVaultRSAPublicKey` and `KeyVaultRSAPrivateKey` were not correctly implementing the `cryptography` library's `RSAPublicKey` and `RSAPrivateKey` interfaces, causing instantiation errors. ([#41205](https://github.com/Azure/azure-sdk-for-python/pull/41205))
1415

16+
### Breaking Changes
17+
18+
> These changes do not impact the API of stable versions such as 4.10.0. Only code written against a beta version such as 4.11.0b1 may be affected.
19+
- The following enums have been moved:
20+
- `EncryptionAlgorithm.ckm_aes_key_wrap` -> `KeyWrapAlgorithm.ckm_aes_key_wrap`
21+
- `EncryptionAlgorithm.ckm_aes_key_wrap_pad` -> `KeyWrapAlgorithm.ckm_aes_key_wrap_pad`
22+
1523
### Other Changes
1624

1725
- Key Vault API version `7.6` is now the default

sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_enums.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ class KeyWrapAlgorithm(str, Enum, metaclass=CaseInsensitiveEnumMeta):
2121
# Microsoft does *not* recommend RSA_1_5, which is included solely for backwards compatibility.
2222
# Cryptographic standards no longer consider RSA with the PKCS#1 v1.5 padding scheme secure for encryption.
2323
rsa1_5 = "RSA1_5"
24+
ckm_aes_key_wrap = "CKM_AES_KEY_WRAP"
25+
ckm_aes_key_wrap_pad = "CKM_AES_KEY_WRAP_PAD"
2426

2527

2628
class EncryptionAlgorithm(str, Enum, metaclass=CaseInsensitiveEnumMeta):
@@ -44,8 +46,6 @@ class EncryptionAlgorithm(str, Enum, metaclass=CaseInsensitiveEnumMeta):
4446
a128_cbcpad = "A128CBCPAD"
4547
a192_cbcpad = "A192CBCPAD"
4648
a256_cbcpad = "A256CBCPAD"
47-
ckm_aes_key_wrap = "CKM_AES_KEY_WRAP"
48-
ckm_aes_key_wrap_pad = "CKM_AES_KEY_WRAP_PAD"
4949

5050

5151
class SignatureAlgorithm(str, Enum, metaclass=CaseInsensitiveEnumMeta):

0 commit comments

Comments
 (0)