From 520404c215149943f1af56f068f31ddbedd26598 Mon Sep 17 00:00:00 2001 From: Sakti Dwi Cahyono <54krpl@gmail.com> Date: Thu, 17 Nov 2016 07:03:38 +0700 Subject: [PATCH] fix string -> byte conversion on python2 (#472) --- lemur/plugins/lemur_cryptography/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lemur/plugins/lemur_cryptography/plugin.py b/lemur/plugins/lemur_cryptography/plugin.py index e3058424..8d483ea5 100644 --- a/lemur/plugins/lemur_cryptography/plugin.py +++ b/lemur/plugins/lemur_cryptography/plugin.py @@ -82,7 +82,7 @@ def issue_certificate(csr, options): builder = builder.serial_number(int(uuid.uuid4())) private_key = serialization.load_pem_private_key( - bytes(options['authority'].authority_certificate.private_key, 'utf-8'), + bytes(str(options['authority'].authority_certificate.private_key).encode('utf-8')), password=None, backend=default_backend() )