commit - 1413a4886ffa120e82d4963368e82b4d5ec6eb2d
commit + bb20aeb9bcbb27eda540a6df2faf2d07e71d23f3
blob - 8f7b70afccb0e310793013e0f53ee5f38522a614
blob + 914d01651235ad16af2e81ebb3d9a045e1d39a37
--- src/ngircd/conn-ssl.c
+++ src/ngircd/conn-ssl.c
bool
ConnSSL_InitLibrary( void )
{
+ if (!array_bytes(&Conf_SSLOptions.ListenPorts))
+ return true;
+
#ifdef HAVE_LIBSSL
SSL_CTX *newctx;
* According to OpenSSL RAND_egd(3): "The automatic query of /var/run/egd-pool et al was added in OpenSSL 0.9.7";
* so it makes little sense to deal with PRNGD seeding ourselves.
*/
+ array_free(&Conf_SSLOptions.ListenPorts);
return false;
}
newctx = SSL_CTX_new(SSLv23_method());
if (!newctx) {
LogOpenSSLError("SSL_CTX_new()", NULL);
+ array_free(&Conf_SSLOptions.ListenPorts);
return false;
}
return true;
out:
SSL_CTX_free(newctx);
+ array_free(&Conf_SSLOptions.ListenPorts);
return false;
#endif
#ifdef HAVE_LIBGNUTLS
err = gnutls_global_init();
if (err) {
Log(LOG_ERR, "gnutls_global_init(): %s", gnutls_strerror(err));
+ array_free(&Conf_SSLOptions.ListenPorts);
return false;
}
- if (!ConnSSL_LoadServerKey_gnutls())
+ if (!ConnSSL_LoadServerKey_gnutls()) {
+ array_free(&Conf_SSLOptions.ListenPorts);
return false;
+ }
Log(LOG_INFO, "gnutls %s initialized.", gnutls_check_version(NULL));
initialized = true;
return true;
cert_file = Conf_SSLOptions.CertFile ? Conf_SSLOptions.CertFile:Conf_SSLOptions.KeyFile;
if (!cert_file) {
- Log(LOG_NOTICE, "No SSL server key configured, SSL disabled.");
+ Log(LOG_ERR, "No SSL server key configured!");
return false;
}
assert(ctx);
if (!Conf_SSLOptions.KeyFile) {
- Log(LOG_NOTICE, "No SSL server key configured, SSL disabled.");
+ Log(LOG_ERR, "No SSL server key configured!");
return false;
}
blob - 585e2ac0ae8ad1981c7e0b033855df39c2996659
blob + a4c2fe8aabc07c72ff5fa00b21330ea087612856
--- src/ngircd/ngircd.c
+++ src/ngircd/ngircd.c
/* SSL initialization */
if (!ConnSSL_InitLibrary())
Log(LOG_WARNING,
- "Warning: Error during SSL initialization, continuing ...");
+ "Error during SSL initialization, continuing without SSL ...");
/* Change root */
if (Conf_Chroot[0]) {