HTTPS - Monitor SSL Handshake
Published Mar 12, 2015
Version 1.0Was this article helpful?
I think you don't need arguments. Host and Port are always sent as the first two arguments. However the script didn't work for me like that. When I pasted the openssl command into bash, I always got return code 1, whether the connection succeeded or not. My quick and dirty fix was to change the line with the openssl command like this:
echo 'QUIT'|openssl s_client -verify 1 -connect $node_ip:$pm_port | grep "Verify return code: 0" >/dev/null 2>&1
Now I get a 0 if "Verify return code: 0" is found, and a 1 if it is not found.