diff --git a/lemur/plugins/lemur_cfssl/plugin.py b/lemur/plugins/lemur_cfssl/plugin.py index 76cc4b24..c1912364 100644 --- a/lemur/plugins/lemur_cfssl/plugin.py +++ b/lemur/plugins/lemur_cfssl/plugin.py @@ -42,7 +42,7 @@ class CfsslIssuerPlugin(IssuerPlugin): url = "{0}{1}".format(current_app.config.get('CFSSL_URL'), '/api/v1/cfssl/sign') - data = {'certificate_request': csr.decode('utf_8')} + data = {'certificate_request': csr} data = json.dumps(data) response = self.session.post(url, data=data.encode(encoding='utf_8', errors='strict')) diff --git a/lemur/plugins/lemur_cryptography/plugin.py b/lemur/plugins/lemur_cryptography/plugin.py index 8d483ea5..af76db23 100644 --- a/lemur/plugins/lemur_cryptography/plugin.py +++ b/lemur/plugins/lemur_cryptography/plugin.py @@ -63,7 +63,7 @@ def build_root_certificate(options): def issue_certificate(csr, options): - csr = x509.load_pem_x509_csr(csr, default_backend()) + csr = x509.load_pem_x509_csr(csr.encode('utf-8'), default_backend()) builder = x509.CertificateBuilder( issuer_name=x509.Name([