Fix EC detection. (#981)

This commit is contained in:
Felix Fontein
2026-02-11 21:44:24 +01:00
committed by GitHub
parent b5a9a41913
commit 911ed33c2e
3 changed files with 5 additions and 3 deletions

View File

@@ -98,7 +98,7 @@ class _Curve:
) -> type[cryptography.hazmat.primitives.asymmetric.ec.EllipticCurve]:
ecclass: (
type[cryptography.hazmat.primitives.asymmetric.ec.EllipticCurve] | None
) = cryptography.hazmat.primitives.asymmetric.ec.__dict__.get(self.ectype)
) = getattr(cryptography.hazmat.primitives.asymmetric.ec, self.ectype, None)
if ecclass is None:
module.fail_json(
msg=f"Your cryptography version does not support {self.ectype}"