1
0
mirror of https://github.com/moepman/acertmgr.git synced 2024-11-13 06:45:24 +01:00

authority.v1: Add missing resource to revoke_crt

Add missing resource: revoke-cert to the request payload
This commit is contained in:
Kishi85 2019-04-04 13:33:52 +02:00
parent 79791c53bc
commit df6e3a743e

View File

@ -177,7 +177,8 @@ class ACMEAuthority(AbstractACMEAuthority):
# @param reason (int) optional certificate revoke reason (see https://tools.ietf.org/html/rfc5280#section-5.3.1)
def revoke_crt(self, crt, reason=None):
header = self._prepare_header()
payload = {'certificate': tools.bytes_to_base64url(tools.convert_cert_to_der_bytes(crt))}
payload = {"resource": "revoke-cert",
"certificate": tools.bytes_to_base64url(tools.convert_cert_to_der_bytes(crt))}
if reason:
payload['reason'] = int(reason)
code, result = self._send_signed(self.ca + "/acme/revoke-cert", header, payload)