diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-11-09 12:21:34 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-09 12:21:34 +0100 |
| commit | 2510d9ad5851c669ace7cfc16ea3ff9bf2c86106 (patch) | |
| tree | 71658ad4c291b2eec4779f2367ab0b65744b60d3 /plugins/netutils.h | |
| parent | 2eb22a87d2cb5467c5b031c720726c2531202055 (diff) | |
| parent | bc2720abddf8e379c4e1f23ed25f7702ef29ad08 (diff) | |
| download | monitoring-plugins-2510d9ad5851c669ace7cfc16ea3ff9bf2c86106.tar.gz | |
check_smtp: modern output + some tls cert helper functions
Diffstat (limited to 'plugins/netutils.h')
| -rw-r--r-- | plugins/netutils.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/plugins/netutils.h b/plugins/netutils.h index c4461113..dbd22398 100644 --- a/plugins/netutils.h +++ b/plugins/netutils.h | |||
| @@ -114,6 +114,26 @@ int np_net_ssl_init_with_hostname_version_and_cert(int socket, char *host_name, | |||
| 114 | void np_net_ssl_cleanup(void); | 114 | void np_net_ssl_cleanup(void); |
| 115 | int np_net_ssl_write(const void *buf, int num); | 115 | int np_net_ssl_write(const void *buf, int num); |
| 116 | int np_net_ssl_read(void *buf, int num); | 116 | int np_net_ssl_read(void *buf, int num); |
| 117 | |||
| 118 | typedef enum { | ||
| 119 | ALL_OK, | ||
| 120 | NO_SERVER_CERTIFICATE_PRESENT, | ||
| 121 | UNABLE_TO_RETRIEVE_CERTIFICATE_SUBJECT, | ||
| 122 | WRONG_TIME_FORMAT_IN_CERTIFICATE, | ||
| 123 | } retrieve_expiration_date_errors; | ||
| 124 | |||
| 125 | typedef struct { | ||
| 126 | double remaining_seconds; | ||
| 127 | retrieve_expiration_date_errors errors; | ||
| 128 | } retrieve_expiration_time_result; | ||
| 129 | |||
| 130 | typedef struct { | ||
| 131 | mp_state_enum result_state; | ||
| 132 | double remaining_seconds; | ||
| 133 | retrieve_expiration_date_errors errors; | ||
| 134 | } net_ssl_check_cert_result; | ||
| 135 | net_ssl_check_cert_result np_net_ssl_check_cert2(int days_till_exp_warn, int days_till_exp_crit); | ||
| 136 | |||
| 117 | mp_state_enum np_net_ssl_check_cert(int days_till_exp_warn, int days_till_exp_crit); | 137 | mp_state_enum np_net_ssl_check_cert(int days_till_exp_warn, int days_till_exp_crit); |
| 118 | mp_subcheck mp_net_ssl_check_cert(int days_till_exp_warn, int days_till_exp_crit); | 138 | mp_subcheck mp_net_ssl_check_cert(int days_till_exp_warn, int days_till_exp_crit); |
| 119 | #endif /* HAVE_SSL */ | 139 | #endif /* HAVE_SSL */ |
