1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-14 17:27:23 +01:00

better errors for ssl certificates

This commit is contained in:
Joshua Tauberer
2014-10-24 21:30:33 +00:00
parent 8b65c11cdf
commit f9acf0adec
2 changed files with 5 additions and 0 deletions

View File

@@ -514,6 +514,9 @@ def check_certificate(domain, ssl_certificate, ssl_private_key):
# Certificate is self-signed.
return ("SELF-SIGNED", None)
elif retcode != 0:
if "unable to get local issuer certificate" in verifyoutput:
return ("The certificate is missing an intermediate chain or the intermediate chain is incorrect or incomplete.", None)
# There is some unknown problem. Return the `openssl verify` raw output.
return ("There is a problem with the SSL certificate.", verifyoutput.strip())
else: