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

[Feature Request] Configurable timeout #120

Open clarjon1 opened 2 years ago

clarjon1 commented 2 years ago

Hello!

Would it be possible to add in a way to have a configurable timeout, so as to speed up output for a large number of hosts being checked? (Especially for folks who have been given a bunch of hostnames to check certs on without the folks handing over the details knowing if each host even has ssl.)

I've been able to add one by adjusting https://github.com/Matty9191/ssl-cert-check/blob/967b93707f53cfdfefd61e074f18348f1f82bab9/ssl-cert-check#L677 this line to run "timeout 5" before the openssl client, changing it to

echo "" | timeout 5 "${OPENSSL}" s_client $OPTIONS 2> "${ERROR_TMP}" 1> "${CERT_TMP}"

And while this does speed things up and allow me to take a list of hostnames that may or may not have ssl on them it does cause a lot of extra errors in the output about temp files not being readable or existing

cbloss commented 1 year ago

You have SO saved me on this one!!! THANK YOU!!!!!