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

@@ -350,8 +350,8 @@ def add_crypto_information(module: AnsibleModule) -> dict[str, t.Any]:
pass
else:
for curve_name, constructor_name in CURVES:
ecclass = ec.__dict__.get(constructor_name)
if ecclass:
ecclass = getattr(ec, constructor_name, None)
if ecclass is not None:
try:
ec.generate_private_key(curve=ecclass())
curves.append(curve_name)