TAO::SSLIOP::Current Class Reference

Implementation of the TAO SSLIOP::Current extension. More...

#include <SSLIOP_Current.h>

Inheritance diagram for TAO::SSLIOP::Current:

Inheritance graph
[legend]
Collaboration diagram for TAO::SSLIOP::Current:

Collaboration graph
[legend]
List of all members.

Downcast and Reference Counting Methods

These are basically the same methods generated by the IDL compiler for all IDL interfaces.

virtual const char * _interface_repository_id (void) const
Current_ptr _duplicate (Current_ptr obj)
Current_ptr _narrow (CORBA::Object_ptr obj)
Current_ptr _nil (void)

Public Types

typedef Current_ptr _ptr_type
typedef Current_var _var_type
typedef Current_out _out_type

Public Member Functions

 Current (TAO_ORB_Core *orb_core)
 Constructor.

virtual::SSLIOP::ASN_1_Cert * get_peer_certificate () throw (CORBA::SystemException, ::SSLIOP::Current::NoContext)
virtual::SSLIOP::SSL_Cert * get_peer_certificate_chain () throw (CORBA::SystemException, ::SSLIOP::Current::NoContext)
virtual CORBA::Boolean no_context () throw (CORBA::SystemException)
void tss_slot (size_t slot)
 Set the TSS slot ID assigned to this object.

void setup (Current_Impl *&prev_impl, Current_Impl *new_impl, bool &setup_done)
 Setup the Current.

void teardown (Current_Impl *prev_impl, bool &setup_done)
 Teardown the Current for this request.


Protected Member Functions

 ~Current (void)
 Destructor.

int implementation (Current_Impl *impl)
 Set the TSS SSLIOP::Current implementation.

Current_Implimplementation (void)
 Return the TSS SSLIOP::Current implementation.


Private Member Functions

 Current (const Current &)
void operator= (const Current &)

Private Attributes

size_t tss_slot_
 TSS slot assigned to this object.

TAO_ORB_Core *const  orb_core_

Detailed Description

Implementation of the TAO SSLIOP::Current extension.

This object can be used to obtain SSL session related information about the current execution context. For example, SSL peer certificate chains for the current request can be obtained from this object.

Definition at line 58 of file SSLIOP_Current.h.


Member Typedef Documentation

typedef Current_out TAO::SSLIOP::Current::_out_type
 

Reimplemented from CORBA::LocalObject.

Definition at line 65 of file SSLIOP_Current.h.

typedef Current_ptr TAO::SSLIOP::Current::_ptr_type
 

Implements CORBA::Current.

Definition at line 63 of file SSLIOP_Current.h.

typedef Current_var TAO::SSLIOP::Current::_var_type
 

Implements CORBA::Current.

Definition at line 64 of file SSLIOP_Current.h.


Constructor & Destructor Documentation

TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO::SSLIOP::Current::Current TAO_ORB_Core orb_core  ) 
 

Constructor.

Definition at line 16 of file SSLIOP_Current.cpp.

00017   : tss_slot_ (0),
00018     orb_core_ (orb_core)
00019 {
00020 }

TAO::SSLIOP::Current::~Current void   )  [protected, virtual]
 

Destructor.

Implements CORBA::Current.

Definition at line 22 of file SSLIOP_Current.cpp.

00023 {
00024 }

TAO::SSLIOP::Current::Current const Current  )  [private]
 

Prevent copying through the copy constructor and the assignment operator.

Implements CORBA::Current.


Member Function Documentation

TAO::SSLIOP::Current_ptr TAO::SSLIOP::Current::_duplicate Current_ptr  obj  )  [static]
 

Implements CORBA::Current.

Definition at line 138 of file SSLIOP_Current.cpp.

References CORBA::is_nil().

Referenced by _narrow(), and tao_TAO_SSLIOP_Current_duplicate().

00139 {
00140   if (!CORBA::is_nil (obj))
00141     obj->_add_ref ();
00142 
00143   return obj;
00144 }

const char * TAO::SSLIOP::Current::_interface_repository_id void   )  const [virtual]
 

Implements CORBA::Current.

Definition at line 147 of file SSLIOP_Current.cpp.

00148 {
00149   return "IDL:TAO/SSLIOP/Current:1.0";
00150 }

TAO::SSLIOP::Current_ptr TAO::SSLIOP::Current::_narrow CORBA::Object_ptr  obj  )  [static]
 

Implements CORBA::Current.

Definition at line 129 of file SSLIOP_Current.cpp.

References _duplicate().

Referenced by ACE_RCSID(), and tao_TAO_SSLIOP_Current_narrow().

00132 {
00133   return  TAO::SSLIOP::Current::_duplicate (
00134               dynamic_cast<TAO::SSLIOP::Current *> (obj));
00135 }

