This uses openssl to verify a certificate is valid, including the CA Chain. I created this out of necessity since other cert checkers were not actually verifying the chain. The awk stuff on the end is to invert the exit status for Nagios. Thanks to my friend Eddy for the awk syntax help.