Skip to content

Commit

Permalink
fix(revoke-cert): Adds code removed by error
Browse files Browse the repository at this point in the history
  • Loading branch information
rvelaVenafi committed Feb 6, 2024
1 parent f703ef5 commit 41fd6a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vcert/connection_tpp_abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,17 +331,21 @@ def renew_cert(self, request, reuse_key=False):
def revoke_cert(self, request):
if not (request.id or request.thumbprint):
raise ClientBadData

d = {
'Disable': request.disable
}
if request.reason:
d['Reason'] = request.reason
if request.comments:
d['Comments'] = request.comments
if request.id:
d['CertificateDN'] = request.id
elif request.thumbprint:
d['Thumbprint'] = request.thumbprint
else:
raise ClientBadData

# TODO: Change _post() with post(args)
status, data = self._post(URLS.CERTIFICATE_REVOKE, data=d)
if status in (HTTPStatus.OK, HTTPStatus.ACCEPTED):
Expand Down

0 comments on commit 41fd6a7

Please sign in to comment.