I'm trying to make a bash script who will check the SSL status of my web site client and return the error. But for every IP, wget https://$ip:$port gives me the following error:ERROR: The certificate of 1.2.3.4 is not trustedERROR: The certificate of 1.2.3.4 hasn't got a know issuerWhen I try with Firefox I have the certificate for each IP. So I tried to dump the Firefox CA to a repository like this:wget http://$ip:$port --ca-directory=(directory of CA from Firefox)But it doesn't change anything.I think, wget doesn't find SSL certificate and I don't know to get them.How can I get the certificate information?
SSL no certificate
bash;wget;openssl;ssl;certificates
Typically SSL certificates are issued to hostnames like www.example.com and not to IP-adresses. Therefore when you use the IP-address you get a mismatch between the URL you're accessing and the hostname the certificate was issued to. Second the CA directory from firefox may not be suitable, as according to the man page wget requires:--ca-directory=directory Specifies directory containing CA certificates in PEM format.  Each            file contains one CA certificate, and the file name is based on a            hash value derived from the certificate. ...I think that wget uses the openssl libraries, possibly making that a more verbose utility to check on the certificate status, for example in a query to determine the expiry date of a SSL certificate: echo GET / | openssl s_client -connect servername:port  | openssl x509 -noout -dates