Révision f6ea58d5
avoid blocking in ssl_
Just in case there is a firewall dropping packages, this plugin
would block until the plugin timeout is reached. This change introduces
the possibility to configure a much lower individual timeout.
| plugins/ssl/ssl_ | ||
|---|---|---|
| 15 | 15 |
|
| 16 | 16 |
[ssl_*] |
| 17 | 17 |
env.warning 30: |
| 18 |
env.max_time 5 |
|
| 18 | 19 |
|
| 19 | 20 |
=head1 AUTHOR |
| 20 | 21 |
|
| ... | ... | |
| 79 | 80 |
;; |
| 80 | 81 |
esac |
| 81 | 82 |
|
| 82 |
cert=$(echo "" | openssl s_client -CApath /etc/ssl/certs -servername "${SITE}" -connect "${SITE}:${PORT}" 2>/dev/null);
|
|
| 83 |
cert=$(timeout "${max_time:-5}" openssl s_client -CApath /etc/ssl/certs -servername "${SITE}" -connect "${SITE}:${PORT}" 2>/dev/null < /dev/null);
|
|
| 83 | 84 |
|
| 84 | 85 |
days_left=$(echo "$cert" | parse_valid_days_from_certificate) |
| 85 | 86 |
[ -n "$days_left" ] || days_left="U" |
Formats disponibles : Unified diff