diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-09-10 13:41:22 +0200 |
|---|---|---|
| committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-09-10 13:41:22 +0200 |
| commit | 572ad994b136c443c5d59509a28b8343c3e40ab3 (patch) | |
| tree | 2adb855ee34a79d5eb933dbf454cbb48ee4a7d02 /plugins/sslutils.c | |
| parent | c7274d56274fa1a38837510b1cbde447e73e9b63 (diff) | |
| download | monitoring-plugins-572ad994b136c443c5d59509a28b8343c3e40ab3.tar.gz | |
plugins-netutils: return proper state from test functions
Diffstat (limited to 'plugins/sslutils.c')
| -rw-r--r-- | plugins/sslutils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/sslutils.c b/plugins/sslutils.c index 92e0cc84..b20a2b2c 100644 --- a/plugins/sslutils.c +++ b/plugins/sslutils.c | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | #include "common.h" | 30 | #include "common.h" |
| 31 | #include "netutils.h" | 31 | #include "netutils.h" |
| 32 | #include "../lib/monitoringplug.h" | 32 | #include "../lib/monitoringplug.h" |
| 33 | #include "states.h" | ||
| 33 | 34 | ||
| 34 | #ifdef HAVE_SSL | 35 | #ifdef HAVE_SSL |
| 35 | static SSL_CTX *ctx = NULL; | 36 | static SSL_CTX *ctx = NULL; |
| @@ -318,7 +319,7 @@ int np_net_ssl_check_certificate(X509 *certificate, int days_till_exp_warn, | |||
| 318 | # endif /* USE_OPENSSL */ | 319 | # endif /* USE_OPENSSL */ |
| 319 | } | 320 | } |
| 320 | 321 | ||
| 321 | int np_net_ssl_check_cert(int days_till_exp_warn, int days_till_exp_crit) { | 322 | mp_state_enum np_net_ssl_check_cert(int days_till_exp_warn, int days_till_exp_crit) { |
| 322 | # ifdef USE_OPENSSL | 323 | # ifdef USE_OPENSSL |
| 323 | X509 *certificate = NULL; | 324 | X509 *certificate = NULL; |
| 324 | certificate = SSL_get_peer_certificate(s); | 325 | certificate = SSL_get_peer_certificate(s); |
