TAO::SSLIOP::Connector Class Reference

SSLIOP-specific Connector bridge for pluggable protocols. More...

#include <SSLIOP_Connector.h>

Inheritance diagram for TAO::SSLIOP::Connector:

Inheritance graph
[legend]
Collaboration diagram for TAO::SSLIOP::Connector:

Collaboration graph
[legend]
List of all members.

Public Types

typedef TAO_Connect_Concurrency_Strategy<
Connection_Handler
CONNECT_CONCURRENCY_STRATEGY
typedef TAO_Connect_Creation_Strategy<
Connection_Handler
CONNECT_CREATION_STRATEGY
typedef ACE_Connect_Strategy<
Connection_Handler, ACE_SSL_SOCK_CONNECTOR > 
CONNECT_STRATEGY
typedef ACE_Strategy_Connector<
Connection_Handler, ACE_SSL_SOCK_CONNECTOR > 
BASE_CONNECTOR

Public Member Functions

 Connector (::Security::QOP qop)
 Constructor.

The TAO_Connector methods
Please check the documentation in Transport_Connector.h

virtual int open (TAO_ORB_Core *orb_core)
virtual int close (void)
virtual TAO_Transportconnect (TAO::Profile_Transport_Resolver *r, TAO_Transport_Descriptor_Interface *desc, ACE_Time_Value *timeout ACE_ENV_ARG_DECL)
virtual TAO_Profilecreate_profile (TAO_InputCDR &cdr)
virtual int check_prefix (const char *endpoint)
virtual TAO_Profilecorbaloc_scan (const char *ior, size_t &len ACE_ENV_ARG_DECL)

Protected Member Functions

TAO_Profilemake_secure_profile (ACE_ENV_SINGLE_ARG_DECL)
 SSL-specific profile.

TAO_Transportiiop_connect (TAO_SSLIOP_Endpoint *ssliop_endpoint, TAO::Profile_Transport_Resolver *r, ACE_Time_Value *timeout ACE_ENV_ARG_DECL)
 IIOP-specific connection establishment.

TAO_Transportssliop_connect (TAO_SSLIOP_Endpoint *ssliop_endpoint,::Security::QOP qop, const::Security::EstablishTrust &trust, TAO::Profile_Transport_Resolver *r, TAO_Transport_Descriptor_Interface *desc, ACE_Time_Value *timeout ACE_ENV_ARG_DECL)
 SSLIOP-specific connection establishment.

TAO::SSLIOP::OwnCredentialsretrieve_credentials (TAO_Stub *stub, SSL *ssl ACE_ENV_ARG_DECL)
@c TAO_Connector Methods
Methods required by the TAO_Connector base class.

See also:
TAO_Connector


virtual TAO_Profilemake_profile (ACE_ENV_SINGLE_ARG_DECL)
virtual int cancel_svc_handler (TAO_Connection_Handler *svc_handler)

Private Attributes

::Security::QOP qop_
CONNECT_STRATEGY connect_strategy_
 Our connect strategy.

BASE_CONNECTOR base_connector_
 The connector initiating connection requests for IIOP.


Detailed Description

SSLIOP-specific Connector bridge for pluggable protocols.

Concrete instance of the TAO_Connector class. Responsible for establishing a connection with a server and is called from the Connector_Registry.

Definition at line 55 of file SSLIOP_Connector.h.


Member Typedef Documentation

typedef ACE_Strategy_Connector<Connection_Handler, ACE_SSL_SOCK_CONNECTOR> TAO::SSLIOP::Connector::BASE_CONNECTOR
 

Reimplemented from TAO::IIOP_SSL_Connector.

Definition at line 139 of file SSLIOP_Connector.h.

typedef TAO_Connect_Concurrency_Strategy<Connection_Handler> TAO::SSLIOP::Connector::CONNECT_CONCURRENCY_STRATEGY
 

Reimplemented from TAO::IIOP_SSL_Connector.

Definition at line 128 of file SSLIOP_Connector.h.

typedef TAO_Connect_Creation_Strategy<Connection_Handler> TAO::SSLIOP::Connector::CONNECT_CREATION_STRATEGY
 

Reimplemented from TAO::IIOP_SSL_Connector.

Definition at line 131 of file SSLIOP_Connector.h.

typedef ACE_Connect_Strategy<Connection_Handler, ACE_SSL_SOCK_CONNECTOR> TAO::SSLIOP::Connector::CONNECT_STRATEGY
 

