#include <SSLIOP_ORBInitializer.h>
Inheritance diagram for TAO::SSLIOP::ORBInitializer:
Public Member Functions | |
ORBInitializer (::Security::QOP qop, CSIIOP::AssociationOptions csiv2_target_supports, CSIIOP::AssociationOptions csiv2_target_requires) | |
Constructor. | |
virtual void | pre_init (PortableInterceptor::ORBInitInfo_ptr info) |
virtual void | post_init (PortableInterceptor::ORBInitInfo_ptr info) |
Private Member Functions | |
size_t | get_tss_slot_id (PortableInterceptor::ORBInitInfo_ptr info) |
Private Attributes | |
::Security::QOP | qop_ |
The default quality-of-protection settings in use. | |
CSIIOP::AssociationOptions | csiv2_target_supports_ |
Default support CSIv2 association options. | |
CSIIOP::AssociationOptions | csiv2_target_requires_ |
Default required CSIv2 association options. |
Definition at line 52 of file SSLIOP_ORBInitializer.h.
TAO::SSLIOP::ORBInitializer::ORBInitializer | ( | ::Security::QOP | qop, | |
CSIIOP::AssociationOptions | csiv2_target_supports, | |||
CSIIOP::AssociationOptions | csiv2_target_requires | |||
) |
Constructor.
size_t TAO::SSLIOP::ORBInitializer::get_tss_slot_id | ( | PortableInterceptor::ORBInitInfo_ptr | info | ) | [private] |
Definition at line 165 of file SSLIOP_ORBInitializer.cpp.
References ACE_DEBUG, TAO_Pseudo_Var_T< T >::in(), and LM_DEBUG.
00167 { 00168 // Obtain the Security Service TSS slot ID from the SecurityCurrent 00169 // object. 00170 CORBA::Object_var obj = 00171 info->resolve_initial_references ("SecurityLevel3:SecurityCurrent"); 00172 00173 SecurityLevel3::SecurityCurrent_var current = 00174 SecurityLevel3::SecurityCurrent::_narrow (obj.in ()); 00175 00176 TAO::SL3::SecurityCurrent * security_current = 00177 dynamic_cast<TAO::SL3::SecurityCurrent *> (current.in ()); 00178 00179 if (security_current == 0) 00180 { 00181 ACE_DEBUG ((LM_DEBUG, 00182 "Unable to obtain TSS slot ID from " 00183 "\"SecurityCurrent\" object.\n")); 00184 00185 throw CORBA::INTERNAL (); 00186 } 00187 00188 return security_current->tss_slot (); 00189 }
void TAO::SSLIOP::ORBInitializer::post_init | ( | PortableInterceptor::ORBInitInfo_ptr | info | ) | [virtual] |
Definition at line 74 of file SSLIOP_ORBInitializer.cpp.
References CORBA::SystemException::_tao_minor_code(), ACE_NEW_THROW_EX, CORBA::COMPLETED_NO, TAO_Pseudo_Var_T< T >::in(), ACE_Auto_Basic_Ptr< X >::release(), and TAO::VMCID.
00076 { 00077 // Note we do not store the SSLIOP::Current as a class member since 00078 // we need to avoid potential problems where the same 00079 // SSLIOP::Current object is shared between ORBs. Each ORB should 00080 // have its own unique SSLIOP::Current object. By obtaining the 00081 // SSLIOP::Current object from the resolve_initial_references() 00082 // mechanism, we are guaranteed that the SSLIOP::Current object is 00083 // specific to the ORB being initialized since a new SSLIOP::Current 00084 // object is registered for each ORB in this ORBInitializer's 00085 // pre_init() method. 00086 00087 // Create the SSLIOP secure invocation server request interceptor. 00088 PortableInterceptor::ServerRequestInterceptor_ptr si = 00089 PortableInterceptor::ServerRequestInterceptor::_nil (); 00090 ACE_NEW_THROW_EX (si, 00091 TAO::SSLIOP::Server_Invocation_Interceptor 00092 (info, 00093 this->qop_, 00094 this->get_tss_slot_id (info)), 00095 CORBA::NO_MEMORY ( 00096 CORBA::SystemException::_tao_minor_code ( 00097 TAO::VMCID, 00098 ENOMEM), 00099 CORBA::COMPLETED_NO)); 00100 00101 PortableInterceptor::ServerRequestInterceptor_var si_interceptor = 00102 si; 00103 00104 // Register the SSLIOP secure invocation server request interceptor 00105 // with the ORB. 00106 info->add_server_request_interceptor (si_interceptor.in ()); 00107 00108 // TAO_ORBInitInfo_var tao_info = 00109 // TAO_ORBInitInfo::_narrow (info 00110 //); 00111 00112 // if (CORBA::is_nil (tao_info.in ())) 00113 // ACE_THROW (CORBA::INV_OBJREF ()); 00114 00115 // TAO_ORB_Core * orb_core = tao_info->orb_core (); 00116 00117 // // Create the SSLIOP IOR interceptor. 00118 // PortableInterceptor::IORInterceptor_ptr ii = 00119 // PortableInterceptor::IORInterceptor::_nil (); 00120 // ACE_NEW_THROW_EX (ii, 00121 // TAO::SSLIOP::IORInterceptor (orb_core, 00122 // this->csiv2_target_supports_, 00123 // this->csiv2_target_requires_), 00124 // CORBA::NO_MEMORY ( 00125 // CORBA::SystemException::_tao_minor_code ( 00126 // TAO::VMCID, 00127 // ENOMEM), 00128 // CORBA::COMPLETED_NO)); 00129 00130 // PortableInterceptor::IORInterceptor_var ior_interceptor = 00131 // ii; 00132 00133 // // Register the SSLIOP IORInterceptor. 00134 // info->add_ior_interceptor (ior_interceptor.in () 00135 //); 00136 00137 // Register the SSLIOP-specific vault with the 00138 // PrincipalAuthenticator. 00139 CORBA::Object_var obj = 00140 info->resolve_initial_references ("SecurityLevel3:SecurityManager"); 00141 00142 SecurityLevel3::SecurityManager_var manager = 00143 SecurityLevel3::SecurityManager::_narrow (obj.in ()); 00144 00145 SecurityLevel3::CredentialsCurator_var curator = 00146 manager->credentials_curator (); 00147 00148 TAO::SL3::CredentialsCurator_var tao_curator = 00149 TAO::SL3::CredentialsCurator::_narrow (curator.in ()); 00150 00151 TAO::SSLIOP::CredentialsAcquirerFactory * factory; 00152 ACE_NEW_THROW_EX (factory, 00153 TAO::SSLIOP::CredentialsAcquirerFactory, 00154 CORBA::NO_MEMORY ()); 00155 00156 auto_ptr<TAO::SSLIOP::CredentialsAcquirerFactory> safe_factory; 00157 00158 tao_curator->register_acquirer_factory ("SL3TLS", factory); 00159 00160 (void) safe_factory.release (); // CredentialsCurator now owns 00161 // CredentialsAcquirerFactory. 00162 }
void TAO::SSLIOP::ORBInitializer::pre_init | ( | PortableInterceptor::ORBInitInfo_ptr | info | ) | [virtual] |
Definition at line 40 of file SSLIOP_ORBInitializer.cpp.
References CORBA::SystemException::_tao_minor_code(), ACE_NEW_THROW_EX, CORBA::COMPLETED_NO, TAO_Pseudo_Var_T< T >::in(), CORBA::is_nil(), CORBA::Object::orb_core(), and TAO::VMCID.
00042 { 00043 TAO_ORBInitInfo_var tao_info = TAO_ORBInitInfo::_narrow (info); 00044 00045 if (CORBA::is_nil (tao_info.in ())) 00046 throw CORBA::INV_OBJREF (); 00047 00048 // SSLIOP doesn't use the ORB Core until a request invocation occurs 00049 // so there is no problem in retrieving the ORB Core pointer in this 00050 // pre_init() method. 00051 TAO_ORB_Core *orb_core = tao_info->orb_core (); 00052 00053 // Create the SSLIOP::Current object. 00054 // Note that a new SSLIOP::Current object is created for each ORB. 00055 // It wouldn't be very useful to share security context information 00056 // with another ORB that isn't configured with security, for 00057 // example. 00058 SSLIOP::Current_ptr current; 00059 ACE_NEW_THROW_EX (current, 00060 TAO::SSLIOP::Current (orb_core), 00061 CORBA::NO_MEMORY ( 00062 CORBA::SystemException::_tao_minor_code ( 00063 TAO::VMCID, 00064 ENOMEM), 00065 CORBA::COMPLETED_NO)); 00066 00067 SSLIOP::Current_var ssliop_current = current; 00068 00069 // Register the SSLIOP::Current object reference with the ORB. 00070 info->register_initial_reference ("SSLIOPCurrent", ssliop_current.in ()); 00071 }
CSIIOP::AssociationOptions TAO::SSLIOP::ORBInitializer::csiv2_target_requires_ [private] |
CSIIOP::AssociationOptions TAO::SSLIOP::ORBInitializer::csiv2_target_supports_ [private] |
::Security::QOP TAO::SSLIOP::ORBInitializer::qop_ [private] |
The default quality-of-protection settings in use.
Definition at line 75 of file SSLIOP_ORBInitializer.h.