diff options
Diffstat (limited to 'plugins/sslutils.c')
-rw-r--r-- | plugins/sslutils.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/sslutils.c b/plugins/sslutils.c index 2ec91904..687bffb7 100644 --- a/plugins/sslutils.c +++ b/plugins/sslutils.c | |||
@@ -1,9 +1,9 @@ | |||
1 | /***************************************************************************** | 1 | /***************************************************************************** |
2 | * | 2 | * |
3 | * Nagios plugins SSL utilities | 3 | * Monitoring Plugins SSL utilities |
4 | * | 4 | * |
5 | * License: GPL | 5 | * License: GPL |
6 | * Copyright (c) 2005-2010 Nagios Plugins Development Team | 6 | * Copyright (c) 2005-2010 Monitoring Plugins Development Team |
7 | * | 7 | * |
8 | * Description: | 8 | * Description: |
9 | * | 9 | * |
@@ -86,10 +86,12 @@ int np_net_ssl_init_with_hostname_version_and_cert(int sd, char *host_name, int | |||
86 | if (cert && privkey) { | 86 | if (cert && privkey) { |
87 | SSL_CTX_use_certificate_file(c, cert, SSL_FILETYPE_PEM); | 87 | SSL_CTX_use_certificate_file(c, cert, SSL_FILETYPE_PEM); |
88 | SSL_CTX_use_PrivateKey_file(c, privkey, SSL_FILETYPE_PEM); | 88 | SSL_CTX_use_PrivateKey_file(c, privkey, SSL_FILETYPE_PEM); |
89 | #ifdef USE_OPENSSL | ||
89 | if (!SSL_CTX_check_private_key(c)) { | 90 | if (!SSL_CTX_check_private_key(c)) { |
90 | printf ("%s\n", _("CRITICAL - Private key does not seem to match certificate!\n")); | 91 | printf ("%s\n", _("CRITICAL - Private key does not seem to match certificate!\n")); |
91 | return STATE_CRITICAL; | 92 | return STATE_CRITICAL; |
92 | } | 93 | } |
94 | #endif | ||
93 | } | 95 | } |
94 | #ifdef SSL_OP_NO_TICKET | 96 | #ifdef SSL_OP_NO_TICKET |
95 | SSL_CTX_set_options(c, SSL_OP_NO_TICKET); | 97 | SSL_CTX_set_options(c, SSL_OP_NO_TICKET); |