dcdcd1c ipa cert-show: fix the code setting revocation reason

1 file Authored by frenaud 3 years ago, Committed by François Cami 3 years ago,
    ipa cert-show: fix the code setting revocation reason
    
    ipa cert-show wrongly displays all certs as Revoked.
    The dogtag plugin code is checking if the JSON data received
    from dogtag contains a RevocationReason with:
       if 'RevocationReason' in resp:
    but the value can be None.
    Replace the check with
       if 'RevocationReason' in resp and esp['RevocationReason'] is not None:
    as this will execute the code only if there is a value
    and it is not None.
    
    Fixes: https://pagure.io/freeipa/issue/8394
    Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
    Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
    
        
file modified
+13 -7