mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-04-15 22:00:06 -04:00
sslutils.c: Move function after a function it uses to avoid forward declarations
This commit is contained in:
parent
ce1453a45a
commit
c4704e163e
1 changed files with 12 additions and 11 deletions
|
|
@ -191,17 +191,6 @@ int np_net_ssl_read(void *buf, int num) {
|
|||
return SSL_read(s, buf, num);
|
||||
}
|
||||
|
||||
int 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);
|
||||
return(np_net_ssl_check_certificate(certificate, days_till_exp_warn, days_till_exp_crit));
|
||||
# else /* ifndef USE_OPENSSL */
|
||||
printf("%s\n", _("WARNING - Plugin does not support checking certificates."));
|
||||
return STATE_WARNING;
|
||||
# endif /* USE_OPENSSL */
|
||||
}
|
||||
|
||||
int np_net_ssl_check_certificate(X509 *certificate, int days_till_exp_warn, int days_till_exp_crit){
|
||||
# ifdef USE_OPENSSL
|
||||
X509_NAME *subj=NULL;
|
||||
|
|
@ -328,4 +317,16 @@ int np_net_ssl_check_certificate(X509 *certificate, int days_till_exp_warn, int
|
|||
# endif /* USE_OPENSSL */
|
||||
}
|
||||
|
||||
int 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);
|
||||
return(np_net_ssl_check_certificate(certificate, days_till_exp_warn, days_till_exp_crit));
|
||||
# else /* ifndef USE_OPENSSL */
|
||||
printf("%s\n", _("WARNING - Plugin does not support checking certificates."));
|
||||
return STATE_WARNING;
|
||||
# endif /* USE_OPENSSL */
|
||||
}
|
||||
|
||||
|
||||
#endif /* HAVE_SSL */
|
||||
|
|
|
|||
Loading…
Reference in a new issue