Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mailinabox
Commits
f9acf0ad
Commit
f9acf0ad
authored
Oct 24, 2014
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better errors for ssl certificates
parent
8b65c11c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
status_checks.py
management/status_checks.py
+3
-0
web_update.py
management/web_update.py
+2
-0
No files found.
management/status_checks.py
View file @
f9acf0ad
...
@@ -514,6 +514,9 @@ def check_certificate(domain, ssl_certificate, ssl_private_key):
...
@@ -514,6 +514,9 @@ def check_certificate(domain, ssl_certificate, ssl_private_key):
# Certificate is self-signed.
# Certificate is self-signed.
return
(
"SELF-SIGNED"
,
None
)
return
(
"SELF-SIGNED"
,
None
)
elif
retcode
!=
0
:
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.
# There is some unknown problem. Return the `openssl verify` raw output.
return
(
"There is a problem with the SSL certificate."
,
verifyoutput
.
strip
())
return
(
"There is a problem with the SSL certificate."
,
verifyoutput
.
strip
())
else
:
else
:
...
...
management/web_update.py
View file @
f9acf0ad
...
@@ -229,6 +229,8 @@ def install_cert(domain, ssl_cert, ssl_chain, env):
...
@@ -229,6 +229,8 @@ def install_cert(domain, ssl_cert, ssl_chain, env):
if
cert_status
==
"SELF-SIGNED"
:
if
cert_status
==
"SELF-SIGNED"
:
cert_status
=
"This is a self-signed certificate. I can't install that."
cert_status
=
"This is a self-signed certificate. I can't install that."
os
.
unlink
(
fn
)
os
.
unlink
(
fn
)
if
cert_status_details
is
not
None
:
cert_status
+=
" "
+
cert_status_details
return
cert_status
return
cert_status
# Copy the certificate to its expected location.
# Copy the certificate to its expected location.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment