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/trunk/src/ircd.c (file contents):
Revision 2227 by michael, Thu Jun 6 17:35:45 2013 UTC vs.
Revision 2228 by michael, Thu Jun 13 19:46:30 2013 UTC

# Line 410 | Line 410 | setup_corefile(void)
410   #endif
411   }
412  
413 + #ifdef HAVE_LIBCRYPTO
414 + static int
415 + always_accept_verify_cb(int preverify_ok, X509_STORE_CTX *x509_ctx)
416 + {
417 +  return 1;
418 + }
419 + #endif
420 +
421   /* init_ssl()
422   *
423   * inputs       - nothing
# Line 434 | Line 442 | ssl_init(void)
442  
443    SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3|SSL_OP_NO_TLSv1);
444    SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_TLS_ROLLBACK_BUG|SSL_OP_ALL);
445 <  SSL_CTX_set_verify(ServerInfo.server_ctx, SSL_VERIFY_NONE, NULL);
445 >  SSL_CTX_set_verify(ServerInfo.server_ctx, SSL_VERIFY_PEER|SSL_VERIFY_CLIENT_ONCE,
446 >                     always_accept_verify_cb);
447  
448    if ((ServerInfo.client_ctx = SSL_CTX_new(SSLv23_client_method())) == NULL)
449    {
# Line 447 | Line 456 | ssl_init(void)
456  
457    SSL_CTX_set_options(ServerInfo.client_ctx, SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3|SSL_OP_NO_TLSv1);
458    SSL_CTX_set_options(ServerInfo.client_ctx, SSL_OP_TLS_ROLLBACK_BUG|SSL_OP_ALL);
459 <  SSL_CTX_set_verify(ServerInfo.client_ctx, SSL_VERIFY_NONE, NULL);
459 >    SSL_CTX_set_verify(ServerInfo.client_ctx, SSL_VERIFY_PEER|SSL_VERIFY_CLIENT_ONCE,
460 >                     always_accept_verify_cb);
461   #endif /* HAVE_LIBCRYPTO */
462   }
463  

Diff Legend

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