mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
cert: fix wrong assumption of cert-show result type
cert-show returns a base64 encoded certificate yet the assumption here was for a PEM bytes instance. https://pagure.io/freeipa/issue/4985 Reviewed-By: Felipe Volpone <fbarreto@redhat.com>
This commit is contained in:
parent
e09b6c2602
commit
1b78f79283
@ -1270,8 +1270,8 @@ class cert_revoke(PKQuery, CertMethod, VirtualCommand):
|
||||
logger.debug("Not granted by ACI to revoke certificate, "
|
||||
"looking at principal")
|
||||
try:
|
||||
cert = x509.load_pem_x509_certificate(
|
||||
resp['result']['certificate'])
|
||||
cert = x509.load_der_x509_certificate(
|
||||
base64.b64decode(resp['result']['certificate']))
|
||||
if not bind_principal_can_manage_cert(cert):
|
||||
raise acierr
|
||||
except errors.NotImplementedError:
|
||||
|
Loading…
Reference in New Issue
Block a user