SSL

Commands to debug issues related to ssl

  • Check if website cert has expired:

```  openssl s_client -showcerts -connect google.com:443 2> /dev/null |   openssl x509 -noout -dates```

notBefore=Aug 19 08:07:15 2020 GMT
notAfter=Aug 24 23:59:59 2021 GMT


 | openssl x509 -noout -issuer -dates -subject -serial

  • Print certs from cacerts or any file using keytool command
    keytool -v -keystore YOUR_PC/jdk/Contents/Home/jre/lib/security/cacerts -list
    
    
  • Command to get private key and cert from p12 file
  for client cert it will be
openssl pkcs12 -in your_p12_file.p12 -out client.pem -clcerts -nokeys



for private key it will be
openssl pkcs12 -in your_p12_file.p12 -out key.pem -nocerts
Edit this page on GitHub