Ensuring that private key is in string format before it gets stored (#504)

* Ensuring that private key is in string format before it gets stored

* Fixing failing test.
This commit is contained in:
kevgliss
2016-11-16 15:05:25 -08:00
committed by GitHub
parent 3f2691c5d4
commit 851d74da3d
2 changed files with 3 additions and 2 deletions

View File

@ -401,6 +401,9 @@ def create_csr(**csr_config):
encryption_algorithm=serialization.NoEncryption()
)
if isinstance(private_key, bytes):
private_key = private_key.decode('utf-8')
csr = request.public_bytes(
encoding=serialization.Encoding.PEM
)