ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/ircd.c
(Generate patch)

Comparing ircd-hybrid-8/src/ircd.c (file contents):
Revision 1302 by michael, Wed Mar 21 17:48:54 2012 UTC vs.
Revision 1303 by michael, Fri Mar 23 10:52:19 2012 UTC

# Line 445 | Line 445 | init_ssl(void)
445    {
446      const char *s;
447  
448 <    fprintf(stderr, "ERROR: Could not initialize the SSL context -- %s\n",
448 >    fprintf(stderr, "ERROR: Could not initialize the SSL Server context -- %s\n",
449              s = ERR_lib_error_string(ERR_get_error()));
450 <    ilog(LOG_TYPE_IRCD, "ERROR: Could not initialize the SSL context -- %s\n", s);
450 >    ilog(LOG_TYPE_IRCD, "ERROR: Could not initialize the SSL Server context -- %s\n", s);
451    }
452  
453    SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_NO_SSLv2);
454    SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_TLS_ROLLBACK_BUG|SSL_OP_ALL);
455    SSL_CTX_set_verify(ServerInfo.server_ctx, SSL_VERIFY_NONE, NULL);
456  
457 +  if ((ServerInfo.client_ctx = SSL_CTX_new(SSLv23_client_method())) == NULL)
458 +  {
459 +    const char *s;
460 +
461 +    fprintf(stderr, "ERROR: Could not initialize the SSL Client context -- %s\n",
462 +            s = ERR_lib_error_string(ERR_get_error()));
463 +    ilog(LOG_TYPE_IRCD, "ERROR: Could not initialize the SSL Client context -- %s\n", s);
464 +  }
465 +
466 +  SSL_CTX_set_options(ServerInfo.client_ctx, SSL_OP_NO_SSLv2);
467 +  SSL_CTX_set_options(ServerInfo.client_ctx, SSL_OP_TLS_ROLLBACK_BUG|SSL_OP_ALL);
468 +  SSL_CTX_set_verify(ServerInfo.client_ctx, SSL_VERIFY_NONE, NULL);
469 +
470    bio_spare_fd = save_spare_fd("SSL private key validation");
471   #endif /* HAVE_LIBCRYPTO */
472   }

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)