From 41fd6a7257bba5e551526df191578446cd2994c3 Mon Sep 17 00:00:00 2001 From: Russel Vela Date: Tue, 6 Feb 2024 15:40:52 -0600 Subject: [PATCH] fix(revoke-cert): Adds code removed by error The following PR removed some logic on revoke_cert by mistake. https://github.com/Venafi/vcert-python/pull/142/files#diff-1c9593e2ac8cef81817b447b1aa42b4385daaefd12f5ca5478c1a425ec387b18L342 --- vcert/connection_tpp_abstract.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vcert/connection_tpp_abstract.py b/vcert/connection_tpp_abstract.py index 840f01a..2aad494 100644 --- a/vcert/connection_tpp_abstract.py +++ b/vcert/connection_tpp_abstract.py @@ -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):