00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file SSLIOP_OwnCredentials.h 00006 * 00007 * SSLIOP_OwnCredentials.h,v 1.11 2006/06/21 13:53:07 parsons Exp 00008 * 00009 * @author Ossama Othman <ossama@dre.vanderbilt.edu> 00010 */ 00011 //============================================================================= 00012 00013 00014 #ifndef TAO_SSLIOP_OWN_CREDENTIALS_H 00015 #define TAO_SSLIOP_OWN_CREDENTIALS_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_Credentials.h" 00026 00027 #if defined(_MSC_VER) 00028 #pragma warning(push) 00029 #pragma warning(disable:4250) 00030 #endif /* _MSC_VER */ 00031 00032 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00033 00034 namespace TAO 00035 { 00036 namespace SSLIOP 00037 { 00038 class OwnCredentials; 00039 typedef OwnCredentials* OwnCredentials_ptr; 00040 typedef TAO_Pseudo_Var_T<OwnCredentials> OwnCredentials_var; 00041 typedef TAO_Pseudo_Out_T<OwnCredentials> OwnCredentials_out; 00042 00043 /** 00044 * @class OwnCredentials 00045 * 00046 * @brief Credentials representing our identity, not our peer's 00047 * identity. 00048 * 00049 * @c OwnCredentials are a representation of our identity, not our 00050 * peer's identity. 00051 */ 00052 class OwnCredentials 00053 : public virtual SecurityLevel3::OwnCredentials, 00054 public virtual SSLIOP_Credentials 00055 { 00056 public: 00057 typedef OwnCredentials_ptr _ptr_type; 00058 typedef OwnCredentials_var _var_type; 00059 typedef OwnCredentials_out _out_type; 00060 00061 /// Constructor 00062 OwnCredentials (::X509 *cert, ::EVP_PKEY *evp); 00063 00064 static OwnCredentials_ptr _duplicate (OwnCredentials_ptr obj); 00065 static OwnCredentials_ptr _nil (void); 00066 static OwnCredentials_ptr _narrow (CORBA::Object_ptr obj 00067 ACE_ENV_ARG_DECL); 00068 00069 /** 00070 * @name SecurityLevel3::TargetCredentials Methods 00071 * 00072 * Methods required by the SecurityLevel3::Credentials 00073 * interface. 00074 */ 00075 //@{ 00076 SecurityLevel3::CredentialsType creds_type (ACE_ENV_SINGLE_ARG_DECL) 00077 ACE_THROW_SPEC ((CORBA::SystemException)); 00078 //@} 00079 00080 /** 00081 * @name SecurityLevel3::OwnCredentials Methods 00082 * 00083 * Methods required by the SecurityLevel3::OwnCredentials 00084 * interface. 00085 */ 00086 //@{ 00087 virtual SecurityLevel3::CredsInitiator_ptr creds_initiator ( 00088 ACE_ENV_SINGLE_ARG_DECL) 00089 ACE_THROW_SPEC ((CORBA::SystemException)); 00090 00091 virtual SecurityLevel3::CredsAcceptor_ptr creds_acceptor ( 00092 ACE_ENV_SINGLE_ARG_DECL) 00093 ACE_THROW_SPEC ((CORBA::SystemException)); 00094 00095 virtual void release_credentials (ACE_ENV_SINGLE_ARG_DECL) 00096 ACE_THROW_SPEC ((CORBA::SystemException)); 00097 //@} 00098 00099 protected: 00100 00101 /// Destructor 00102 /** 00103 * Protected destructor to enforce proper memory management 00104 * through the reference counting mechanism. 00105 */ 00106 ~OwnCredentials (void); 00107 }; 00108 00109 } // End SSLIOP namespace 00110 } // End TAO namespace 00111 00112 00113 TAO_END_VERSIONED_NAMESPACE_DECL 00114 00115 #if defined(_MSC_VER) 00116 #pragma warning(pop) 00117 #endif /* _MSC_VER */ 00118 00119 #include /**/ "ace/post.h" 00120 00121 #endif /* TAO_SSLIOP_OWN_CREDENTIALS_H */