Skip to content

Rake task to test SSL Connection/Certificate Verification

Description

Add a quick way to test from the embedded OpenSSL/Ruby for troubleshooting. This will help when adding certificate authorities or debugging SSL Integrations (LDAP/Jira).

Proposal

Create a rake task that attempts to connect and verifies connection. Added ssl_check.rake and ssl_checker.rb

Example:

gitlab-rake gitlab:ssl_check HOST=ldaps.example.com PORT=636
SSL connection to ldaps.example.com:636 succeeded
gitlab-rake gitlab:ssl_check HOST=www.gitlab.com
SSL connection to www.gitlab.com:443 succeeded

Example Error:

gitlab-rake gitlab:ssl_check HOST=test.bad PORT=6789
SSL connection to test.bad:6789 failed: SSL Error: SSL_connect returned=1 errno=0 state=error: certificate verify failed

Links / references

https://docs.gitlab.com/omnibus/settings/ssl.html#troubleshooting

Edited by Davin Walker