diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2023-02-09 00:35:20 +0100 |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2023-02-09 00:35:20 +0100 |
commit | 28b5a1cc454774474b98037acd283a1da4c3f7ad (patch) | |
tree | cf5c7be92d080622ecb117881885af2476e6c404 | |
parent | 239f569b6cdb8dbdb22f2431e39cc7df98dea46d (diff) | |
download | monitoring-plugins-28b5a1cc454774474b98037acd283a1da4c3f7ad.tar.gz |
Make preprocessor fallback for gnutls more readable
-rw-r--r-- | plugins/sslutils.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/sslutils.c b/plugins/sslutils.c index d542c499..a7d80196 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 | |||
136 | if (cert && privkey) { | 136 | if (cert && privkey) { |
137 | #ifdef USE_OPENSSL | 137 | #ifdef USE_OPENSSL |
138 | if (!SSL_CTX_use_certificate_chain_file(c, cert)) { | 138 | if (!SSL_CTX_use_certificate_chain_file(c, cert)) { |
139 | #else | 139 | #elif USE_GNUTLS |
140 | #if USE_GNUTLS | ||
141 | if (!SSL_CTX_use_certificate_file(c, cert, SSL_FILETYPE_PEM)) { | 140 | if (!SSL_CTX_use_certificate_file(c, cert, SSL_FILETYPE_PEM)) { |
142 | #else | 141 | #else |
143 | #error Unported for unknown SSL library | 142 | #error Unported for unknown SSL library |
144 | #endif | 143 | #endif |
145 | #endif | ||
146 | printf ("%s\n", _("CRITICAL - Unable to open certificate chain file!\n")); | 144 | printf ("%s\n", _("CRITICAL - Unable to open certificate chain file!\n")); |
147 | return STATE_CRITICAL; | 145 | return STATE_CRITICAL; |
148 | } | 146 | } |