Merge "Fixes private key loading issue"

This commit is contained in:
Jenkins 2015-08-04 05:20:36 +00:00 committed by Gerrit Code Review
commit fd29f15182
1 changed files with 2 additions and 1 deletions

View File

@ -101,7 +101,8 @@ def _read_pyca_private_key(private_key, private_key_passphrase=None):
else:
kw["password"] = None
try:
pk = serialization.load_pem_private_key(six.b(private_key), **kw)
pk = serialization.load_pem_private_key(private_key.encode('ascii'),
**kw)
return pk
except TypeError as ex:
if len(ex.args) > 0 and ex.args[0].startswith("Password"):