mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-07 05:43:06 +00:00
@@ -286,10 +286,8 @@ def add_crypto_information(module):
|
||||
|
||||
backend = cryptography.hazmat.backends.default_backend()
|
||||
for curve_name, constructor_name in CURVES:
|
||||
ecclass = cryptography.hazmat.primitives.asymmetric.ec.__dict__.get(
|
||||
constructor_name
|
||||
)
|
||||
if ecclass:
|
||||
ecclass = getattr(cryptography.hazmat.primitives.asymmetric.ec, constructor_name, None)
|
||||
if ecclass is not None:
|
||||
try:
|
||||
cryptography.hazmat.primitives.asymmetric.ec.generate_private_key(
|
||||
curve=ecclass(), backend=backend
|
||||
|
||||
Reference in New Issue
Block a user