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

make a self-signed certificate on a non-primary domain a warning rather than an error, fixes #95

This commit is contained in:
Joshua Tauberer
2014-10-07 20:41:07 +00:00
parent 8566b78202
commit 0441a2e2e3
3 changed files with 18 additions and 6 deletions

View File

@@ -386,7 +386,7 @@ def check_ssl_cert(domain, env):
env['out'].print_line("")
env['out'].print_line(" " + fingerprint, monospace=True)
else:
env['out'].print_error("""The SSL certificate for this domain is currently self-signed. Visitors to a website on
env['out'].print_warning("""The SSL certificate for this domain is currently self-signed. Visitors to a website on
this domain will get a security warning. If you are not serving a website on this domain, then it is
safe to leave the self-signed certificate in place.""")
env['out'].print_line("")
@@ -571,6 +571,9 @@ class ConsoleOutput:
def print_error(self, message):
self.print_block(message, first_line="")
def print_warning(self, message):
self.print_block(message, first_line="? ")
def print_block(self, message, first_line=" "):
print(first_line, end='')
message = re.sub("\n\s*", " ", message)