I'm working on Boss Linux OS. I'm trying to work out how to validate a SSL certificate and also retrieve the SSL/TLS version used, cipher used and the algorithm (SHA, MD5..), expiry date of the certificate used by the site passed as parameter
openssl s_client -connect www.google.com:443
using this command helps me view the certificate of www.google.com. Now from that output i need to extract the SSL/TLS version used by them, cipher used, algorithm used, expiry date of the certificate and so on... I need to write a PHP program to extract those values.