HTTPS - Monitor SSL Handshake
Problem this snippet solves: External HTTPS monitor script that tests for successful SSL Handshake, then terminates. In BigIP versions v9.3.0 to v10.0.1, when no Receive String is specified in the H...
Published Mar 12, 2015
Version 1.0DR_A__18839
Historic F5 Account
Joined October 05, 2010
DR_A__18839
Historic F5 Account
Joined October 05, 2010
Patrick_Kohler
Apr 24, 2017Nimbostratus
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.