summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/SSLIOP/IIOP_SSL_Transport.cpp
blob: eceb03b8b86e49f864a6ac50adc1e361081f9eed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include "orbsvcs/SSLIOP/IIOP_SSL_Transport.h"
#include "orbsvcs/SSLIOP/IIOP_SSL_Connection_Handler.h"
#include "orbsvcs/SSLIOP/SSLIOP_Util.h"

#include "tao/ORB_Core.h"
#include "tao/ORB.h"
#include "tao/Timeprobe.h"
#include "tao/debug.h"


ACE_RCSID (SSLIOP,
           IIOP_SSL_Transport,
           "$Id$")

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

TAO::IIOP_SSL_Transport::IIOP_SSL_Transport (
    IIOP_SSL_Connection_Handler *handler,
    TAO_ORB_Core *orb_core,
    CORBA::Boolean flag)
  : TAO_IIOP_Transport (handler,
                        orb_core,
                        flag)
{
  this->current_ =
    TAO::SSLIOP::Util::current (orb_core);
}

TAO::IIOP_SSL_Transport::~IIOP_SSL_Transport (void)
{
}

int
TAO::IIOP_SSL_Transport::handle_input (TAO_Resume_Handle &rh,
                                       ACE_Time_Value *max_wait_time,
                                       int block)
{
  int result = 0;

  // Invalidate the TSS SSL session state to make sure that SSL state
  // from a previous SSL connection is not confused with this non-SSL
  // connection.
  TAO::Null_SSL_State_Guard guard (this->current_.in (), result);

  if (result != 0)
    return -1;

  return this->TAO_IIOP_Transport::handle_input (rh, max_wait_time, block);
}

TAO_END_VERSIONED_NAMESPACE_DECL