summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/SSLIOP/IIOP_SSL_Transport.h
blob: f3a9432d053271a8ebe6ee57b1af5712ece3eadd (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// -*- C++ -*-

//=============================================================================
/**
 *  @file   IIOP_SSL_Transport.h
 *
 *  $Id$
 *
 *  @author Ossama Othman <ossama@uci.edu>
 */
//=============================================================================


#ifndef TAO_IIOP_SSL_TRANSPORT_H
#define TAO_IIOP_SSL_TRANSPORT_H

#include "ace/pre.h"

#include "SSLIOP_Export.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
#pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "tao/IIOP_Transport.h"

class TAO_ORB_Core;
class TAO_IIOP_SSL_Connection_Handler;
class TAO_Resume_Handle;

/**
 * @class TAO_IIOP_SSL_Transport
 *
 * @brief
 * IIOP Transport designed to be "SSL aware," i.e. it is
 * aware of the existence of the SSLIOP Transport.   It makes
 * sure that SSL session state from a previous connection is not
 * associated with the non-SSL connection handled by this handler.
 *
 * However, this class overrides the handle_input_i() method to
 * invalidate the current TSS SSL state during a standard IIOP
 * (insecure) upcall.  This prevents SSL session state from a previous
 * SSL connection from being associated with non-SSL connections
 * processed by this connection handler.  In particular, this is very
 * important for closing a security hole in nested upcalls.  For
 * example, an SSLIOP request is made.  During that secure upcall, an
 * insecure nested upcall is made.  A naive implementation would
 * associate the TSS SSL state from the secure upcall with the
 * insecure upcall.  This implementation closes that security hole.
 */

class TAO_SSLIOP_Export TAO_IIOP_SSL_Transport : public TAO_IIOP_Transport
{
public:
  /// Constructor.
  TAO_IIOP_SSL_Transport (TAO_IIOP_SSL_Connection_Handler *handler,
                          TAO_ORB_Core *orb_core,
                          CORBA::Boolean flag = 0);

  /// Default destructor.
  ~TAO_IIOP_SSL_Transport (void);

  /** @name Overridden Template Methods
   *
   * Please check the documentation in "tao/Transport.h" for more
   * details.
   */
  virtual int handle_input_i (TAO_Resume_Handle &rh,
                              ACE_Time_Value *max_wait_time = 0,
                              int block = 0);
protected:

};


#endif /*TAO_IIOP_SSL_TRANSPORT_H*/