Package: monitoring-plugins-contrib
Version: 35.20210512
Severity: normal
Tags: patch
Hi!
Using check_ssl_cert with an ipv6 address host does not work as
expected:
| weasel@sarek:~/ssl$ ./check_ssl_cert.0 --ignore-ocsp -H 2001:858:10f:100::19:1 -p 443 --cn
www.palfrader.org --sni
www.palfrader.org
| SSL_CERT UNKNOWN: Cannot resolve 2001:858:10f:100::19:1
| weasel@sarek:~/ssl$ ./check_ssl_cert.0 --ignore-ocsp -H
www.palfrader.org --resolve 2001:858:10f:100::19:1 -p 443 --cn
www.palfrader.org --sni
www.palfrader.org
| SSL_CERT CRITICAL
www.palfrader.org: 2001:858:10f:100::19:1 is not a valid hostname
The attached patch makes it work. As a side effect, it does require
giving a --cn if host is an ipv4 or ipv6 literal. If you disagree about
that chnge, feel free to drop that part.
--
| .''`. ** Debian **
Peter Palfrader | : :' : The universal
https://www.palfrader.org/ | `. `' Operating System
| `-
https://www.debian.org/