Ensure the openssl and cryptography work under python3. (#438)

This commit is contained in:
kevgliss
2016-10-09 00:06:15 -07:00
committed by GitHub
parent a19c918c68
commit 72a390c563
4 changed files with 9 additions and 6 deletions

View File

@ -60,7 +60,10 @@ def create_pkcs12(cert, chain, p12_tmp, key, alias, passphrase):
# Create PKCS12 keystore from private key and public certificate
with mktempfile() as cert_tmp:
with open(cert_tmp, 'w') as f:
f.writelines([cert.strip() + "\n", chain.strip() + "\n"])
if chain:
f.writelines([cert.strip() + "\n", chain.strip() + "\n"])
else:
f.writelines([cert.strip() + "\n"])
run_process([
"openssl",