IIOP_SSL_Connection_Handler.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file   IIOP_SSL_Connection_Handler.h
00006  *
00007  *  $Id: IIOP_SSL_Connection_Handler.h 78931 2007-07-18 09:59:36Z johnnyw $
00008  *
00009  *  @author Ossama Othman <ossama@dre.vanderbilt.edu>
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef TAO_IIOP_SSL_CONNECTION_HANDLER_H
00015 #define TAO_IIOP_SSL_CONNECTION_HANDLER_H
00016 
00017 #include /**/ "ace/pre.h"
00018 
00019 #include "orbsvcs/SSLIOP/SSLIOP_Export.h"
00020 
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 #pragma once
00023 #endif /* ACE_LACKS_PRAGMA_ONCE */
00024 
00025 #include "orbsvcs/SSLIOP/SSLIOP_Current.h"
00026 
00027 #include "orbsvcs/SSLIOPC.h"
00028 #include "tao/IIOP_Connection_Handler.h"
00029 
00030 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00031 
00032 namespace TAO
00033 {
00034 
00035   /**
00036    * @class IIOP_SSL_Connection_Handler
00037    *
00038    * @brief
00039    * IIOP connection handler designed to be "SSL aware," i.e. it is
00040    * aware of the existence of the SSLIOP connection handler.   It
00041    * makes sure that SSL session state from a previous connection is
00042    * not associated with the non-SSL connection handled by this
00043    * handler.
00044    *
00045    * This class is just a place holder to create the
00046    * TAO_IIOP_SSL_Transport  which does the work of clearing the TSS
00047    * SSL state.
00048    */
00049   class IIOP_SSL_Connection_Handler : public TAO_IIOP_Connection_Handler
00050   {
00051   public:
00052 
00053     /// Constructor.
00054     IIOP_SSL_Connection_Handler (ACE_Thread_Manager* t = 0);
00055     IIOP_SSL_Connection_Handler (TAO_ORB_Core *orb_core);
00056 
00057     /// Destructor.
00058     ~IIOP_SSL_Connection_Handler (void);
00059 
00060   };
00061 
00062   // ****************************************************************
00063 
00064   /**
00065    * @class Null_SSL_State_Guard
00066    *
00067    * @brief
00068    * This class sets up null TSS SSL state upon instantiation, and
00069    * restores the previous TSS SSL state when that instance goes out
00070    * of scope.
00071    *
00072    * This guard is used to make TSS SSL state configuration and
00073    * deconfiguration during an upcall exception safe.  Exceptions are
00074    * not supposed to be propagated up to the scope this guard is used
00075    * in, so this guard may be unnecessary.  However, since proper TSS
00076    * SSL state configuration/deconfiguration is critical to proper
00077    * security support, this guard is used to ensure that
00078    * configuration/deconfiguration is exception safe.
00079    */
00080   class Null_SSL_State_Guard
00081   {
00082   public:
00083 
00084     /// Constructor that sets up the null TSS SSL state.
00085     Null_SSL_State_Guard (TAO::SSLIOP::Current_ptr current,
00086                           int &result);
00087 
00088     /// Destructor that restores the previous TSS SSL state.
00089     ~Null_SSL_State_Guard (void);
00090 
00091   private:
00092 
00093     /// The SSLIOP::Current implementation that was previously
00094     /// associated with the current thread and invocation.
00095     /**
00096      * It is stored here until the invocation completes, after which
00097      * it placed back into TSS.
00098      */
00099     TAO::SSLIOP::Current_Impl *previous_current_impl_;
00100 
00101     /// Reference to the SSLIOP::Current object.
00102     TAO::SSLIOP::Current_ptr current_;
00103 
00104     /// Flag that specifies whether or not setup of the SSLIOP::Current
00105     /// object completed for the current thread and invocation.
00106     bool setup_done_;
00107 
00108   };
00109 
00110 } // End TAO namespace.
00111 
00112 TAO_END_VERSIONED_NAMESPACE_DECL
00113 
00114 #if defined (__ACE_INLINE__)
00115 #include "orbsvcs/SSLIOP/IIOP_SSL_Connection_Handler.inl"
00116 #endif /* __ACE_INLINE__ */
00117 
00118 
00119 #include /**/ "ace/post.h"
00120 
00121 #endif  /* TAO_IIOP_SSL_CONNECTION_HANDLER_H */

Generated on Sun Jan 27 16:12:22 2008 for TAO_SSLIOP by doxygen 1.3.6