SL3_ContextEstablishmentPolicy.cpp

Go to the documentation of this file.
00001 // SL3_ContextEstablishmentPolicy.cpp,v 1.3 2006/03/14 06:14:35 jtc Exp
00002 
00003 #include "orbsvcs/Security/SL3_ContextEstablishmentPolicy.h"
00004 
00005 
00006 ACE_RCSID (Security,
00007            SL3_ContextEstablishmentPolicy,
00008            "SL3_ContextEstablishmentPolicy.cpp,v 1.3 2006/03/14 06:14:35 jtc Exp")
00009 
00010 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00011 
00012 TAO::SL3::ContextEstablishmentPolicy::ContextEstablishmentPolicy (
00013   SecurityLevel3::CredsDirective             creds_directive,
00014   const SecurityLevel3::OwnCredentialsList & creds_list,
00015   SecurityLevel3::FeatureDirective           use_client_auth,
00016   SecurityLevel3::FeatureDirective           use_target_auth,
00017   SecurityLevel3::FeatureDirective           use_confidentiality,
00018   SecurityLevel3::FeatureDirective           use_integrity)
00019   : creds_directive_ (creds_directive),
00020     creds_list_ (creds_list),
00021     use_client_auth_ (use_client_auth),
00022     use_target_auth_ (use_target_auth),
00023     use_confidentiality_ (use_confidentiality),
00024     use_integrity_ (use_integrity)
00025 {
00026 }
00027 
00028 TAO::SL3::ContextEstablishmentPolicy::~ContextEstablishmentPolicy (void)
00029 {
00030 }
00031 
00032 SecurityLevel3::CredsDirective
00033 TAO::SL3::ContextEstablishmentPolicy::creds_directive (
00034     ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
00035   ACE_THROW_SPEC ((CORBA::SystemException))
00036 {
00037   return this->creds_directive_;
00038 }
00039 
00040 SecurityLevel3::OwnCredentialsList *
00041 TAO::SL3::ContextEstablishmentPolicy::creds_list (ACE_ENV_SINGLE_ARG_DECL)
00042   ACE_THROW_SPEC ((CORBA::SystemException))
00043 {
00044   SecurityLevel3::OwnCredentialsList * creds = 0;
00045 
00046   ACE_NEW_THROW_EX (creds,
00047                     SecurityLevel3::OwnCredentialsList (this->creds_list_),
00048                     CORBA::NO_MEMORY ());
00049   ACE_CHECK_RETURN (creds);
00050 
00051   return creds;
00052 }
00053 
00054 SecurityLevel3::FeatureDirective
00055 TAO::SL3::ContextEstablishmentPolicy::use_client_auth (
00056     ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
00057   ACE_THROW_SPEC ((CORBA::SystemException))
00058 {
00059   return this->use_client_auth_;
00060 }
00061 
00062 SecurityLevel3::FeatureDirective
00063 TAO::SL3::ContextEstablishmentPolicy::use_target_auth (
00064     ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
00065   ACE_THROW_SPEC ((CORBA::SystemException))
00066 {
00067   return this->use_target_auth_;
00068 }
00069 
00070 SecurityLevel3::FeatureDirective
00071 TAO::SL3::ContextEstablishmentPolicy::use_confidentiality (
00072     ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
00073   ACE_THROW_SPEC ((CORBA::SystemException))
00074 {
00075   return this->use_confidentiality_;
00076 }
00077 
00078 SecurityLevel3::FeatureDirective
00079 TAO::SL3::ContextEstablishmentPolicy::use_integrity (
00080     ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
00081   ACE_THROW_SPEC ((CORBA::SystemException))
00082 {
00083   return this->use_integrity_;
00084 }
00085 
00086 CORBA::PolicyType
00087 TAO::SL3::ContextEstablishmentPolicy::policy_type (
00088     ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
00089   ACE_THROW_SPEC ((CORBA::SystemException))
00090 {
00091   return SecurityLevel3::ContextEstablishmentPolicyType;
00092 }
00093 
00094 CORBA::Policy_ptr
00095 TAO::SL3::ContextEstablishmentPolicy::copy (ACE_ENV_SINGLE_ARG_DECL)
00096   ACE_THROW_SPEC ((CORBA::SystemException))
00097 {
00098   CORBA::Policy_ptr p = CORBA::Policy::_nil ();
00099   ACE_NEW_THROW_EX (p,
00100                     TAO::SL3::ContextEstablishmentPolicy (
00101                       this->creds_directive_,
00102                       this->creds_list_,
00103                       this->use_client_auth_,
00104                       this->use_target_auth_,
00105                       this->use_confidentiality_,
00106                       this->use_integrity_),
00107                     CORBA::NO_MEMORY ());
00108   ACE_CHECK_RETURN (p);
00109 
00110   return p;
00111 }
00112 
00113 void
00114 TAO::SL3::ContextEstablishmentPolicy::destroy (
00115     ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
00116   ACE_THROW_SPEC ((CORBA::SystemException))
00117 {
00118   this->creds_directive_     = SecurityLevel3::CD_Default;
00119   this->creds_list_.length (0);
00120   this->use_client_auth_     = SecurityLevel3::FD_UseDefault;
00121   this->use_target_auth_     = SecurityLevel3::FD_UseDefault;
00122   this->use_confidentiality_ = SecurityLevel3::FD_UseDefault;
00123   this->use_integrity_       = SecurityLevel3::FD_UseDefault;
00124 }
00125 
00126 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Thu Nov 9 13:50:47 2006 for TAO_Security by doxygen 1.3.6