matteocorti / check_ssl_cert

A shell script (that can be used as a Nagios/Icinga plugin) to check an SSL/TLS connection.
GNU General Public License v3.0
365 stars 133 forks source link

SSL_CERT UNKNOWN: --temp can be specified only once #519

Closed paulchen closed 2 hours ago

paulchen commented 2 hours ago

Describe the bug

Using the command line option --temp leads to the error SSL_CERT UNKNOWN: --temp can be specified only once together with an exit status of 3.

To Reproduce

$ ./check_ssl_cert -H github.com -p 443 -w 20 -c 10 --temp /tmp/check_ssl_cert
SSL_CERT UNKNOWN: --temp can be specified only once

Expected behavior

$ ./check_ssl_cert -H github.com -p 443 -w 20 -c 10 --temp /tmp/check_ssl_cert
SSL_CERT OK - github.com:443, https, x509 certificate 'github.com' from 'Sectigo Limited' valid until Mar  7 23:59:59 2025 GMT (expires in 163 days)|days_chain_elem1=163;20;10;; days_chain_elem2=2288;20;10;; days_chain_elem3=1558;20;10;;

System (please complete the following information):

Additional context/output

What happens is the following:

matteocorti commented 2 hours ago

Thanks, I implemented the checks for multiple command line options last night, but I did not yet test everything.

paulchen commented 2 hours ago

Thanks for the fixing this so quickly!