SSLIOP_Current_Impl.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // ===================================================================
00004 /**
00005  *  @file   SSLIOP_Current_Impl.h
00006  *
00007  *  SSLIOP_Current_Impl.h,v 1.12 2006/03/14 06:14:35 jtc Exp
00008  *
00009  *  @author Ossama Othman <ossama@uci.edu>
00010  */
00011 // ===================================================================
00012 
00013 #ifndef TAO_SSLIOP_CURRENT_IMPL_H
00014 #define TAO_SSLIOP_CURRENT_IMPL_H
00015 
00016 #include /**/ "ace/pre.h"
00017 
00018 #include "ace/config-all.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #include "orbsvcs/SSLIOPC.h"
00025 #include "orbsvcs/Security/SL3_SecurityCurrent_Impl.h"
00026 
00027 #include <openssl/ssl.h>
00028 
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030 
00031 namespace TAO
00032 {
00033   namespace SSLIOP
00034   {
00035     /**
00036      * @class Current_Impl
00037      *
00038      * @brief TSS portion of the TAO SSLIOP::Current extension, and
00039      *        the SSLIOP-specific SecurityLevel3::SecurityCurrent
00040      *        object.
00041      *
00042      * This class encapsulates the thread-specific state of an SSL
00043      * session during a given upcall.
00044      */
00045     class Current_Impl : public TAO::SL3::SecurityCurrent_Impl
00046     {
00047     public:
00048 
00049       /// Constructor.
00050       Current_Impl (void);
00051 
00052       /// Destructor
00053       ~Current_Impl (void);
00054 
00055       /// Implementation of the SSLIOP-specific
00056       /// SecurityLevel3::client_credentials() method.
00057       virtual SecurityLevel3::ClientCredentials_ptr client_credentials (
00058           ACE_ENV_SINGLE_ARG_DECL)
00059         ACE_THROW_SPEC ((CORBA::SystemException));
00060 
00061       /// Implementation of the SSLIOP-specific
00062       /// SecurityLevel3::request_is_local() method.
00063       virtual CORBA::Boolean request_is_local (
00064           ACE_ENV_SINGLE_ARG_DECL)
00065         ACE_THROW_SPEC ((CORBA::SystemException));
00066 
00067       /// Return the SSL peer certificate associated with the
00068       /// current request as an octet sequence, i.e. a DER encoded
00069       /// certificate.
00070       void get_peer_certificate (::SSLIOP::ASN_1_Cert *certificate);
00071 
00072       /// Return the SSL peer certificate chain associated with the
00073       /// current request as a sequence of DER encoded certificates.
00074       void get_peer_certificate_chain (::SSLIOP::SSL_Cert *cert_chain);
00075 
00076       /// Set the pointer to the underlying SSL session state.
00077       void ssl (SSL *s);
00078 
00079       /// Return pointer to the SSL session state for the current upcall.
00080       SSL *ssl (void);
00081 
00082     protected:
00083 
00084       /// Return the unique tag that identifies the concrete subclass.
00085       virtual CORBA::ULong tag (void) const;
00086 
00087     private:
00088 
00089       /// Prevent copying through the copy constructor and the assignment
00090       /// operator.
00091       //@{
00092       Current_Impl (const Current_Impl &);
00093       void operator= (const Current_Impl &);
00094       //@}
00095 
00096     private:
00097 
00098       /// The SSL session state corresponding to the current upcall.
00099       SSL *ssl_;
00100 
00101     };
00102   }  // End SSLIOP namespace.
00103 }  // End TAO namespace.
00104 
00105 TAO_END_VERSIONED_NAMESPACE_DECL
00106 
00107 #if defined (__ACE_INLINE__)
00108 # include "orbsvcs/SSLIOP/SSLIOP_Current_Impl.inl"
00109 #endif /* __ACE_INLINE__ */
00110 
00111 #include /**/ "ace/post.h"
00112 
00113 #endif  /* TAO_SSLIOP_CURRENT_IMPL_H */

Generated on Thu Nov 9 13:54:14 2006 for TAO_SSLIOP by doxygen 1.3.6