00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file SSLIOP_OwnCredentials.h 00006 * 00007 * $Id: SSLIOP_OwnCredentials.h 77001 2007-02-12 07:54:49Z johnnyw $ 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 00068 /** 00069 * @name SecurityLevel3::TargetCredentials Methods 00070 * 00071 * Methods required by the SecurityLevel3::Credentials 00072 * interface. 00073 */ 00074 //@{ 00075 SecurityLevel3::CredentialsType creds_type (void); 00076 //@} 00077 00078 /** 00079 * @name SecurityLevel3::OwnCredentials Methods 00080 * 00081 * Methods required by the SecurityLevel3::OwnCredentials 00082 * interface. 00083 */ 00084 //@{ 00085 virtual SecurityLevel3::CredsInitiator_ptr creds_initiator (); 00086 00087 virtual SecurityLevel3::CredsAcceptor_ptr creds_acceptor (); 00088 00089 virtual void release_credentials (void); 00090 //@} 00091 00092 protected: 00093 00094 /// Destructor 00095 /** 00096 * Protected destructor to enforce proper memory management 00097 * through the reference counting mechanism. 00098 */ 00099 ~OwnCredentials (void); 00100 }; 00101 00102 } // End SSLIOP namespace 00103 } // End TAO namespace 00104 00105 00106 TAO_END_VERSIONED_NAMESPACE_DECL 00107 00108 #if defined(_MSC_VER) 00109 #pragma warning(pop) 00110 #endif /* _MSC_VER */ 00111 00112 #include /**/ "ace/post.h" 00113 00114 #endif /* TAO_SSLIOP_OWN_CREDENTIALS_H */