mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-05-28 04:35:40 -04:00
plugins-netutils: return proper state from test functions
This commit is contained in:
parent
c7274d5627
commit
572ad994b1
2 changed files with 3 additions and 2 deletions
|
|
@ -113,7 +113,7 @@ int np_net_ssl_init_with_hostname_version_and_cert(int sd, char *host_name, int
|
|||
void np_net_ssl_cleanup();
|
||||
int np_net_ssl_write(const void *buf, int num);
|
||||
int np_net_ssl_read(void *buf, int num);
|
||||
int np_net_ssl_check_cert(int days_till_exp_warn, int days_till_exp_crit);
|
||||
mp_state_enum np_net_ssl_check_cert(int days_till_exp_warn, int days_till_exp_crit);
|
||||
#endif /* HAVE_SSL */
|
||||
|
||||
#endif /* _NETUTILS_H_ */
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include "common.h"
|
||||
#include "netutils.h"
|
||||
#include "../lib/monitoringplug.h"
|
||||
#include "states.h"
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
static SSL_CTX *ctx = NULL;
|
||||
|
|
@ -318,7 +319,7 @@ int np_net_ssl_check_certificate(X509 *certificate, int days_till_exp_warn,
|
|||
# endif /* USE_OPENSSL */
|
||||
}
|
||||
|
||||
int np_net_ssl_check_cert(int days_till_exp_warn, int days_till_exp_crit) {
|
||||
mp_state_enum np_net_ssl_check_cert(int days_till_exp_warn, int days_till_exp_crit) {
|
||||
# ifdef USE_OPENSSL
|
||||
X509 *certificate = NULL;
|
||||
certificate = SSL_get_peer_certificate(s);
|
||||
|
|
|
|||
Loading…
Reference in a new issue