diff options
-rw-r--r-- | sign_csr.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sign_csr.py b/sign_csr.py index aadb2e9..1e64eac 100644 --- a/sign_csr.py +++ b/sign_csr.py @@ -30,7 +30,10 @@ def sign_csr(pubkey, csr, email=None, file_based=False): 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("=", "") # Step 1: Get account public key sys.stderr.write("Reading pubkey file...\n") |