Matty9191 / ssl-cert-check

Send notifications when SSL certificates are about to expire.
GNU General Public License v2.0
719 stars 285 forks source link

fix openssl timeout error message #114

Open ryantm opened 2 years ago

ryantm commented 2 years ago

When I run this

$ openssl version
OpenSSL 1.1.1k  25 Mar 2021
$ openssl s_client -connect timeout.badssl.com:444
139666931979584:error:0200206E:system library:connect:Connection timed out:crypto/bio/b_sock2.c:110:
139666931979584:error:2008A067:BIO routines:BIO_connect:connect error:crypto/bio/b_sock2.c:111:
connect:errno=110

Note the error message does not contain a space. This removes the space so a proper error message can be displayed instead of

ERROR: The file named /var/tmp/cert.gjtbl2 is unreadable or doesn't exist
ERROR: Please check to make sure the certificate for redacted.com:443 is valid
leahneukirchen commented 2 years ago

I suggest to use [ ]* to match the old and the new output.