mirror of
https://github.com/laurivosandi/certidude
synced 2024-12-22 16:25:17 +00:00
ocsp: Add EC support
This commit is contained in:
parent
6150add67f
commit
ffd1281b83
@ -100,8 +100,8 @@ class OCSPResource(AuthorityHandler):
|
|||||||
'response': {
|
'response': {
|
||||||
'tbs_response_data': response_data,
|
'tbs_response_data': response_data,
|
||||||
'certs': [server_certificate.asn1],
|
'certs': [server_certificate.asn1],
|
||||||
'signature_algorithm': {'algorithm': "sha1_rsa"},
|
'signature_algorithm': {'algorithm': "sha1_ecdsa" if self.authority.public_key.algorithm == "ec" else "sha1_rsa" },
|
||||||
'signature': asymmetric.rsa_pkcs1v15_sign(
|
'signature': (asymmetric.ecdsa_sign if self.authority.public_key.algorithm == "ec" else asymmetric.rsa_pkcs1v15_sign)(
|
||||||
self.authority.private_key,
|
self.authority.private_key,
|
||||||
response_data.dump(),
|
response_data.dump(),
|
||||||
"sha1"
|
"sha1"
|
||||||
|
Loading…
Reference in New Issue
Block a user