1
#include "SSLIOP_Accept_Strategy.h"
5
SSLIOP_Accept_Strategy,
6
"SSLIOP_Accept_Strategy.cpp,v 1.1 2002/11/13 22:16:26 ossama Exp")
9
TAO_SSLIOP_Accept_Strategy::TAO_SSLIOP_Accept_Strategy (
10
TAO_ORB_Core * orb_core,
11
const ACE_Time_Value & timeout)
12
: TAO_Accept_Strategy<TAO_SSLIOP_Connection_Handler,
13
ACE_SSL_SOCK_ACCEPTOR> (orb_core),
19
TAO_SSLIOP_Accept_Strategy::accept_svc_handler (handler_type * svc_handler)
21
ACE_TRACE ("TAO_SSLIOP_Accept_Strategy::accept_svc_handler");
23
// The following code is basically the same code found in
24
// ACE_Accept_Strategy::accept_svc_handler(). The only difference
25
// is that a timeout value is passed to the peer acceptor's accept()
26
// method. A timeout is necessary to prevent malicious or
27
// misbehaved clients from only completing the TCP handshake and not
28
// the SSL handshake. Without the timeout, a denial-of-service
29
// vulnerability would exist where multiple incomplete SSL passive
30
// connections (i.e. where only the TCP handshake is completed)
31
// could result in the server process running out of file
32
// descriptors. That would be due to the SSL handshaking process
33
// blocking/waiting for the handshake to complete.
35
// The timeout value will be modified. Make a copy.
36
ACE_Time_Value timeout (this->timeout_);
38
// Try to find out if the implementation of the reactor that we are
39
// using requires us to reset the event association for the newly
40
// created handle. This is because the newly created handle will
41
// inherit the properties of the listen handle, including its event
43
int reset_new_handle = this->reactor_->uses_event_associations ();
45
if (this->peer_acceptor_.accept (svc_handler->peer (), // stream
49
reset_new_handle // reset new handler
52
// Close down handler to avoid memory leaks.
53
svc_handler->close (0);
62
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
64
template class ACE_Accept_Strategy<TAO_SSLIOP_Connection_Handler, ACE_SSL_SOCK_ACCEPTOR>;
65
template class TAO_Accept_Strategy<TAO_SSLIOP_Connection_Handler, ACE_SSL_SOCK_ACCEPTOR>;
67
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
69
# pragma instantiate ACE_Accept_Strategy<TAO_SSLIOP_Connection_Handler, ACE_SSL_SOCK_ACCEPTOR>
70
# pragma instantiate TAO_Accept_Strategy<TAO_SSLIOP_Connection_Handler, ACE_SSL_SOCK_ACCEPTOR>
72
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */