Saturday, 31 August 2013

How do I verify SSL connection with a server through bash?

How do I verify SSL connection with a server through bash?

I have a server where certificates are installed. The hostname of server
is abc.example.com. The certificates installed on server has different DNS
name in CN (def.example.com). However, the certificate has SubjAltNames
which specifies both abc.example.com and def.example.com. This server runs
a Tomcat server and has keystore properly configured. The client has the
necessary RootCA installed. I want to verify through bash script that if a
connection attempt to the server succeeds in this scenario. I tried using
following command -
`wget --server-response --max-redirect=0 https://abc.example.com:443/myapp`
However, both the command fails with ERROR: certificate common name
def.example.com' doesn't match requested host nameabc.example.com'.
Any inputs on how can I verify that the root-ca installed on client is
indeed usable to connect to the server?

No comments:

Post a Comment