Module: monitoring-plugins
Branch: gnutlsfix
Commit: 28b5a1cc454774474b98037acd283a1da4c3f7ad
Author: Lorenz Kästle <[email protected]>
Date: Thu Feb 9 00:35:20 2023 +0100
URL:
https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=28b5a1c
Make preprocessor fallback for gnutls more readable
---
plugins/sslutils.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/plugins/sslutils.c b/plugins/sslutils.c
index d542c49..a7d8019 100644
--- a/plugins/sslutils.c
+++ b/plugins/sslutils.c
@@ -136,13 +136,11 @@ int np_net_ssl_init_with_hostname_version_and_cert(int
sd, char *host_name, int
if (cert && privkey) {
#ifdef USE_OPENSSL
if (!SSL_CTX_use_certificate_chain_file(c, cert)) {
-#else
-#if USE_GNUTLS
+#elif USE_GNUTLS
if (!SSL_CTX_use_certificate_file(c, cert, SSL_FILETYPE_PEM)) {
#else
#error Unported for unknown SSL library
#endif
-#endif
printf ("%s\n", _("CRITICAL - Unable to open
certificate chain file!\n"));
return STATE_CRITICAL;
}