https://bugs.gentoo.org/880211 https://github.com/monitoring-plugins/monitoring-plugins/issues/1834 https://github.com/monitoring-plugins/monitoring-plugins/commit/31bdbfce92de2dc7717fe13a8d1ca8e7dbf850d4 diff --git a/plugins/sslutils.c b/plugins/sslutils.c index 286273f6..c26c4fb3 100644 --- a/plugins/sslutils.c +++ b/plugins/sslutils.c @@ -134,7 +134,12 @@ int np_net_ssl_init_with_hostname_version_and_cert(int sd, char *host_name, int return STATE_CRITICAL; } if (cert && privkey) { +#ifdef USE_GNUTLS + SSL_CTX_use_certificate_file(c, cert, SSL_FILETYPE_PEM); +#endif +#ifdef USE_OPENSSL SSL_CTX_use_certificate_chain_file(c, cert); +#endif SSL_CTX_use_PrivateKey_file(c, privkey, SSL_FILETYPE_PEM); #ifdef USE_OPENSSL if (!SSL_CTX_check_private_key(c)) {