Current_ptr TAO::SSLIOP::Current::_nil void   )  [inline, static]
 

Implements CORBA::Current.

Definition at line 125 of file SSLIOP_Current.h.

Referenced by tao_TAO_SSLIOP_Current_nil().

00126       {
00127         return (Current_ptr)0;
00128       }

virtual ::SSLIOP::ASN_1_Cert* TAO::SSLIOP::Current::get_peer_certificate  )  throw (CORBA::SystemException, ::SSLIOP::Current::NoContext)
 

Return the peer certificate associated with the current request.

Implements SSLIOP::Current.

virtual ::SSLIOP::SSL_Cert* TAO::SSLIOP::Current::get_peer_certificate_chain  )  throw (CORBA::SystemException, ::SSLIOP::Current::NoContext)
 

Return the certificate chain associated with the current execution context. If no SSL session is being used for the request or upcall, then the NoContext exception is raised. On the client side, the chain does include the peer (server) certficate. However, the certificate chain on the server side does NOT contain the peer (client) certificate.

Implements SSLIOP::Current.

ACE_INLINE TAO::SSLIOP::Current_Impl * TAO::SSLIOP::Current::implementation void   )  [protected]
 

Return the TSS SSLIOP::Current implementation.

Definition at line 23 of file SSLIOP_Current.inl.

References TAO_ORB_Core::get_tss_resource(), and TAO::SL3::SecurityCurrent_Impl::tag.

Referenced by setup(), and teardown().

00024 {
00025   if (this->orb_core_ == 0)
00026     return 0;
00027 
00028   TAO::SL3::SecurityCurrent_Impl *impl =
00029     static_cast<TAO::SL3::SecurityCurrent_Impl *> (
00030       this->orb_core_->get_tss_resource (this->tss_slot_));
00031 
00032   // Make sure we've got SSL session state in TSS before allowing
00033   // further use of the SSLIOP::Current object.
00034   if (impl != 0 && impl->tag () == ::SSLIOP::TAG_SSL_SEC_TRANS)
00035     return dynamic_cast<TAO::SSLIOP::Current_Impl *> (impl);
00036 
00037   return 0;
00038 }

ACE_INLINE int TAO::SSLIOP::Current::implementation Current_Impl impl  )  [protected]
 

Set the TSS SSLIOP::Current implementation.

Definition at line 14 of file SSLIOP_Current.inl.

References TAO_ORB_Core::set_tss_resource().

00015 {
00016   if (this->orb_core_ == 0)
00017     return -1;
00018 
00019   return this->orb_core_->set_tss_resource (this->tss_slot_, impl);
00020 }

virtual CORBA::Boolean TAO::SSLIOP::Current::no_context  )  throw (CORBA::SystemException) [virtual]
 

This method is mostly useful as an inexpensive means of determining whether or not SSL session state is available.

Returns:
true if the current execution context is not within a SSL session.

Implements SSLIOP::Current.

void TAO::SSLIOP::Current::operator= const Current  )  [private]
 

Prevent copying through the copy constructor and the assignment operator.

Implements CORBA::Current.

void TAO::SSLIOP::Current::setup Current_Impl *&  prev_impl,
Current_Impl new_impl,
bool &  setup_done
 

Setup the Current.

Definition at line 102 of file SSLIOP_Current.cpp.

References implementation().

00105 {
00106   // Set the current context and remember the old one.
00107 
00108   prev_impl = this->implementation ();
00109 
00110   (void) this->implementation (new_impl);  // Check for error?
00111 
00112   // Setup is complete.
00113   setup_done = true;
00114 }

void TAO::SSLIOP::Current::teardown Current_Impl prev_impl,
bool &  setup_done
 

Teardown the Current for this request.

Definition at line 117 of file SSLIOP_Current.cpp.

References implementation().

00119 {
00120   if (setup_done)
00121     {
00122       // Reset the old context.
00123       (void) this->implementation (prev_impl);
00124       setup_done = false;
00125     }
00126 }

TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE void TAO::SSLIOP::Current::tss_slot size_t  slot  ) 
 

Set the TSS slot ID assigned to this object.

Definition at line 8 of file SSLIOP_Current.inl.

Referenced by TAO::SSLIOP::ORBInitializer::post_init().

00009 {
00010   this->tss_slot_ = slot;
00011 }


Member Data Documentation

TAO_ORB_Core* const TAO::SSLIOP::Current::orb_core_ [private]
 

Pointer to the ORB Core corresponding to the ORB with which this object is registered.

Reimplemented from CORBA::Object.

Definition at line 160 of file SSLIOP_Current.h.

size_t TAO::SSLIOP::Current::tss_slot_ [private]
 

TSS slot assigned to this object.

Definition at line 156 of file SSLIOP_Current.h.


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 13:55:57 2006 for TAO_SSLIOP by doxygen 1.3.6