mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-07 22:03:01 +00:00
Fix openssl_dhparam. (#698)
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
bugfixes:
|
||||||
|
- "openssl_dhparam - was using an internal function instead of the public API to load DH param files when using the ``cryptography`` backend.
|
||||||
|
The internal function was removed in cryptography 42.0.0. The module now uses the public API, which has been available since support for
|
||||||
|
DH params was added to cryptography (https://github.com/ansible-collections/community.crypto/pull/698)."
|
||||||
@@ -341,7 +341,7 @@ class DHParameterCryptography(DHParameterBase):
|
|||||||
try:
|
try:
|
||||||
with open(self.path, 'rb') as f:
|
with open(self.path, 'rb') as f:
|
||||||
data = f.read()
|
data = f.read()
|
||||||
params = self.crypto_backend.load_pem_parameters(data)
|
params = cryptography.hazmat.primitives.serialization.load_pem_parameters(data, backend=self.crypto_backend)
|
||||||
except Exception as dummy:
|
except Exception as dummy:
|
||||||
return False
|
return False
|
||||||
# Check parameters
|
# Check parameters
|
||||||
|
|||||||
Reference in New Issue
Block a user