Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

OpenSSL Wrong Host Name

I use site badssl.com in order to check whether I am able to catch all invalid certificates. One of the sites with invalid certificate is https://wrong.host.badssl.com/. Nevertheless if I type in cmd openssl s_client -connect wrong.host.badssl.com:443, I receive verification OK status. How can I solve the problem?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

How can I solve the problem?

Newer versions of openssl have the option -verify_hostname:

$ openssl s_client -connect wrong.host.badssl.com:443 \
   -verify_hostname wrong.host.badssl.com
...
    Verify return code: 62 (Hostname mismatch)

Older versions don’t have this option and there is no way to enable the functionality in this older versions otherwise.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading