/*
* ngIRCd -- The Next Generation IRC Daemon
- *
- * SSL wrapper functions.
* Copyright (c) 2005-2008 Florian Westphal <fw@strlen.de>
*/
#include "portab.h"
+
+/**
+ * @file
+ * SSL wrapper functions
+ */
+
#include "imp.h"
#include "conf-ssl.h"
#include <unistd.h>
#include <gnutls/x509.h>
-#define DH_BITS 1024
+#define DH_BITS 2048
static gnutls_certificate_credentials_t x509_cred;
static gnutls_dh_params_t dh_params;
int ret;
assert(c != NULL);
#ifdef HAVE_LIBSSL
- if (!ssl_ctx) /* NULL when library initialization failed */
+ if (!ssl_ctx) {
+ Log(LOG_ERR, "Cannot init ssl_ctx: OpenSSL initialization failed at startup");
return false;
-
+ }
assert(c->ssl_state.ssl == NULL);
c->ssl_state.ssl = SSL_new(ssl_ctx);