diff options
-rw-r--r-- | revoke_crt.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/revoke_crt.py b/revoke_crt.py index e976cb2..22d2660 100644 --- a/revoke_crt.py +++ b/revoke_crt.py @@ -19,7 +19,10 @@ def revoke_crt(pubkey, crt): def _b64(b): "Shortcut function to go from bytes to jwt base64 string" - return base64.urlsafe_b64encode(b).replace("=", "") + if type(b) is str: + b = b.encode() + + return base64.urlsafe_b64encode(b).decode().replace("=", "") def _a64(a): "Shortcut function to go from jwt base64 string to bytes" |