diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index 3bb6a32bba75bbdbc89d922e7a90bc2d742660a9..19e9aea881467733e55726a650baa7afae49b9b4 100644 (file)
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
SSL *ssl;
X509 *server_cert;
int connect_STARTTLS (void);
+# ifdef USE_OPENSSL
int check_certificate (X509 **);
+# endif
#endif
enum {
} else {
ssl_established = TRUE;
}
+# ifdef USE_OPENSSL
if ( check_cert ) {
if ((server_cert = SSL_get_peer_certificate (ssl)) != NULL) {
result = check_certificate (&server_cert);
my_close();
return result;
}
+# endif /* USE_OPENSSL */
}
#endif
break;
case 'D':
/* Check SSL cert validity */
-#ifdef HAVE_SSL
+#ifdef USE_OPENSSL
if (!is_intnonneg (optarg))
usage2 ("Invalid certificate expiration period",optarg);
days_till_exp = atoi (optarg);
I look for success instead (1) */
if (SSL_connect (ssl) == 1)
return OK;
+# ifdef USE_OPENSSL
ERR_print_errors_fp (stderr);
+# endif
}
else
{
return STATE_CRITICAL;
}
+# ifdef USE_OPENSSL
int
check_certificate (X509 ** certificate)
{
return STATE_OK;
}
+# endif /* USE_OPENSSL */
#endif
int