Commit 725be62
authored
[Key Vault] Fix key instantiation errors. (#41205)
The latest version of `cryptography` now defines `__copy__` as an
abstract method in both RSAPublicKey and RSAPrivateKey.
`KeyVaultRSAPublicKey` and `KeyVaultRSAPrivateKey` need to implement
this method so that they can be successfully instantiated.
This change adds the `__copy__` method to both classes, returning `self`
in each case. This mirrors behavior in `cryptography` and is appropriate
because the key objects are immutable.
Signed-off-by: Paul Van Eck <[email protected]>1 parent 2f2eff8 commit 725be62
File tree
2 files changed
+19
-1
lines changed- sdk/keyvault/azure-keyvault-keys
- azure/keyvault/keys/crypto
2 files changed
+19
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
154 | | - | |
| 155 | + | |
155 | 156 | | |
156 | 157 | | |
157 | 158 | | |
| |||
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
308 | 309 | | |
309 | 310 | | |
310 | 311 | | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
311 | 320 | | |
312 | 321 | | |
313 | 322 | | |
| |||
482 | 491 | | |
483 | 492 | | |
484 | 493 | | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
485 | 502 | | |
486 | 503 | | |
487 | 504 | | |
| |||
0 commit comments