Fix openssl_dhparam. (#698) (#699)

(cherry picked from commit b57aa4a2ca)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot]
2024-01-25 23:47:44 +01:00
committed by GitHub
parent 4f27ae4011
commit 14d7e75faf
2 changed files with 5 additions and 1 deletions

View File

@@ -333,7 +333,7 @@ class DHParameterCryptography(DHParameterBase):
try:
with open(self.path, 'rb') as f:
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:
return False
# Check parameters