Commit 87c17c9
committed
fix(crypto): Replace isinstance metaclass check with issubclass in generate_ecc_signing_key
The isinstance check against type(ec.EllipticCurve) (ABCMeta) fails with
newer versions of cryptography where EC curve classes are backed by Rust
internals and have 'type' as their metaclass instead of ABCMeta. This
causes NotSupportedError when using ECDSA signing algorithms like
AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384.
Replace with issubclass which correctly handles both pure Python ABCs
and Rust-backed types, matching the fix already applied to
authentication.py _set_signature_type.
Fixes #7931 parent c00a58c commit 87c17c9
2 files changed
Lines changed: 11 additions & 11 deletions
File tree
- src/aws_encryption_sdk/internal/crypto
- test/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
175 | 178 | | |
176 | 179 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
356 | 357 | | |
357 | 358 | | |
358 | 359 | | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
| 360 | + | |
363 | 361 | | |
364 | 362 | | |
365 | 363 | | |
366 | | - | |
367 | | - | |
| 364 | + | |
368 | 365 | | |
369 | 366 | | |
370 | 367 | | |
| |||
0 commit comments