mirror of
https://github.com/moepman/acertmgr.git
synced 2024-12-28 19:31:55 +01:00
Instantiate HashAlgorithm in OCSPRequestBuilder
Installations of more recent cryptography require parameter hash algorithm to be an instance of hashes.HashAlgorithm, not the bare object itself. Fixes #63
This commit is contained in:
parent
2d230e30d9
commit
c15b6ec441
@ -432,7 +432,7 @@ def is_ocsp_valid(cert, issuer, hash_algo):
|
||||
|
||||
# This is a bit of a hack due to validation problems within cryptography (TODO: Check if this is still true)
|
||||
# Correct replacement: ocsprequest = ocsp.OCSPRequestBuilder().add_certificate(cert, issuer, algorithm).build()
|
||||
ocsprequest = ocsp.OCSPRequestBuilder((cert, issuer, algorithm)).build()
|
||||
ocsprequest = ocsp.OCSPRequestBuilder((cert, issuer, (algorithm)())).build()
|
||||
ocsprequestdata = ocsprequest.public_bytes(serialization.Encoding.DER)
|
||||
for ocsp_url in ocsp_urls:
|
||||
response = get_url(ocsp_url,
|
||||
|
Loading…
Reference in New Issue
Block a user