X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Fconn-ssl.c;h=45e6458a19d5805d48b13a11f27c639cd3ee3963;hb=888c52468373e3680fa1138830643848675779e5;hp=914d01651235ad16af2e81ebb3d9a045e1d39a37;hpb=bb20aeb9bcbb27eda540a6df2faf2d07e71d23f3;p=ngircd-alex.git diff --git a/src/ngircd/conn-ssl.c b/src/ngircd/conn-ssl.c index 914d0165..45e6458a 100644 --- a/src/ngircd/conn-ssl.c +++ b/src/ngircd/conn-ssl.c @@ -156,7 +156,7 @@ Load_DH_params(void) bool ret = true; if (!Conf_SSLOptions.DHFile) { - Log(LOG_NOTICE, "Configuration option \"SSLDHFile\" not set!"); + Log(LOG_NOTICE, "Configuration option \"DHFile\" not set!"); return false; } fp = fopen(Conf_SSLOptions.DHFile, "r"); @@ -201,7 +201,7 @@ Load_DH_params(void) } if (need_dhgenerate) { Log(LOG_WARNING, - "SSLDHFile not set, generating %u bit DH parameters. This may take a while ...", + "DHFile not set, generating %u bit DH parameters. This may take a while ...", DH_BITS); err = gnutls_dh_params_generate2(tmp_dh_params, DH_BITS); if (err < 0) { @@ -241,8 +241,10 @@ void ConnSSL_Free(CONNECTION *c) bool ConnSSL_InitLibrary( void ) { - if (!array_bytes(&Conf_SSLOptions.ListenPorts)) + if (!Conf_SSLInUse()) { + LogDebug("SSL not in use, skipping initialization."); return true; + } #ifdef HAVE_LIBSSL SSL_CTX *newctx; @@ -723,6 +725,13 @@ ConnSSL_GetCipherInfo(CONNECTION *c, char *buf, size_t len) #endif } +#else + +bool +ConnSSL_InitLibrary(void) +{ + return true; +} #endif /* SSL_SUPPORT */ /* -eof- */