1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-26 02:57:04 +00:00

fix problem with certificate verification on OpenVZ servers

This commit is contained in:
root 2015-08-15 17:32:40 +02:00
parent 8c08f957cd
commit 39270a8e35

View File

@ -708,7 +708,7 @@ def check_certificate(domain, ssl_certificate, ssl_private_key, warn_if_expiring
"openssl", "openssl",
"verify", "-verbose", "verify", "-verbose",
"-purpose", "sslserver", "-policy_check",] "-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], + [ssl_certificate],
input=b"\n\n".join(ssl_cert_chain[1:]), input=b"\n\n".join(ssl_cert_chain[1:]),
trap=True) trap=True)