Merge pull request #517 from fxaguessy/master

fix problem with certificate verification on OpenVZ servers
This commit is contained in:
Joshua Tauberer 2015-08-15 11:55:30 -04:00
commit 6d35ae56d3
1 changed files with 1 additions and 1 deletions

View File

@ -708,7 +708,7 @@ def check_certificate(domain, ssl_certificate, ssl_private_key, warn_if_expiring
"openssl",
"verify", "-verbose",
"-purpose", "sslserver", "-policy_check",]
+ ([] if len(ssl_cert_chain) == 1 else ["-untrusted", "/dev/stdin"])
+ ([] if len(ssl_cert_chain) == 1 else ["-untrusted", "/proc/self/fd/0"])
+ [ssl_certificate],
input=b"\n\n".join(ssl_cert_chain[1:]),
trap=True)