Reimplemented from TAO::IIOP_SSL_Connector.

Definition at line 135 of file SSLIOP_Connector.h.


Constructor & Destructor Documentation

TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO::SSLIOP::Connector::Connector ::Security::QOP  qop  ) 
 

Constructor.

Definition at line 29 of file SSLIOP_Connector.cpp.

00030   : TAO::IIOP_SSL_Connector (),
00031     qop_ (qop),
00032     connect_strategy_ (),
00033     base_connector_ ()
00034 {
00035 }


Member Function Documentation

int TAO::SSLIOP::Connector::cancel_svc_handler TAO_Connection_Handler svc_handler  )  [protected, virtual]
 

Reimplemented from TAO::IIOP_SSL_Connector.

Definition at line 849 of file SSLIOP_Connector.cpp.

00851 {
00852   TAO::SSLIOP::Connection_Handler* handler=
00853     dynamic_cast<TAO::SSLIOP::Connection_Handler*> (svc_handler);
00854 
00855   if (handler)
00856     // Cancel from the connector
00857     return this->base_connector_.cancel (handler);
00858 
00859   return -1;
00860 }

int TAO::SSLIOP::Connector::check_prefix const char *  endpoint  )  [virtual]
 

Reimplemented from TAO_IIOP_Connector.

Definition at line 344 of file SSLIOP_Connector.cpp.

References ACE_OS::strchr(), ACE_OS::strlen(), and ACE_OS::strncmp().

00345 {
00346   // Check for a valid string
00347   if (!endpoint || !*endpoint) return -1;  // Failure
00348 
00349   const char *protocol[] = { "ssliop", "sslioploc" };
00350 
00351   size_t first_slot = ACE_OS::strchr (endpoint, ':') - endpoint;
00352 
00353   size_t len0 = ACE_OS::strlen (protocol[0]);
00354   size_t len1 = ACE_OS::strlen (protocol[1]);
00355 
00356   // Check for the proper prefix in the IOR.  If the proper prefix
00357   // isn't in the IOR then it is not an IOR we can use.
00358   if (first_slot == len0 && ACE_OS::strncmp (endpoint, protocol[0], len0) == 0)
00359     return 0;
00360 
00361   if (first_slot == len1 && ACE_OS::strncmp (endpoint, protocol[1], len1) == 0)
00362     return 0;
00363 
00364   // Failure: not an SSLIOP IOR
00365   // DO NOT throw an exception here.
00366   return -1;
00367 }

int TAO::SSLIOP::Connector::close void   )  [virtual]
 

Reimplemented from TAO::IIOP_SSL_Connector.

Definition at line 78 of file SSLIOP_Connector.cpp.

References TAO::IIOP_SSL_Connector::close().

00079 {
00080   (void) this->TAO::IIOP_SSL_Connector::close ();
00081 
00082   delete this->base_connector_.creation_strategy ();
00083   delete this->base_connector_.concurrency_strategy ();
00084   return this->base_connector_.close ();
00085 }

virtual TAO_Transport* TAO::SSLIOP::Connector::connect TAO::Profile_Transport_Resolver r,
TAO_Transport_Descriptor_Interface desc,
ACE_Time_Value *timeout  ACE_ENV_ARG_DECL
[virtual]
 

virtual TAO_Profile* TAO::SSLIOP::Connector::corbaloc_scan const char *  ior,
size_t &len  ACE_ENV_ARG_DECL
[virtual]
 

TAO_Profile * TAO::SSLIOP::Connector::create_profile TAO_InputCDR cdr  )  [virtual]
 

Reimplemented from TAO_IIOP_Connector.

Definition at line 222 of file SSLIOP_Connector.cpp.

References TAO_Profile::_decr_refcnt(), ACE_NEW_RETURN, and TAO_Profile::decode().

00223 {
00224   TAO_Profile *pfile = 0;
00225   ACE_NEW_RETURN (pfile,
00226                   TAO_SSLIOP_Profile (this->orb_core ()),
00227                   0);
00228 
00229   const int r = pfile->decode (cdr);
00230   if (r == -1)
00231     {
00232       pfile->_decr_refcnt ();
00233       pfile = 0;
00234     }
00235 
00236   return pfile;
00237 }

TAO_Transport* TAO::SSLIOP::Connector::iiop_connect TAO_SSLIOP_Endpoint ssliop_endpoint,
TAO::Profile_Transport_Resolver r,
ACE_Time_Value *timeout  ACE_ENV_ARG_DECL
[protected]
 

IIOP-specific connection establishment.

Note:
The IIOP endpoint is extracted from the SSLIOP endpoint.

virtual TAO_Profile* TAO::SSLIOP::Connector::make_profile ACE_ENV_SINGLE_ARG_DECL   )  [protected, virtual]
 

TAO_Profile* TAO::SSLIOP::Connector::make_secure_profile ACE_ENV_SINGLE_ARG_DECL   )  [protected]
 

SSL-specific profile.

int TAO::SSLIOP::Connector::open TAO_ORB_Core orb_core  )  [virtual]
 

Reimplemented from TAO::IIOP_SSL_Connector.

Definition at line 38 of file SSLIOP_Connector.cpp.

References ACE_NEW_RETURN, TAO::IIOP_SSL_Connector::open(), TAO_Connector::orb_core(), TAO_ORB_Core::reactor(), and TAO_ORB_Core::thr_mgr().

00039 {
00040   // Since the ACE_Strategy_Connector (and ACE_Connector) cannot
00041   // handle non-blocking connections with protocols that have more
00042   // than one handshake, such as SSL, force blocking connections for
00043   // SSLIOP.  This deficiency will be addressed soon.
00044   ACE_NEW_RETURN (this->active_connect_strategy_,
00045                   TAO_Blocked_Connect_Strategy (orb_core),
00046                   -1);
00047 
00048   if (this->TAO::IIOP_SSL_Connector::open (orb_core) == -1)
00049     return -1;
00050 
00051   // Our connect creation strategy
00052   CONNECT_CREATION_STRATEGY *connect_creation_strategy = 0;
00053 
00054   ACE_NEW_RETURN (connect_creation_strategy,
00055                   CONNECT_CREATION_STRATEGY
00056                       (orb_core->thr_mgr (),
00057                        orb_core,
00058                        0 /* Forcibly disable TAO's GIOPlite feature.
00059                             It introduces a security hole. */),
00060                   -1);
00061 
00062   // Our activation strategy
00063   CONNECT_CONCURRENCY_STRATEGY *concurrency_strategy = 0;
00064 
00065   ACE_NEW_RETURN (concurrency_strategy,
00066                   CONNECT_CONCURRENCY_STRATEGY (orb_core),
00067                   -1);
00068 
00069   ACE_Reactor *r = this->orb_core ()->reactor ();
00070 
00071   return this->base_connector_.open (r,
00072                                      connect_creation_strategy,
00073                                      &this->connect_strategy_,
00074                                      concurrency_strategy);
00075 }

TAO::SSLIOP::OwnCredentials* TAO::SSLIOP::Connector::retrieve_credentials TAO_Stub stub,
SSL *ssl  ACE_ENV_ARG_DECL
[protected]
 

Retrieve SSLIOP credentials from the policy overrides list and set up the underlying SSL connection to use the X.509 certificates stored within them.

TAO_Transport* TAO::SSLIOP::Connector::ssliop_connect TAO_SSLIOP_Endpoint ssliop_endpoint,
::Security::QOP  qop,
const::Security::EstablishTrust &  trust,
TAO::Profile_Transport_Resolver r,
TAO_Transport_Descriptor_Interface desc,
ACE_Time_Value *timeout  ACE_ENV_ARG_DECL
[protected]
 

SSLIOP-specific connection establishment.


Member Data Documentation

BASE_CONNECTOR TAO::SSLIOP::Connector::base_connector_ [private]
 

The connector initiating connection requests for IIOP.

Reimplemented from TAO::IIOP_SSL_Connector.

Definition at line 151 of file SSLIOP_Connector.h.

CONNECT_STRATEGY TAO::SSLIOP::Connector::connect_strategy_ [private]
 

Our connect strategy.

Reimplemented from TAO::IIOP_SSL_Connector.

Definition at line 148 of file SSLIOP_Connector.h.

::Security::QOP TAO::SSLIOP::Connector::qop_ [private]
 

If zero, connect to IIOP over SSL port by default. Otherwise, connect to the insecure IIOP port.

Definition at line 145 of file SSLIOP_Connector.h.


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 13:55:52 2006 for TAO_SSLIOP by doxygen 1.3.6