summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs')
-rw-r--r--TAO/orbsvcs/orbsvcs/AVStreams_Full.idl252
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.cpp394
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.h95
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.i2
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connect.cpp538
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connect.h181
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connect.i14
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.cpp576
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.h200
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Export.h36
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp169
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.h70
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Profile.cpp134
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Profile.h109
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Profile.i14
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp505
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h204
17 files changed, 0 insertions, 3493 deletions
diff --git a/TAO/orbsvcs/orbsvcs/AVStreams_Full.idl b/TAO/orbsvcs/orbsvcs/AVStreams_Full.idl
deleted file mode 100644
index 2f04c91261e..00000000000
--- a/TAO/orbsvcs/orbsvcs/AVStreams_Full.idl
+++ /dev/null
@@ -1,252 +0,0 @@
-// $Id$
-
-// IDL for Control and Management of Audio/Video Streams
-// Revised Submission
-
-// Additional IDL for full profile
-#include "AVStreams.idl"
-
-#pragma prefix "omg.org"
-
-module AVStreams_Full
-{
- exception protocolNotSupported{};
- exception formatNotSupported{};
- exception formatMismatch{};
- exception FEPMismatch{};
- exception alreadyConnected{};
- exception invalidSettings{string settings;};
- exception notConnected{};
- exception deviceQosMismatch{};
- exception failedToConnect{string reason;};
- exception failedToListen{string reason;};
-
-
- interface FlowProducer;
- interface FlowConsumer;
- interface FlowEndPoint;
- interface FDev;
-
- interface FlowConnection : PropertyService::PropertySet
- {
- void stop();
- void start();
- void destroy();
-
- boolean modify_QoS(
-
- inout AVStreams::QoS new_qos)
- raises (AVStreams::QoSRequestFailed);
-
- boolean use_flow_protocol(
- in string fp_name,
- in any fp_settings)
- raises (AVStreams::FPError, AVStreams::notSupported);
-
- oneway void push_event(in AVStreams::streamEvent the_event);
-
- boolean connect_devs(in FDev a_party, in FDev b_party,
- inout AVStreams::QoS the_qos)
- raises (AVStreams::streamOpFailed,
- AVStreams::streamOpDenied,
- AVStreams::QoSRequestFailed);
-
- boolean connect(
- in FlowProducer flow_producer,
- in FlowConsumer flow_consumer,
- inout AVStreams::QoS the_qos)
- raises (formatMismatch, FEPMismatch, alreadyConnected);
-
- boolean disconnect();
-
- // The notSupported exception is raised where
- // flow cannot have multiple producers
- boolean add_producer(in FlowProducer flow_producer,
- inout AVStreams::QoS the_qos)
- raises (alreadyConnected, AVStreams::notSupported);
-
- boolean add_consumer(in FlowConsumer flow_consumer,
- inout AVStreams::QoS the_qos)
- raises (alreadyConnected);
-
- boolean drop(in FlowEndPoint target)
- raises (notConnected);
- };
-
- interface FlowEndPoint : PropertyService::PropertySet
- {
- boolean lock();
- void unlock();
-
- void stop();
- void start();
- void destroy();
-
- // Default is a nil object reference
- attribute AVStreams::StreamEndPoint related_sep;
- attribute FlowConnection related_flow_connection;
-
- FlowEndPoint get_connected_fep()
- raises (notConnected,
- AVStreams::notSupported);
-
- // syntax of fp_name is <flowProtocol>
- boolean use_flow_protocol(in string fp_name,
- in any fp_settings)
- raises (AVStreams::FPError, AVStreams::notSupported);
-
- // set_format() initializes 'format'
- // as current media format e.g. MPEG.
- void set_format(in string format)
- raises (AVStreams::notSupported);
-
- void set_dev_params(
- in PropertyService::Properties new_settings)
- raises (PropertyService::PropertyException,
- AVStreams::streamOpFailed);
-
- void set_protocol_restriction(in AVStreams::protocolSpec
- the_spec)
- raises (AVStreams::notSupported);
-
- boolean is_fep_compatible(in FlowEndPoint fep)
- raises (formatMismatch, deviceQosMismatch);
-
- boolean set_peer(
- in FlowConnection the_fc,
-
- in FlowEndPoint the_peer_fep,
- inout AVStreams::QoS the_qos)
- raises (AVStreams::QoSRequestFailed,
- AVStreams::streamOpFailed);
-
- boolean set_Mcast_peer(
- in FlowConnection the_fc,
- in AVStreams::MCastConfigIf a_mcastconfigif,
- inout AVStreams::QoS the_qos)
- raises (AVStreams::QoSRequestFailed);
-
- };
-
- interface FlowProducer : FlowEndPoint
- {
- boolean connect_to_peer(inout AVStreams::QoS the_qos,
- in string address,
-
- in string use_flow_protocol) // syntax <flowProtocol>
- raises(failedToConnect,
- AVStreams::FPError, AVStreams::QoSRequestFailed);
-
- string connect_mcast(inout AVStreams::QoS the_qos,
- out boolean is_met,
- in string address,
- in string use_flow_protocol)
- raises (failedToConnect,
- AVStreams::notSupported,
- AVStreams::FPError,
- AVStreams::QoSRequestFailed);
-
- string get_rev_channel(in string pcol_name);
-
- void set_key(in AVStreams::key the_key);
- void set_source_id(in long source_id);
- };
-
- interface FlowConsumer : FlowEndPoint
- {
-
-
- // Needs to know its peer to choose its protocol correctly
- // Also to ask for a reverse channel for credit-based flow
- // control, if one is required
- string go_to_listen(
- inout AVStreams::QoS the_qos,
- in boolean is_mcast,
- in FlowProducer peer,
- inout string flowProtocol)// syntax <flowProtocol>
- raises(failedToListen, AVStreams::FPError,
- AVStreams::QoSRequestFailed);
- };
-
- interface FDev : PropertyService::PropertySet {
- FlowProducer create_producer(
- in FlowConnection the_requester,
- inout AVStreams::QoS the_qos,
- out boolean met_qos,
- inout string named_fdev)
- raises(AVStreams::streamOpFailed,
- AVStreams::streamOpDenied,
- AVStreams::notSupported,
- AVStreams::QoSRequestFailed);
-
- FlowConsumer create_consumer(
- in FlowConnection the_requester,
- inout AVStreams::QoS the_qos,
- out boolean met_qos,
- inout string named_fdev)
- raises(AVStreams::streamOpFailed,
- AVStreams::streamOpDenied,
- AVStreams::notSupported,
- AVStreams::QoSRequestFailed);
-
- FlowConnection bind(in FDev peer_device,
- inout AVStreams::QoS the_qos,
- out boolean is_met)
- raises (AVStreams::streamOpFailed,
- AVStreams::QoSRequestFailed);
-
- FlowConnection bind_mcast(in FDev first_peer,
- inout AVStreams::QoS the_qos,
- out boolean is_met)
- raises (AVStreams::streamOpFailed,
- AVStreams::QoSRequestFailed);
-
- void destroy(in FlowEndPoint the_ep, in string fdev_name)
- // ie FDev not found
- raises (AVStreams::notSupported);
- };
-
- enum PositionOrigin {
- AbsolutePosition, RelativePosition, ModuloPosition
- };
-
- enum PositionKey {
- ByteCount, SampleCount, MediaTime
- };
-
- struct Position {
- PositionOrigin origin;
- PositionKey key;
- long value;
- };
-
- exception PostionKeyNotSupported { PositionKey key;};
- exception InvalidPosition { PositionKey key;};
-
- // MediaControl interface is similar to
- // ControlledStream interface in MSS.
- // It can be inherited by flow endpoints or
- // FlowConnection interfaces.
- interface MediaControl{
-
- exception PostionKeyNotSupported { PositionKey key;};
-
- Position get_media_position(
- in PositionOrigin an_origin,
- in PositionKey a_key)
- raises (PostionKeyNotSupported);
-
- void set_media_position(in Position a_position)
- raises (PostionKeyNotSupported, InvalidPosition);
-
- void start(in Position a_position)
- raises(InvalidPosition);
- void pause(in Position a_position)
- raises(InvalidPosition);
- void resume(in Position a_position)
- raises(InvalidPosition);
- void stop(in Position a_position)
- raises(InvalidPosition);
- };
-};
-
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.cpp
deleted file mode 100644
index 16c33970b3d..00000000000
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.cpp
+++ /dev/null
@@ -1,394 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-// $Id$
-
-#include "SSLIOP_Acceptor.h"
-#include "SSLIOP_Profile.h"
-#include "tao/MProfile.h"
-#include "tao/ORB_Core.h"
-#include "tao/Server_Strategy_Factory.h"
-#include "tao/debug.h"
-
-#if !defined(__ACE_INLINE__)
-#include "SSLIOP_Acceptor.i"
-#endif /* __ACE_INLINE__ */
-
-ACE_RCSID(tao, SSLIOP_Acceptor, "$Id$")
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-
-template class ACE_Acceptor<TAO_SSLIOP_Server_Connection_Handler, ACE_SSL_SOCK_ACCEPTOR>;
-template class ACE_Strategy_Acceptor<TAO_SSLIOP_Server_Connection_Handler, ACE_SSL_SOCK_ACCEPTOR>;
-template class ACE_Accept_Strategy<TAO_SSLIOP_Server_Connection_Handler, ACE_SSL_SOCK_ACCEPTOR>;
-template class ACE_Creation_Strategy<TAO_SSLIOP_Server_Connection_Handler>;
-template class ACE_Concurrency_Strategy<TAO_SSLIOP_Server_Connection_Handler>;
-template class ACE_Scheduling_Strategy<TAO_SSLIOP_Server_Connection_Handler>;
-template class TAO_Creation_Strategy<TAO_SSLIOP_Server_Connection_Handler>;
-template class TAO_Concurrency_Strategy<TAO_SSLIOP_Server_Connection_Handler>;
-template class TAO_Accept_Strategy<TAO_SSLIOP_Server_Connection_Handler, ACE_SSL_SOCK_ACCEPTOR>;
-
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-
-#pragma instantiate ACE_Acceptor<TAO_SSLIOP_Server_Connection_Handler, ACE_SSL_SOCK_ACCEPTOR>
-#pragma instantiate ACE_Strategy_Acceptor<TAO_SSLIOP_Server_Connection_Handler, ACE_SSL_SOCK_ACCEPTOR>
-#pragma instantiate ACE_Accept_Strategy<TAO_SSLIOP_Server_Connection_Handler, ACE_SSL_SOCK_ACCEPTOR>
-#pragma instantiate ACE_Creation_Strategy<TAO_SSLIOP_Server_Connection_Handler>
-#pragma instantiate ACE_Concurrency_Strategy<TAO_SSLIOP_Server_Connection_Handler>
-#pragma instantiate ACE_Scheduling_Strategy<TAO_SSLIOP_Server_Connection_Handler>
-#pragma instantiate TAO_Creation_Strategy<TAO_SSLIOP_Server_Connection_Handler>
-#pragma instantiate TAO_Concurrency_Strategy<TAO_SSLIOP_Server_Connection_Handler>
-#pragma instantiate TAO_Accept_Strategy<TAO_SSLIOP_Server_Connection_Handler, ACE_SSL_SOCK_ACCEPTOR>
-
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-TAO_SSLIOP_Acceptor::TAO_SSLIOP_Acceptor (void)
- : TAO_IIOP_Acceptor (),
- ssl_acceptor_ (),
- creation_strategy_ (0),
- concurrency_strategy_ (0),
- accept_strategy_ (0)
-{
- // Initialize the default SSL port to zero.
- this->ssl_component_.port = 0;
-}
-
-TAO_SSLIOP_Acceptor::~TAO_SSLIOP_Acceptor (void)
-{
- delete this->creation_strategy_;
- delete this->concurrency_strategy_;
- delete this->accept_strategy_;
-}
-
-// TODO =
-// 2) For V1.[1,2] there are tagged components
-
-int
-TAO_SSLIOP_Acceptor::create_mprofile (const TAO_ObjectKey &object_key,
- TAO_MProfile &mprofile)
-{
- // Adding this->num_hosts_ to the TAO_MProfile.
- int count = mprofile.profile_count ();
- if ((mprofile.size () - count) < this->num_hosts_
- && mprofile.grow (count + this->num_hosts_) == -1)
- return -1;
-
- for (size_t i = 0; i < this->num_hosts_; ++i)
- {
- TAO_SSLIOP_Profile *pfile = 0;
- ACE_NEW_RETURN (pfile,
- TAO_SSLIOP_Profile (this->hosts_[i].c_str (),
- this->addrs_[i].get_port_number (),
- object_key,
- this->addrs_[i],
- this->version_,
- this->orb_core_,
- this->ssl_component_.port),
- -1);
-
- if (mprofile.give_profile (pfile) == -1)
- {
- pfile->_decr_refcnt ();
- pfile = 0;
- return -1;
- }
-
- if (this->orb_core_->orb_params ()->std_profile_components () == 0)
- continue;
-
- pfile->tagged_components ().set_orb_type (TAO_ORB_TYPE);
-
- CONV_FRAME::CodeSetComponentInfo code_set_info;
- code_set_info.ForCharData.native_code_set =
- TAO_DEFAULT_CHAR_CODESET_ID;
- code_set_info.ForWcharData.native_code_set =
- TAO_DEFAULT_WCHAR_CODESET_ID;
- pfile->tagged_components ().set_code_sets (code_set_info);
-
- pfile->tagged_components ().set_tao_priority (this->priority ());
-
- IOP::TaggedComponent component;
- component.tag = IOP::TAG_SSL_SEC_TRANS;
- // @@???? Check this code, only intended as guideline...
- TAO_OutputCDR cdr;
- cdr << TAO_OutputCDR::from_boolean (TAO_ENCAP_BYTE_ORDER);
- cdr << this->ssl_component_;
- // TAO extension, replace the contents of the octet sequence with
- // the CDR stream
- CORBA::ULong length = cdr.total_length ();
- component.component_data.length (length);
- CORBA::Octet *buf = component.component_data.get_buffer ();
- for (const ACE_Message_Block *i = cdr.begin ();
- i != 0;
- i = i->cont ())
- {
- ACE_OS::memcpy (buf, i->rd_ptr (), i->length ());
- buf += i->length ();
- }
-
- pfile->tagged_components ().set_component (component);
- }
-
- return 0;
-}
-
-int
-TAO_SSLIOP_Acceptor::is_collocated (const TAO_Profile *pfile)
-{
- const TAO_SSLIOP_Profile *profile =
- ACE_dynamic_cast(const TAO_SSLIOP_Profile *,
- pfile);
-
- // Make sure the dynamically cast pointer is valid.
- if (profile == 0)
- return 0;
-
- for (size_t i = 0; i < this->num_hosts_; ++i)
- {
- // compare the port and sin_addr (numeric host address)
- if (profile->object_addr () == this->addrs_[i])
- return 1; // Collocated
- }
-
- return 0; // Not collocated
-}
-
-int
-TAO_SSLIOP_Acceptor::close (void)
-{
- int r = this->ssl_acceptor_.close ();
- if (this->TAO_IIOP_Acceptor::close () != 0)
- r = -1;
-
- return r;
-}
-
-int
-TAO_SSLIOP_Acceptor::open (TAO_ORB_Core *orb_core,
- int major,
- int minor,
- const char *address,
- const char *options)
-{
- // Open the non-SSL enabled endpoints, then open the SSL enabled
- // endpoints.
- if (this->TAO_IIOP_Acceptor::open (orb_core,
- major,
- minor,
- address,
- options) != 0)
- return -1;
-
- // The SSL port is set in the parse_options() method. All we have
- // to do is call open_i()
- ACE_INET_Addr addr (this->ssl_component_.port,
- this->addrs_[0].get_host_addr ());
-
- return this->open_i (orb_core, addr);
-}
-
-int
-TAO_SSLIOP_Acceptor::open_default (TAO_ORB_Core *orb_core,
- const char *options)
-{
- // Open the non-SSL enabled endpoints, then open the SSL enabled
- // endpoints.
- if (this->TAO_IIOP_Acceptor::open_default (orb_core, options) == -1)
- return -1;
-
- // Now that each network interface's hostname has been cached, open
- // an endpoint on each network interface using the INADDR_ANY
- // address.
- ACE_INET_Addr addr;
-
- // this->ssl_component_.port is initialized to zero or it is set in
- // this->parse_options().
- if (addr.set (this->ssl_component_.port,
- ACE_static_cast(ACE_UINT32, INADDR_ANY),
- 1) != 0)
- return -1;
-
- return this->open_i (orb_core, addr);
-}
-
-int
-TAO_SSLIOP_Acceptor::open_i (TAO_ORB_Core* orb_core,
- const ACE_INET_Addr& addr)
-{
- ACE_NEW_RETURN (this->creation_strategy_,
- TAO_SSLIOP_CREATION_STRATEGY (this->orb_core_),
- -1);
-
- ACE_NEW_RETURN (this->concurrency_strategy_,
- TAO_SSLIOP_CONCURRENCY_STRATEGY (this->orb_core_),
- -1);
-
- ACE_NEW_RETURN (this->accept_strategy_,
- TAO_SSLIOP_ACCEPT_STRATEGY (this->orb_core_),
- -1);
-
- if (this->ssl_acceptor_.open (addr,
- orb_core->reactor (this),
- this->creation_strategy_,
- this->accept_strategy_,
- this->concurrency_strategy_) == -1)
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "\n\nTAO (%P|%t) SSLIOP_Acceptor::open_i - %p\n\n",
- "cannot open acceptor"));
- return -1;
- }
-
- ACE_INET_Addr ssl_address;
-
- // We do this make sure the port number the endpoint is listening on
- // gets set in the addr.
- if (this->ssl_acceptor_.acceptor ().get_local_addr (ssl_address) != 0)
- {
- // @@ Should this be a catastrophic error???
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "\n\nTAO (%P|%t) SSLIOP_Acceptor::open_i - %p\n\n",
- "cannot get local addr"));
- return -1;
- }
-
- // Reset the SSL endpoint port to the one chosen by the OS (or by
- // the user if provided.
- this->ssl_component_.port = ssl_address.get_port_number ();
-
- if (TAO_debug_level > 5)
- {
- for (size_t i = 0; i < this->num_hosts_; ++i)
- {
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) SSLIOP_Acceptor::open_i - "
- "listening on: <%s:%u>\n",
- this->hosts_[i].c_str (),
- this->ssl_component_.port));
- }
- }
-
- return 0;
-}
-
-int
-TAO_SSLIOP_Acceptor::parse_options (const char *str)
-{
- // Set the SSL port to the default value...
- // @@ Do we really need to do this...
- this->ssl_component_.port = 0;
-
- if (str == 0)
- return 0; // No options to parse. Not a problem.
-
- // Use an option format similar to the one used for CGI scripts in
- // HTTP URLs.
- // e.g.: option1=foo&option2=bar
-
- ACE_CString options (str);
-
- size_t len = options.length ();
-
- const char option_delimiter = '&';
-
- // Count the number of options.
-
- CORBA::ULong option_count = 1;
- // Number of endpoints in the string (initialized to 1).
-
- // Only check for endpoints after the protocol specification and
- // before the object key.
- for (size_t i = 0; i < len; ++i)
- if (options[i] == option_delimiter)
- option_count++;
-
- // The idea behind the following loop is to split the options into
- // (option, name) pairs.
- // For example,
- // `option1=foo&option2=bar'
- // will be parsed into:
- // `option1=foo'
- // `option2=bar'
-
- int begin = 0;
- int end = -1;
-
- // @@ We should add options to set the security association options,
- // or are those controlled by Policies?
- for (CORBA::ULong j = 0; j < option_count; ++j)
- {
- begin += end + 1;
-
- if (j < option_count - 1)
- end = options.find (option_delimiter, begin);
- else
- end = len - begin; // Handle last endpoint differently
-
- if (end == begin)
- ACE_ERROR_RETURN ((LM_ERROR,
- "TAO (%P|%t) Zero length IIOP/SSL option.\n"),
- -1);
- else if (end != ACE_CString::npos)
- {
- ACE_CString opt = options.substring (begin, end);
-
- int slot = opt.find ("=");
-
- if (slot == ACE_static_cast (int, len - 1)
- || slot == ACE_CString::npos)
- ACE_ERROR_RETURN ((LM_ERROR,
- "TAO (%P|%t) IIOP/SSL option <%s> is "
- "missing a value.\n",
- opt.c_str ()),
- -1);
-
- ACE_CString name = opt.substring (0, slot);
- ACE_CString value = opt.substring (slot + 1);
-
- if (name.length () == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "TAO (%P|%t) Zero length IIOP/SSL "
- "option name.\n"),
- -1);
-
- if (name == "priority")
- {
- CORBA::Short corba_priority =
- ACE_static_cast (CORBA::Short,
- ACE_OS::atoi (value.c_str ()));
-
- if (corba_priority >= 0
- /* && corba_priority < 32768 */)
- // priority_ and corba_priority will always be less
- // than 32768 since CORBA::Short is a signed 16 bit
- // integer.
- this->priority_ = corba_priority;
- else
- ACE_ERROR_RETURN ((LM_ERROR,
- "TAO (%P|%t) Invalid IIOP/SSL endpoint "
- "priority: <%s>\n",
- value.c_str ()),
- -1);
- }
- else if (ACE_OS::strcmp (name.c_str (), "ssl_port") == 0)
- {
- int ssl_port = ACE_OS::atoi (value.c_str ());
-
- if (ssl_port >= 0 && ssl_port < 65536)
- this->ssl_component_.port = ssl_port;
- else
- ACE_ERROR_RETURN ((LM_ERROR,
- "TAO (%P|%t) Invalid IIOP/SSL endpoint "
- "port: <%s>\n",
- value.c_str ()),
- -1);
- }
- else
- ACE_ERROR_RETURN ((LM_ERROR,
- "TAO (%P|%t) Invalid IIOP/SSL option: <%s>\n",
- name.c_str ()),
- -1);
- }
- }
- return 0;
-}
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.h b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.h
deleted file mode 100644
index da71b9565dd..00000000000
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.h
+++ /dev/null
@@ -1,95 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO_SSLIOP
-//
-// = FILENAME
-// SSLIOP_Acceptor.h
-//
-// = DESCRIPTION
-// IIOP/SSL specific acceptor processing
-//
-// = AUTHOR
-// Carlos O'Ryan <coryan@ece.uci.edu>
-// Ossama Othman <ossama@ece.uci.edu>
-//
-// ============================================================================
-
-#ifndef TAO_SSLIOP_ACCEPTOR_H
-#define TAO_SSLIOP_ACCEPTOR_H
-
-#include "tao/IIOP_Acceptor.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "SSL_SOCK_Acceptor.h"
-#include "SSLIOP_Connect.h"
-#include "SSLIOPC.h"
-
-// TAO SSLIOP_Acceptor concrete call definition
-
-class TAO_SSLIOP_Export TAO_SSLIOP_Acceptor : public TAO_IIOP_Acceptor
-{
- // = TITLE
- // TAO_SSLIOP_Acceptor
- //
- // = DESCRIPTION
- // The SSLIOP-specific bridge class for the concrete acceptor.
- //
-public:
- TAO_SSLIOP_Acceptor (void);
- // Constructor.
-
- ~TAO_SSLIOP_Acceptor (void);
- // Destructor.
-
- typedef ACE_Strategy_Acceptor<TAO_SSLIOP_Server_Connection_Handler, ACE_SSL_SOCK_ACCEPTOR> TAO_SSLIOP_BASE_ACCEPTOR;
- typedef TAO_Creation_Strategy<TAO_SSLIOP_Server_Connection_Handler> TAO_SSLIOP_CREATION_STRATEGY;
- typedef TAO_Concurrency_Strategy<TAO_SSLIOP_Server_Connection_Handler> TAO_SSLIOP_CONCURRENCY_STRATEGY;
- typedef TAO_Accept_Strategy<TAO_SSLIOP_Server_Connection_Handler, ACE_SSL_SOCK_ACCEPTOR> TAO_SSLIOP_ACCEPT_STRATEGY;
-
- // = The TAO_Acceptor methods, check the documentation in
- // Pluggable.h for details.
- virtual int open (TAO_ORB_Core *orb_core,
- int version_major,
- int version_minor,
- const char *address,
- const char *options = 0);
- virtual int open_default (TAO_ORB_Core *orb_core,
- const char *options = 0);
- virtual int close (void);
- virtual int create_mprofile (const TAO_ObjectKey &object_key,
- TAO_MProfile &mprofile);
- virtual int is_collocated (const TAO_Profile* profile);
-
-private:
- int open_i (TAO_ORB_Core* orb_core,
- const ACE_INET_Addr& addr);
- // Implement the common part of the open*() methods.
-
- int parse_options (const char *options);
- // Parse protocol specific options.
-
-private:
- TAO_SSLIOP_BASE_ACCEPTOR ssl_acceptor_;
- // The concrete acceptor, as a pointer to it's base class.
-
- TAO_SSLIOP_CREATION_STRATEGY *creation_strategy_;
- TAO_SSLIOP_CONCURRENCY_STRATEGY *concurrency_strategy_;
- TAO_SSLIOP_ACCEPT_STRATEGY *accept_strategy_;
- // Acceptor strategies.
-
- SSLIOP::SSL ssl_component_;
- // The SSL component.
-};
-
-#if defined(__ACE_INLINE__)
-#include "SSLIOP_Acceptor.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* TAO_SSLIOP_ACCEPTOR_H */
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.i b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.i
deleted file mode 100644
index c130d6682b1..00000000000
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.i
+++ /dev/null
@@ -1,2 +0,0 @@
-// -*- C++ -*-
-// $Id$
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connect.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connect.cpp
deleted file mode 100644
index 8ef5e041d97..00000000000
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connect.cpp
+++ /dev/null
@@ -1,538 +0,0 @@
-// $Id$
-
-#include "SSLIOP_Connect.h"
-#include "tao/Timeprobe.h"
-#include "tao/debug.h"
-#include "tao/ORB_Core.h"
-#include "tao/ORB.h"
-#include "tao/CDR.h"
-#include "tao/Messaging_Policy_i.h"
-#include "tao/GIOP_Message_Lite.h"
-#include "tao/GIOP_Message_Acceptors.h"
-
-#if !defined (__ACE_INLINE__)
-# include "SSLIOP_Connect.i"
-#endif /* ! __ACE_INLINE__ */
-
-ACE_RCSID(tao, SSLIOP_Connect, "$Id$")
-
-#if defined (ACE_ENABLE_TIMEPROBES)
-
-static const char *TAO_SSLIOP_Connect_Timeprobe_Description[] =
-{
- "SSLIOP_Server_Connection_Handler::handle_input - start",
- "SSLIOP_Server_Connection_Handler::handle_input - end",
-
- "SSLIOP_Server_Connection_Handler::handle_locate - start",
- "SSLIOP_Server_Connection_Handler::handle_locate - end",
-
- "SSLIOP_Server_Connection_Handler::receive_request - end",
-
- "SSLIOP_Client_Connection_Handler::send_request - start",
- "SSLIOP_Client_Connection_Handler::send_request - end"};
-
-enum
-{
- // Timeprobe description table start key
- TAO_SSLIOP_SERVER_CONNECTION_HANDLER_HANDLE_INPUT_START = 310,
- TAO_SSLIOP_SERVER_CONNECTION_HANDLER_HANDLE_INPUT_END,
-
- TAO_SSLIOP_SERVER_CONNECTION_HANDLER_HANDLE_LOCATE_START,
- TAO_SSLIOP_SERVER_CONNECTION_HANDLER_HANDLE_LOCATE_END,
-
- TAO_SSLIOP_SERVER_CONNECTION_HANDLER_RECEIVE_REQUEST_END,
-
- TAO_SSLIOP_CLIENT_CONNECTION_HANDLER_SEND_REQUEST_START,
- TAO_SSLIOP_CLIENT_CONNECTION_HANDLER_SEND_REQUEST_END
-};
-
-// Setup Timeprobes
-ACE_TIMEPROBE_EVENT_DESCRIPTIONS (TAO_SSLIOP_Connect_Timeprobe_Description,
- TAO_SSLIOP_SERVER_CONNECTION_HANDLER_HANDLE_INPUT_START);
-
-#endif /* ACE_ENABLE_TIMEPROBES */
-
-TAO_SSLIOP_Handler_Base::TAO_SSLIOP_Handler_Base (TAO_ORB_Core *orb_core)
- : TAO_SSL_SVC_HANDLER (orb_core->thr_mgr (), 0, 0)
-{
-}
-
-TAO_SSLIOP_Handler_Base::TAO_SSLIOP_Handler_Base (ACE_Thread_Manager *t)
- : TAO_SSL_SVC_HANDLER (t, 0, 0)
-{
-}
-
-// ****************************************************************
-
-TAO_SSLIOP_Server_Connection_Handler::TAO_SSLIOP_Server_Connection_Handler (ACE_Thread_Manager *t)
- : TAO_SSLIOP_Handler_Base (t),
- transport_ (this, 0),
- acceptor_factory_ (0),
- orb_core_ (0),
- tss_resources_ (0),
- refcount_ (1)
-
-{
- // This constructor should *never* get called, it is just here to
- // make the compiler happy: the default implementation of the
- // Creation_Strategy requires a constructor with that signature, we
- // don't use that implementation, but some (most?) compilers
- // instantiate it anyway.
- ACE_ASSERT (this->orb_core_ != 0);
-}
-
-TAO_SSLIOP_Server_Connection_Handler::TAO_SSLIOP_Server_Connection_Handler
- (TAO_ORB_Core *orb_core,
- CORBA::Boolean /*lite_flag */)
- : TAO_SSLIOP_Handler_Base (orb_core),
- transport_ (this, orb_core),
- acceptor_factory_ (orb_core),
- orb_core_ (orb_core),
- tss_resources_ (orb_core->get_tss_resources ()),
- refcount_ (1)
-{
- // The flag that is used to enable GIOPlite is *not* used for
- // SSLIOP. GIOPlite introduces security holes. It should not be
- // enabled for SSLIOP, so mark it as an unused argument in the
- // argument list.
-}
-
-TAO_SSLIOP_Server_Connection_Handler::~TAO_SSLIOP_Server_Connection_Handler (void)
-{
-}
-
-int
-TAO_SSLIOP_Server_Connection_Handler::open (void*)
-{
-#if !defined (ACE_LACKS_SOCKET_BUFSIZ)
- int sndbufsize =
- this->orb_core_->orb_params ()->sock_sndbuf_size ();
- int rcvbufsize =
- this->orb_core_->orb_params ()->sock_rcvbuf_size ();
-
- if (this->peer ().set_option (SOL_SOCKET,
- SO_SNDBUF,
- (void *) &sndbufsize,
- sizeof (sndbufsize)) == -1
- && errno != ENOTSUP)
- return -1;
- else if (this->peer ().set_option (SOL_SOCKET,
- SO_RCVBUF,
- (void *) &rcvbufsize,
- sizeof (rcvbufsize)) == -1
- && errno != ENOTSUP)
- return -1;
-#endif /* !ACE_LACKS_SOCKET_BUFSIZ */
-
-#if defined (TCP_NODELAY)
- int nodelay =
- this->orb_core_->orb_params ()->nodelay ();
-
- if (this->peer ().set_option (ACE_IPPROTO_TCP,
- TCP_NODELAY,
- (void *) &nodelay,
- sizeof (nodelay)) == -1)
- return -1;
-#endif /* TCP_NODELAY */
-
- (void) this->peer ().enable (ACE_CLOEXEC);
- // Set the close-on-exec flag for that file descriptor. If the
- // operation fails we are out of luck (some platforms do not support
- // it and return -1).
-
- // Called by the <Strategy_Acceptor> when the handler is completely
- // connected.
- ACE_INET_Addr addr;
-
- if (this->peer ().get_remote_addr (addr) == -1)
- return -1;
-
- char client[MAXHOSTNAMELEN + 16];
- (void) addr.addr_to_string (client, sizeof (client));
-
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) IIOP connection from client <%s> on %d\n",
- client, this->peer ().get_handle ()));
-
- return 0;
-}
-
-int
-TAO_SSLIOP_Server_Connection_Handler::activate (long flags,
- int n_threads,
- int force_active,
- long priority,
- int grp_id,
- ACE_Task_Base *task,
- ACE_hthread_t thread_handles[],
- void *stack[],
- size_t stack_size[],
- ACE_thread_t thread_names[])
-{
- if (TAO_orbdebug)
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) SSLIOP_Server_Connection_Handler::activate %d "
- "threads, flags = %d\n",
- n_threads,
- flags,
- THR_BOUND));
-
- return TAO_SSL_SVC_HANDLER::activate (flags,
- n_threads,
- force_active,
- priority,
- grp_id,
- task,
- thread_handles,
- stack,
- stack_size,
- thread_names);
-}
-
-int
-TAO_SSLIOP_Server_Connection_Handler::handle_close (ACE_HANDLE handle,
- ACE_Reactor_Mask rm)
-{
- if (TAO_orbdebug)
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) SSLIOP_Server_Connection_Handler::handle_close "
- "(%d, %d)\n",
- handle,
- rm));
-
- --this->refcount_;
- if (this->refcount_ == 0)
- return TAO_SSL_SVC_HANDLER::handle_close (handle, rm);
-
- return 0;
-}
-
-int
-TAO_SSLIOP_Server_Connection_Handler::svc (void)
-{
- // This method is called when an instance is "activated", i.e.,
- // turned into an active object. Presumably, activation spawns a
- // thread with this method as the "worker function".
- int result = 0;
-
- // Inheriting the ORB_Core tss stuff from the parent thread.
- this->orb_core_->inherit_from_parent_thread (this->tss_resources_);
-
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) SSLIOP_Server_Connection_Handler::svc begin\n"));
-
- // Here we simply synthesize the "typical" event loop one might find
- // in a reactive handler, except that this can simply block waiting
- // for input.
-
- ACE_Time_Value *max_wait_time = 0;
- ACE_Time_Value timeout;
- ACE_Time_Value current_timeout;
- if (this->orb_core_->thread_per_connection_timeout (timeout))
- {
- current_timeout = timeout;
- max_wait_time = &current_timeout;
- }
-
- while (!this->orb_core_->has_shutdown ()
- && result >= 0)
- {
- result = handle_input_i (ACE_INVALID_HANDLE, max_wait_time);
- if (result == -1 && errno == ETIME)
- {
- // Ignore timeouts, they are only used to wake up and
- // shutdown.
- result = 0;
- }
- current_timeout = timeout;
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) SSLIOP_Server_Connection_Handler::svc - "
- "loop <%d>\n", current_timeout.msec ()));
- }
-
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) SSLIOP_Server_Connection_Handler::svc end\n"));
-
- return result;
-}
-
-int
-TAO_SSLIOP_Server_Connection_Handler::handle_input (ACE_HANDLE h)
-{
- return this->handle_input_i (h);
-}
-
-int
-TAO_SSLIOP_Server_Connection_Handler::handle_input_i (ACE_HANDLE,
- ACE_Time_Value *max_wait_time)
-{
- this->refcount_++;
-
- int result =
- this->acceptor_factory_.handle_input (this->transport (),
- this->orb_core_,
- this->transport_.message_state_,
- max_wait_time);
-
- if (result == -1 && TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - %p\n",
- "SSLIOP_Server_Connection_Handler::handle_input, "
- "handle_input"));
- }
-
- if (result == 0 || result == -1)
- {
- --this->refcount_;
- if (this->refcount_ == 0)
- this->TAO_SSL_SVC_HANDLER::handle_close ();
-
- return result;
- }
-
- //
- // Take out all the information from the <message_state> and reset
- // it so that nested upcall on the same transport can be handled.
- //
-
- // Notice that the message_state is only modified in one thread at a
- // time because the reactor does not call handle_input() for the
- // same Event_Handler in two threads at the same time.
-
- // Copy message type.
- TAO_GIOP_Message_State &ms = this->transport_.message_state_;
- CORBA::Octet message_type = ms.message_type;
-
- // Copy version.
- TAO_GIOP_Version giop_version = ms.giop_version;
-
- // Steal the input CDR from the message state.
- TAO_InputCDR input_cdr (ACE_InputCDR::Transfer_Contents (ms.cdr),
- this->orb_core_);
-
- // Reset the message state.
- this->transport_.message_state_.reset (0);
-
- result =
- this->acceptor_factory_.process_client_message (this->transport (),
- this->orb_core_,
- input_cdr,
- message_type);
-
- if (result != -1)
- result = 0;
-
- --this->refcount_;
- if (this->refcount_ == 0)
- this->TAO_SSL_SVC_HANDLER::handle_close ();
-
-
- return result;
-}
-
-// ****************************************************************
-
-// transport obj.
-TAO_SSLIOP_Client_Connection_Handler::
-TAO_SSLIOP_Client_Connection_Handler (ACE_Thread_Manager *t,
- TAO_ORB_Core* orb_core,
- CORBA::Boolean /* flag */)
- : TAO_SSLIOP_Handler_Base (t),
- transport_ (this, orb_core),
- orb_core_ (orb_core)
-{
- // The flag that is used to enable GIOPlite is *not* used for
- // SSLIOP. GIOPlite introduces security holes. It should not be
- // enabled for SSLIOP, so mark it as an unused argument in the
- // argument list.
-}
-
-TAO_SSLIOP_Client_Connection_Handler::~TAO_SSLIOP_Client_Connection_Handler (void)
-{
-}
-
-
-// @@ Should I do something here to enable non-blocking?? (Alex).
-// @@ Alex: I don't know if this is the place to do it, but the way to
-// do it is:
-// if (this->peer ().enable (ACE_NONBLOCK) == -1)
-// return -1;
-// Probably we will need to use the transport to decide if it is
-// needed or not.
-
-int
-TAO_SSLIOP_Client_Connection_Handler::open (void *)
-{
- // @@ TODO: This flags should be set using the RT CORBA policies...
-
- // Here is where we could enable all sorts of things such as
- // nonblock I/O, sock buf sizes, TCP no-delay, etc.
-
-#if !defined (ACE_LACKS_SOCKET_BUFSIZ)
- int sndbufsize =
- this->orb_core_->orb_params ()->sock_sndbuf_size ();
- int rcvbufsize =
- this->orb_core_->orb_params ()->sock_rcvbuf_size ();
-
- if (this->peer ().set_option (SOL_SOCKET,
- SO_SNDBUF,
- ACE_reinterpret_cast (void *, &sndbufsize),
- sizeof (sndbufsize)) == -1
- && errno != ENOTSUP)
- return -1;
- else if (this->peer ().set_option (SOL_SOCKET,
- SO_RCVBUF,
- ACE_reinterpret_cast (void *, &rcvbufsize),
- sizeof (rcvbufsize)) == -1
- && errno != ENOTSUP)
- return -1;
-#endif /* ACE_LACKS_SOCKET_BUFSIZ */
-
-#if defined (TCP_NODELAY)
- int nodelay =
- this->orb_core_->orb_params ()->nodelay ();
- if (this->peer ().set_option (ACE_IPPROTO_TCP,
- TCP_NODELAY,
- (void *) &nodelay,
- sizeof (nodelay)) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "NODELAY failed\n"),
- -1);
-#endif /* TCP_NODELAY */
-
- (void) this->peer ().enable (ACE_CLOEXEC);
- // Set the close-on-exec flag for that file descriptor. If the
- // operation fails we are out of luck (some platforms do not support
- // it and return -1).
-
- // Called by the <Strategy_Acceptor> when the handler is completely
- // connected.
- ACE_INET_Addr addr;
-
- if (this->peer ().get_remote_addr (addr) == -1)
- return -1;
-
- char server[MAXHOSTNAMELEN + 16];
-
- (void) addr.addr_to_string (server, sizeof (server));
-
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) IIOP connection to server <%s> on %d\n",
- server, this->peer ().get_handle ()));
-
- // Register the handler with the Reactor if necessary.
- return this->transport ()->wait_strategy ()->register_handler ();
-}
-
-int
-TAO_SSLIOP_Client_Connection_Handler::close (u_long)
-{
- this->destroy ();
-
- return 0;
-}
-
-int
-TAO_SSLIOP_Client_Connection_Handler::handle_input (ACE_HANDLE)
-{
- // Call the waiter to handle the input.
- return this->transport ()->wait_strategy ()->handle_input ();
-}
-
-int
-TAO_SSLIOP_Client_Connection_Handler::handle_timeout (const ACE_Time_Value &,
- const void *)
-{
- //
- // This method is called when buffering timer expires.
- //
-
- // Cannot deal with errors, and therefore they are ignored.
- this->transport ()->send_buffered_messages ();
-
- return 0;
-}
-
-int
-TAO_SSLIOP_Client_Connection_Handler::handle_close (ACE_HANDLE handle,
- ACE_Reactor_Mask rm)
-{
- // @@ Alex: we need to figure out if the transport decides to close
- // us or something else. If it is something else (for example
- // the cached connector trying to make room for other
- // connections) then we should let the transport know, so it can
- // in turn take appropiate action (such as sending exceptions to
- // all waiting reply handlers).
-
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) SSLIOP_Client_Connection_Handler::"
- "handle_close (%d, %d)\n", handle, rm));
-
- if (this->recycler ())
- this->recycler ()->mark_as_closed (this->recycling_act ());
-
- // Deregister this handler with the ACE_Reactor.
- return this->handle_cleanup ();
-}
-
-int
-TAO_SSLIOP_Client_Connection_Handler::handle_close_i (ACE_HANDLE handle,
- ACE_Reactor_Mask rm)
-{
- // @@ Alex: we need to figure out if the transport decides to close
- // us or something else. If it is something else (for example
- // the cached connector trying to make room for other
- // connections) then we should let the transport know, so it can
- // in turn take appropiate action (such as sending exceptions to
- // all waiting reply handlers).
-
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) SSLIOP_Client_Connection_Handler::"
- "handle_close_i (%d, %d)\n", handle, rm));
-
- if (this->recycler ())
- this->recycler ()->mark_as_closed_i (this->recycling_act ());
-
- return this->handle_cleanup ();
-}
-
-int
-TAO_SSLIOP_Client_Connection_Handler::handle_cleanup (void)
-{
- // Deregister this handler with the ACE_Reactor.
- if (this->reactor ())
- {
- ACE_Reactor_Mask mask =
- ACE_Event_Handler::ALL_EVENTS_MASK | ACE_Event_Handler::DONT_CALL;
-
- // Make sure there are no timers.
- this->reactor ()->cancel_timer (this);
-
- // Remove self from reactor.
- this->reactor ()->remove_handler (this, mask);
- }
-
- this->peer ().close ();
-
- return 0;
-}
-
-// ****************************************************************
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-
-template class ACE_Svc_Handler<ACE_SSL_SOCK_STREAM, ACE_NULL_SYNCH>;
-
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-
-#pragma instantiate ACE_Svc_Handler<ACE_SSL_SOCK_STREAM, ACE_NULL_SYNCH>
-
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connect.h b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connect.h
deleted file mode 100644
index 0cd831c2382..00000000000
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connect.h
+++ /dev/null
@@ -1,181 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO_SSLIOP
-//
-// = FILENAME
-// SSLIOP_Connect.h
-//
-// = AUTHOR
-// Carlos O'Ryan <coryan@ece.uci.edu>
-// Ossama Othman <ossama@ece.uci.edu>
-//
-// ============================================================================
-
-#ifndef TAO_SSLIOP_CONNECT_H
-#define TAO_SSLIOP_CONNECT_H
-
-#include "ace/Reactor.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "SSL_SOCK_Stream.h"
-#include "ace/Synch.h"
-#include "ace/Svc_Handler.h"
-
-#include "tao/corbafwd.h"
-#include "tao/Wait_Strategy.h"
-#include "tao/GIOP_Message_Acceptors.h"
-
-#include "SSLIOP_Transport.h"
-
-// Forward Decls
-class TAO_ORB_Core;
-class TAO_ORB_Core_TSS_Resources;
-
-
-typedef ACE_Svc_Handler<ACE_SSL_SOCK_STREAM, ACE_NULL_SYNCH>
- TAO_SSL_SVC_HANDLER;
-
-// ****************************************************************
-
-class TAO_SSLIOP_Handler_Base : public TAO_SSL_SVC_HANDLER
-{
-public:
- TAO_SSLIOP_Handler_Base (ACE_Thread_Manager *t);
- TAO_SSLIOP_Handler_Base (TAO_ORB_Core *orb_core);
-};
-
-class TAO_SSLIOP_Export TAO_SSLIOP_Client_Connection_Handler : public TAO_SSLIOP_Handler_Base
-{
- // = TITLE
- // <Svc_Handler> used on the client side and returned by the
- // <TAO_CONNECTOR>.
-public:
- // = Initialization method.
- TAO_SSLIOP_Client_Connection_Handler (ACE_Thread_Manager *t = 0,
- TAO_ORB_Core* orb_core = 0,
- CORBA::Boolean flag = 0);
-
- virtual ~TAO_SSLIOP_Client_Connection_Handler (void);
-
- // = <Connector> hook.
- virtual int open (void *);
- // Activation template method.
-
- // = Event Handler overloads
-
- virtual int handle_input (ACE_HANDLE = ACE_INVALID_HANDLE);
- // Called when a response from a twoway invocation is available.
-
- virtual int handle_timeout (const ACE_Time_Value &tv,
- const void *arg = 0);
- // Called when buffering timer expires.
-
- virtual int handle_close (ACE_HANDLE = ACE_INVALID_HANDLE,
- ACE_Reactor_Mask = ACE_Event_Handler::NULL_MASK);
- // Perform appropriate closing.
-
- virtual int handle_close_i (ACE_HANDLE = ACE_INVALID_HANDLE,
- ACE_Reactor_Mask = ACE_Event_Handler::NULL_MASK);
- // Perform appropriate closing but without grabbing any locks.
-
- virtual int close (u_long flags = 0);
- // Object termination hook.
-
- virtual TAO_Transport *transport (void);
- // Return the transport objects
-
-protected:
- int handle_cleanup (void);
- // This method deregisters the handler from the reactor and closes it.
-
- TAO_SSLIOP_Client_Transport transport_;
- // Reference to the transport object, it is owned by this class.
-
- TAO_ORB_Core *orb_core_;
- // Cached ORB Core.
-};
-
-// ****************************************************************
-
-class TAO_SSLIOP_Export TAO_SSLIOP_Server_Connection_Handler : public TAO_SSLIOP_Handler_Base
-{
- // = TITLE
- // Handles requests on a single connection in a server.
-
-public:
- TAO_SSLIOP_Server_Connection_Handler (ACE_Thread_Manager* t = 0);
- TAO_SSLIOP_Server_Connection_Handler (TAO_ORB_Core *orb_core,
- CORBA::Boolean flag = 0);
- ~TAO_SSLIOP_Server_Connection_Handler (void);
- // Constructor.
-
- virtual int open (void *);
- // Called by the <Strategy_Acceptor> when the handler is completely
- // connected. Argument is unused.
-
- // = Active object activation method.
- virtual int activate (long flags = THR_NEW_LWP,
- int n_threads = 1,
- int force_active = 0,
- long priority = ACE_DEFAULT_THREAD_PRIORITY,
- int grp_id = -1,
- ACE_Task_Base *task = 0,
- ACE_hthread_t thread_handles[] = 0,
- void *stack[] = 0,
- size_t stack_size[] = 0,
- ACE_thread_t thread_names[] = 0);
-
- virtual int svc (void);
- // Only used when the handler is turned into an active object by
- // calling <activate>. This serves as the event loop in such cases.
-
- // = Template Methods Called by <handle_input>
-
- TAO_Transport *transport (void);
-
-protected:
-
- // = Event Handler overloads
-
- virtual int handle_input (ACE_HANDLE = ACE_INVALID_HANDLE);
- virtual int handle_input_i (ACE_HANDLE = ACE_INVALID_HANDLE,
- ACE_Time_Value *max_wait_time = 0);
- // Reads a message from the <peer()>, dispatching and servicing it
- // appropriately.
- // handle_input() just delegates on handle_input_i() which timeouts
- // after <max_wait_time>, this is used in thread-per-connection to
- // ensure that server threads eventually exit.
-
- virtual int handle_close (ACE_HANDLE = ACE_INVALID_HANDLE,
- ACE_Reactor_Mask = ACE_Event_Handler::NULL_MASK);
- // Perform appropriate closing.
-
-protected:
- TAO_SSLIOP_Server_Transport transport_;
- // @@ New transport object reference.
-
- TAO_GIOP_Message_Acceptors acceptor_factory_;
- // Messaging acceptor factory
-
- TAO_ORB_Core *orb_core_;
- // Cached ORB Core.
-
- TAO_ORB_Core_TSS_Resources *tss_resources_;
- // Cached tss resources of the ORB that activated this object.
-
- u_long refcount_;
- // Reference count, to avoid early deletes...
-};
-
-#if defined (__ACE_INLINE__)
-#include "SSLIOP_Connect.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* TAO_SSLIOP_CONNECT_H */
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connect.i b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connect.i
deleted file mode 100644
index 5ffc4050b9f..00000000000
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connect.i
+++ /dev/null
@@ -1,14 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-ACE_INLINE TAO_Transport *
-TAO_SSLIOP_Server_Connection_Handler::transport (void)
-{
- return &(this->transport_);
-}
-
-ACE_INLINE TAO_Transport *
-TAO_SSLIOP_Client_Connection_Handler::transport (void)
-{
- return &(this->transport_);
-}
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.cpp
deleted file mode 100644
index 8c0dbf88c78..00000000000
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.cpp
+++ /dev/null
@@ -1,576 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-// $Id$
-
-#include "SSLIOP_Connector.h"
-#include "SSLIOP_Profile.h"
-#include "tao/debug.h"
-#include "tao/ORB_Core.h"
-#include "tao/Client_Strategy_Factory.h"
-#include "tao/Environment.h"
-#include "ace/Auto_Ptr.h"
-
-ACE_RCSID(tao, SSLIOP_Connector, "$Id$")
-
-#if defined (TAO_USES_ROBUST_CONNECTION_MGMT)
-int
-TAO_SSLIOP_Connector::purge_connections (void)
-{
- return this->cached_connect_strategy_->purge_connections ();
-}
-
-#define TAO_HANDLER TAO_SSLIOP_Client_Connection_Handler
-#define TAO_SVC_TUPLE ACE_Svc_Tuple<TAO_HANDLER>
-#define TAO_ADDR TAO_SSLIOP_Connector::TAO_IADDR
-#define TAO_HASH_KEY TAO_SSLIOP_Connector::TAO_HASH_KEY
-#define TAO_COMPARE_KEYS TAO_SSLIOP_Connector::TAO_COMPARE_KEYS
-#define TAO_ATTRIBUTES TAO_SSLIOP_Connector::TAO_ATTRIBUTES
-#define TAO_CACHED_HANDLER TAO_SSLIOP_Connector::TAO_CACHED_HANDLER
-#define TAO_HASH_MAP TAO_SSLIOP_Connector::TAO_HASH_MAP
-#define TAO_HASH_MAP_ITERATOR TAO_SSLIOP_Connector::TAO_HASH_MAP_ITERATOR
-#define TAO_HASH_MAP_REVERSE_ITERATOR TAO_SSLIOP_Connector::TAO_HASH_MAP_REVERSE_ITERATOR
-#define TAO_CACHING_UTILITY TAO_SSLIOP_Connector::TAO_CACHING_UTILITY
-#define TAO_CACHING_STRATEGY TAO_SSLIOP_Connector::TAO_CACHING_STRATEGY
-#define TAO_CACHED_CONNECT_STRATEGY TAO_SSLIOP_Connector::TAO_CACHED_CONNECT_STRATEGY
-
-typedef ACE_LRU_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>
- TAO_SSLIOP_LRU_CACHING_STRATEGY;
-
-#if defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES)
-typedef TAO_SSLIOP_LRU_CACHING_STRATEGY
- TAO_SSLIOP_CACHING_STRATEGY;
-#else
-typedef ACE_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>
- TAO_SSLIOP_CACHING_STRATEGY;
-typedef ACE_LFU_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>
- TAO_SSLIOP_LFU_CACHING_STRATEGY;
-typedef ACE_FIFO_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>
- TAO_SSLIOP_FIFO_CACHING_STRATEGY;
-typedef ACE_Null_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>
- TAO_SSLIOP_NULL_CACHING_STRATEGY;
-typedef ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_SSLIOP_LRU_CACHING_STRATEGY>
- TAO_SSLIOP_LRU_CACHING_STRATEGY_ADAPTER;
-typedef ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_SSLIOP_LFU_CACHING_STRATEGY>
- TAO_SSLIOP_LFU_CACHING_STRATEGY_ADAPTER;
-typedef ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_SSLIOP_FIFO_CACHING_STRATEGY>
- TAO_SSLIOP_FIFO_CACHING_STRATEGY_ADAPTER;
-typedef ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_SSLIOP_NULL_CACHING_STRATEGY>
- TAO_SSLIOP_NULL_CACHING_STRATEGY_ADAPTER;
-#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */
-
-int
-TAO_SSLIOP_Connector::make_caching_strategy (void)
-{
- if (this->TAO_IIOP_Connector::make_caching_strategy () == -1)
- return -1;
-
- TAO_Resource_Factory *resource_factory =
- this->orb_core_->resource_factory ();
-
-#if defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES)
- ACE_NEW_RETURN (this->caching_strategy_,
- TAO_SSLIOP_CACHING_STRATEGY,
- -1);
-#else
- switch (resource_factory->connection_caching_strategy_type ())
- {
- case TAO_Resource_Factory::NOOP:
- ACE_NEW_RETURN (this->caching_strategy_,
- TAO_SSLIOP_NULL_CACHING_STRATEGY_ADAPTER,
- -1);
- break;
-
- default:
- case TAO_Resource_Factory::LRU:
- ACE_NEW_RETURN (this->caching_strategy_,
- TAO_SSLIOP_LRU_CACHING_STRATEGY_ADAPTER,
- -1);
- break;
-
- case TAO_Resource_Factory::LFU:
- ACE_NEW_RETURN (this->caching_strategy_,
- TAO_SSLIOP_LFU_CACHING_STRATEGY_ADAPTER,
- -1);
- break;
-
- case TAO_Resource_Factory::FIFO:
- ACE_NEW_RETURN (this->caching_strategy_,
- TAO_SSLIOP_FIFO_CACHING_STRATEGY_ADAPTER,
- -1);
- break;
- }
-
-#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */
-
- this->caching_strategy_->purge_percent (resource_factory->purge_percentage ());
- return 0;
-}
-#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */
-
-// The TAO_Cached_Connector_Lock template instantiations are in
-// Resource_Factory.cpp.
-
-#if !defined (TAO_USES_ROBUST_CONNECTION_MGMT)
-#define TAO_SVC_TUPLE ACE_Svc_Tuple<TAO_SSLIOP_Client_Connection_Handler>
-#define CACHED_CONNECT_STRATEGY ACE_Cached_Connect_Strategy<TAO_SSLIOP_Client_Connection_Handler, ACE_SSL_SOCK_CONNECTOR, TAO_Cached_Connector_Lock>
-#define TAO_ADDR ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr>
-#define TAO_HANDLER TAO_SSLIOP_Client_Connection_Handler
-#define TAO_HASH_KEY ACE_Hash<TAO_ADDR>
-#define TAO_COMPARE_KEYS ACE_Equal_To<TAO_ADDR>
-#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
- defined (ACE_HAS_GNU_REPO)
-
-template class ACE_Auto_Basic_Array_Ptr<ACE_INET_Addr>;
-template class ACE_Auto_Basic_Array_Ptr<TAO_SSLIOP_Client_Connection_Handler*>;
-template class auto_ptr<TAO_SSLIOP_Connect_Creation_Strategy>;
-template class ACE_Auto_Basic_Ptr<TAO_SSLIOP_Connect_Creation_Strategy>;
-
-template class ACE_Node<ACE_INET_Addr>;
-template class ACE_Unbounded_Stack<ACE_INET_Addr>;
-template class ACE_Unbounded_Stack_Iterator<ACE_INET_Addr>;
-
-#if !defined (TAO_USES_ROBUST_CONNECTION_MGMT)
-template class CACHED_CONNECT_STRATEGY;
-template class TAO_ADDR;
-#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */
-
-template class ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>;
-template class ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr>;
-template class ACE_NOOP_Creation_Strategy<TAO_HANDLER>;
-template class ACE_Concurrency_Strategy<TAO_HANDLER>;
-template class ACE_Connect_Strategy<TAO_HANDLER, ACE_SSL_SOCK_CONNECTOR>;
-template class ACE_Connector<TAO_HANDLER, ACE_SSL_SOCK_CONNECTOR>;
-template class ACE_Creation_Strategy<TAO_HANDLER>;
-template class ACE_Hash_Map_Entry<TAO_ADDR, TAO_HANDLER *>;
-template class ACE_Hash<ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr> >;
-template class ACE_Equal_To<ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr> >;
-template class ACE_Map_Entry<ACE_HANDLE, TAO_SVC_TUPLE *>;
-template class ACE_Map_Manager<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>;
-template class ACE_Map_Iterator_Base<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>;
-template class ACE_Map_Iterator<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>;
-template class ACE_Map_Reverse_Iterator<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>;
-template class ACE_NOOP_Concurrency_Strategy<TAO_HANDLER>;
-template class ACE_Recycling_Strategy<TAO_HANDLER>;
-template class ACE_Strategy_Connector<TAO_HANDLER, ACE_SSL_SOCK_CONNECTOR>;
-template class TAO_SVC_TUPLE;
-
-template class ACE_Hash_Map_Manager<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Manager_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Base_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Bucket_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>;
-
-#if defined (TAO_USES_ROBUST_CONNECTION_MGMT)
-template class ACE_Pair<TAO_HANDLER *, TAO_ATTRIBUTES>;
-template class ACE_Reference_Pair<TAO_ADDR, TAO_HANDLER *>;
-template class ACE_Hash_Map_Entry<TAO_ADDR, TAO_CACHED_HANDLER>;
-
-template class ACE_Hash_Map_Manager<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Manager_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Iterator_Base_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>;
-template class ACE_Hash_Map_Bucket_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>;
-
-// = Caching_Strategy
-template class ACE_Hash_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>;
-
-template class ACE_LRU_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>;
-
-#if !defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES)
-
-template class ACE_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>;
-template class ACE_LFU_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>;
-template class ACE_FIFO_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>;
-template class ACE_Null_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>;
-
-template class ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_SSLIOP_LRU_CACHING_STRATEGY>;
-template class ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_SSLIOP_LFU_CACHING_STRATEGY>;
-template class ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_SSLIOP_FIFO_CACHING_STRATEGY>;
-template class ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_SSLIOP_NULL_CACHING_STRATEGY>;
-
-template class ACE_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP, TAO_HASH_MAP_ITERATOR, TAO_HASH_MAP_REVERSE_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>;
-template class ACE_Cache_Map_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>;
-template class ACE_Cache_Map_Reverse_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP_REVERSE_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>;
-
-#else
-
-template class ACE_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>;
-
-#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */
-
-template class ACE_Cached_Connect_Strategy_Ex<TAO_HANDLER, ACE_SSL_SOCK_CONNECTOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES, TAO_Cached_Connector_Lock>;
-template class ACE_Cached_Connect_Strategy<TAO_HANDLER, ACE_SSL_SOCK_CONNECTOR, TAO_Cached_Connector_Lock>;
-
-template class ACE_Cleanup_Strategy<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP>;
-template class ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP>;
-template class ACE_Refcounted_Recyclable_Handler_Caching_Utility<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP, TAO_HASH_MAP_ITERATOR, TAO_ATTRIBUTES>;
-#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */
-
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-
-#pragma instantiate ACE_Auto_Basic_Array_Ptr<ACE_INET_Addr>
-#pragma instantiate ACE_Auto_Basic_Array_Ptr<TAO_SSLIOP_Client_Connection_Handler*>
-#pragma instantiate auto_ptr<TAO_SSLIOP_Connect_Creation_Strategy>
-#pragma instantiate ACE_Auto_Basic_Ptr<TAO_SSLIOP_Connect_Creation_Strategy>
-
-#pragma instantiate ACE_Node<ACE_INET_Addr>
-#pragma instantiate ACE_Unbounded_Stack<ACE_INET_Addr>
-#pragma instantiate ACE_Unbounded_Stack_Iterator<ACE_INET_Addr>
-
-#if !defined (TAO_USES_ROBUST_CONNECTION_MGMT)
-#pragma instantiate CACHED_CONNECT_STRATEGY;
-#pragma instantiate TAO_ADDR;
-#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */
-
-#pragma instantiate ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
-#pragma instantiate ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr>
-#pragma instantiate ACE_NOOP_Creation_Strategy<TAO_HANDLER>
-#pragma instantiate ACE_Concurrency_Strategy<TAO_HANDLER>
-#pragma instantiate ACE_Connect_Strategy<TAO_HANDLER, ACE_SSL_SOCK_CONNECTOR>
-#pragma instantiate ACE_Connector<TAO_HANDLER, ACE_SSL_SOCK_CONNECTOR>
-#pragma instantiate ACE_Creation_Strategy<TAO_HANDLER>
-#pragma instantiate ACE_Hash_Map_Entry<TAO_ADDR, TAO_HANDLER *>
-#pragma instantiate ACE_Hash<ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr> >
-#pragma instantiate ACE_Equal_To<ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr> >
-#pragma instantiate ACE_Map_Entry<ACE_HANDLE, TAO_SVC_TUPLE *>
-#pragma instantiate ACE_Map_Manager<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>
-#pragma instantiate ACE_Map_Iterator_Base<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>
-#pragma instantiate ACE_Map_Iterator<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>
-#pragma instantiate ACE_Map_Reverse_Iterator<ACE_HANDLE, TAO_SVC_TUPLE *, ACE_SYNCH_RW_MUTEX>
-#pragma instantiate ACE_NOOP_Concurrency_Strategy<TAO_HANDLER>
-#pragma instantiate ACE_Recycling_Strategy<TAO_HANDLER>
-#pragma instantiate ACE_Strategy_Connector<TAO_HANDLER, ACE_SSL_SOCK_CONNECTOR>
-#pragma instantiate TAO_SVC_TUPLE
-
-#pragma instantiate ACE_Hash_Map_Manager<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator<TAO_ADDR, TAO_HANDLER *, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Manager_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Bucket_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>
-
-#if defined (TAO_USES_ROBUST_CONNECTION_MGMT)
-#pragma instantiate ACE_Pair<TAO_HANDLER *, TAO_ATTRIBUTES>
-#pragma instantiate ACE_Reference_Pair<TAO_ADDR, TAO_HANDLER *>
-#pragma instantiate ACE_Hash_Map_Entry<TAO_ADDR, TAO_CACHED_HANDLER>
-
-#pragma instantiate ACE_Hash_Map_Manager<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Manager_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>
-#pragma instantiate ACE_Hash_Map_Bucket_Iterator<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_KEY, TAO_COMPARE_KEYS, ACE_Null_Mutex>
-
-// = Caching_Strategy
-#pragma instantiate ACE_Hash_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_KEY, TAO_COMPARE_KEYS, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>
-
-#pragma instantiate ACE_LRU_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>
-
-#if !defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES)
-
-#pragma instantiate ACE_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>
-#pragma instantiate ACE_LFU_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>
-#pragma instantiate ACE_FIFO_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>
-#pragma instantiate ACE_Null_Caching_Strategy<TAO_ATTRIBUTES, TAO_CACHING_UTILITY>
-
-#pragma instantiate ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_SSLIOP_LRU_CACHING_STRATEGY>
-#pragma instantiate ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_SSLIOP_LFU_CACHING_STRATEGY>
-#pragma instantiate ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_SSLIOP_FIFO_CACHING_STRATEGY>
-#pragma instantiate ACE_Caching_Strategy_Adapter<TAO_ATTRIBUTES, TAO_CACHING_UTILITY, TAO_SSLIOP_NULL_CACHING_STRATEGY>
-
-#pragma instantiate ACE_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP, TAO_HASH_MAP_ITERATOR, TAO_HASH_MAP_REVERSE_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>
-#pragma instantiate ACE_Cache_Map_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>
-#pragma instantiate ACE_Cache_Map_Reverse_Iterator<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP_REVERSE_ITERATOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>
-
-#else
-
-#pragma instantiate ACE_Cache_Map_Manager<TAO_ADDR, TAO_HANDLER *, TAO_HASH_MAP, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES>
-
-#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */
-
-#pragma instantiate ACE_Cached_Connect_Strategy_Ex<TAO_HANDLER, ACE_SSL_SOCK_CONNECTOR, TAO_CACHING_STRATEGY, TAO_ATTRIBUTES, TAO_Cached_Connector_Lock>
-#pragma instantiate ACE_Cached_Connect_Strategy<TAO_HANDLER, ACE_SSL_SOCK_CONNECTOR, TAO_Cached_Connector_Lock>
-
-#pragma instantiate ACE_Cleanup_Strategy<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP>
-#pragma instantiate ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP>
-#pragma instantiate ACE_Refcounted_Recyclable_Handler_Caching_Utility<TAO_ADDR, TAO_CACHED_HANDLER, TAO_HASH_MAP, TAO_HASH_MAP_ITERATOR, TAO_ATTRIBUTES>
-#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */
-
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-TAO_SSLIOP_Connect_Creation_Strategy::
- TAO_SSLIOP_Connect_Creation_Strategy (ACE_Thread_Manager* t,
- TAO_ORB_Core *orb_core)
- : ACE_Creation_Strategy<TAO_SSLIOP_Client_Connection_Handler> (t),
- orb_core_ (orb_core)
-{
-}
-
-int
-TAO_SSLIOP_Connect_Creation_Strategy::make_svc_handler
- (TAO_SSLIOP_Client_Connection_Handler *&sh)
-{
- if (sh == 0)
- ACE_NEW_RETURN (sh,
- TAO_SSLIOP_Client_Connection_Handler
- (this->orb_core_->thr_mgr (),
- this->orb_core_),
- -1);
- return 0;
-}
-
-// ****************************************************************
-
-#if !defined (TAO_USES_ROBUST_CONNECTION_MGMT)
-typedef ACE_Cached_Connect_Strategy<TAO_SSLIOP_Client_Connection_Handler,
- ACE_SSL_SOCK_CONNECTOR,
- TAO_Cached_Connector_Lock>
- TAO_CACHED_CONNECT_STRATEGY;
-#endif /* ! TAO_USES_ROBUST_CONNECTION_MGMT */
-
-TAO_SSLIOP_Connector::TAO_SSLIOP_Connector (int default_is_ssl)
- : TAO_IIOP_Connector (),
- default_is_ssl_ (default_is_ssl),
- base_connector_ ()
-#if defined (TAO_USES_ROBUST_CONNECTION_MGMT)
- ,
- cached_connect_strategy_ (0),
- caching_strategy_ (0)
-#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */
-{
-}
-
-int
-TAO_SSLIOP_Connector::open (TAO_ORB_Core *orb_core)
-{
- if (this->TAO_IIOP_Connector::open (orb_core) == -1)
- return -1;
-
- TAO_SSLIOP_Connect_Creation_Strategy *connect_creation_strategy = 0;
-
- ACE_NEW_RETURN (connect_creation_strategy,
- TAO_SSLIOP_Connect_Creation_Strategy
- (this->orb_core_->thr_mgr (),
- this->orb_core_),
- -1);
-
- auto_ptr<TAO_SSLIOP_Connect_Creation_Strategy>
- new_connect_creation_strategy (connect_creation_strategy);
-
- TAO_Cached_Connector_Lock *connector_lock = 0;
- ACE_NEW_RETURN (connector_lock,
- TAO_Cached_Connector_Lock (this->orb_core_),
- -1);
-
- auto_ptr<TAO_Cached_Connector_Lock> new_connector_lock (connector_lock);
-
-#if defined (TAO_USES_ROBUST_CONNECTION_MGMT)
- ACE_NEW_RETURN (this->cached_connect_strategy_,
- TAO_CACHED_CONNECT_STRATEGY (*this->caching_strategy_,
- new_connect_creation_strategy.get (),
- 0,
- 0,
- new_connector_lock.get (),
- 1),
- -1);
-#else /* TAO_USES_ROBUST_CONNECTION_MGMT */
- TAO_CACHED_CONNECT_STRATEGY *cached_connect_strategy = 0;
- ACE_NEW_RETURN (cached_connect_strategy,
- TAO_CACHED_CONNECT_STRATEGY
- (new_connect_creation_strategy.get (),
- 0,
- 0,
- new_connector_lock.get (),
- 1),
- -1);
-#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */
-
- // Finally everything is fine. Make sure to take ownership away
- // from the auto pointer.
- connect_creation_strategy =
- new_connect_creation_strategy.release ();
- connector_lock =
- new_connector_lock.release ();
-
-#if defined (TAO_USES_ROBUST_CONNECTION_MGMT)
- return this->base_connector_.open (this->orb_core_->reactor (),
- &this->null_creation_strategy_,
- this->cached_connect_strategy_,
- &this->null_activation_strategy_);
-#else /* TAO_USES_ROBUST_CONNECTION_MGMT */
- return this->base_connector_.open (this->orb_core_->reactor (),
- &this->null_creation_strategy_,
- cached_connect_strategy,
- &this->null_activation_strategy_);
-#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */
-}
-
-int
-TAO_SSLIOP_Connector::close (void)
-{
- this->base_connector_.close ();
-
- // Zap the creation strategy that we created earlier
-#if defined (TAO_USES_ROBUST_CONNECTION_MGMT)
- delete this->cached_connect_strategy_->creation_strategy ();
- delete this->cached_connect_strategy_;
- delete this->caching_strategy_;
-#else /* TAO_USES_ROBUST_CONNECTION_MGMT */
- TAO_CACHED_CONNECT_STRATEGY *cached_connect_strategy =
- ACE_dynamic_cast (TAO_CACHED_CONNECT_STRATEGY *,
- this->base_connector_.connect_strategy ());
-
- delete cached_connect_strategy->creation_strategy ();
- delete cached_connect_strategy;
-#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */
-
- return 0;
-}
-
-int
-TAO_SSLIOP_Connector::connect (TAO_Profile *pfile,
- TAO_Transport *&transport,
- ACE_Time_Value *max_wait_time)
-{
- // @@ Use the policies to decide if SSL is the right protocol...
- if (!this->default_is_ssl_)
- return this->TAO_IIOP_Connector::connect (pfile,
- transport,
- max_wait_time);
-
- if (pfile->tag () != TAO_TAG_IIOP_PROFILE)
- return -1;
-
- TAO_SSLIOP_Profile *profile =
- ACE_dynamic_cast (TAO_SSLIOP_Profile *,
- pfile);
- if (profile == 0)
- return -1;
-
- if (profile->ssl_port () == 0)
- return this->TAO_IIOP_Connector::connect (pfile,
- transport,
- max_wait_time);
-
- ACE_INET_Addr oa =
- profile->object_addr ();
- oa.set_port_number (profile->ssl_port ());
-
- TAO_SSLIOP_Client_Connection_Handler *svc_handler = 0;
- int result = 0;
-
- ACE_Synch_Options synch_options;
- if (max_wait_time != 0)
- {
- ACE_Synch_Options synch_options (ACE_Synch_Options::USE_TIMEOUT,
- *max_wait_time);
-
- // The connect call will set the hint () stored in the Profile
- // object; but we obtain the transport in the <result>
- // variable. Other threads may modify the hint, but we are not
- // affected.
- result = this->base_connector_.connect (profile->ssl_hint (),
- svc_handler,
- oa,
- synch_options);
- }
- else
- {
- // The connect call will set the hint () stored in the Profile
- // object; but we obtain the transport in the <result>
- // variable. Other threads may modify the hint, but we are not
- // affected.
- result = this->base_connector_.connect (profile->ssl_hint (),
- svc_handler,
- oa);
-
- }
-
- if (result == -1)
- {
- // Give users a clue to the problem.
- if (TAO_orbdebug)
- {
- char buffer [MAXHOSTNAMELEN + 6 + 1];
- profile->addr_to_string (buffer,
- sizeof(buffer) - 1);
- ACE_DEBUG ((LM_ERROR,
- "(%P|%t) %s:%u, connection to "
- "%s failed (%p)\n",
- __FILE__,
- __LINE__,
- buffer,
- "errno"));
- }
- return -1;
- }
-
- transport = svc_handler->transport ();
-
- // Now that we have the client connection handler object we need to
- // set the right messaging protocol for in the client side transport.
- const TAO_GIOP_Version& version = profile->version ();
- int ret_val = transport->messaging_init (version.major,
- version.minor);
- if (ret_val == -1)
- {
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("(%N|%l|%p|%t) messaging_init() ")
- ASYS_TEXT ("failed\n")));
- }
- return -1;
- }
-
- return 0;
-}
-
-TAO_Profile *
-TAO_SSLIOP_Connector::create_profile (TAO_InputCDR& cdr)
-{
- TAO_Profile *pfile;
- ACE_NEW_RETURN (pfile,
- TAO_SSLIOP_Profile (this->orb_core_),
- 0);
-
- int r = pfile->decode (cdr);
- if (r == -1)
- {
- pfile->_decr_refcnt ();
- pfile = 0;
- }
-
- return pfile;
-}
-
-void
-TAO_SSLIOP_Connector::make_profile (const char *endpoint,
- TAO_Profile *&profile,
- CORBA::Environment &ACE_TRY_ENV)
-{
- // The endpoint should be of the form:
- // N.n@host:port/object_key
- // or:
- // host:port/object_key
-
- ACE_NEW_THROW_EX (profile,
- TAO_SSLIOP_Profile (endpoint,
- this->orb_core_,
- 0, // @@ ssl_port
- ACE_TRY_ENV),
- CORBA::NO_MEMORY ());
-
- ACE_CHECK;
-}
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.h b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.h
deleted file mode 100644
index 7be6a906c0d..00000000000
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.h
+++ /dev/null
@@ -1,200 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO_SSLIOP
-//
-// = FILENAME
-// SSLIOP_Connector.h
-//
-// = DESCRIPTION
-// SSLIOP specific connector processing
-//
-// = AUTHOR
-// Carlos O'Ryan <coryan@ece.uci.edu>
-// Ossama Othman <ossama@ece.uci.edu>
-//
-// ============================================================================
-
-#ifndef TAO_SSLIOP_CONNECTOR_H
-#define TAO_SSLIOP_CONNECTOR_H
-
-#include "tao/IIOP_Connector.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "SSL_SOCK_Connector.h"
-#include "SSLIOP_Connect.h"
-#include "tao/Resource_Factory.h"
-
-#if defined (TAO_USES_ROBUST_CONNECTION_MGMT)
-#if defined(__GNUC__) && __GNUC__ == 2 && __GNUC_MINOR__ < 8
-#define ACE_HAS_BROKEN_EXTENDED_TEMPLATES
-#endif /* __GNUC__ */
-
-#include "ace/Cached_Connect_Strategy_T.h"
-#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */
-
-typedef ACE_Strategy_Connector<TAO_SSLIOP_Client_Connection_Handler,
- ACE_SSL_SOCK_CONNECTOR>
- TAO_SSLIOP_BASE_CONNECTOR;
-
-// ****************************************************************
-
-class TAO_SSLIOP_Export TAO_SSLIOP_Connect_Creation_Strategy : public ACE_Creation_Strategy<TAO_SSLIOP_Client_Connection_Handler>
-{
- // = TITLE
- // Helper creation strategy
- //
- // = DESCRIPTION
- // Creates UIOP_Client_Connection_Handler objects but satisfies
- // the interface required by the
- // ACE_Creation_Strategy<TAO_SSLIOP_Client_Connection_Handler>
- //
-public:
- TAO_SSLIOP_Connect_Creation_Strategy (ACE_Thread_Manager * = 0,
- TAO_ORB_Core* orb_core = 0);
-
- virtual int make_svc_handler (TAO_SSLIOP_Client_Connection_Handler *&sh);
- // Makes TAO_SSLIOP_Client_Connection_Handlers
-
-private:
- TAO_ORB_Core* orb_core_;
- // The ORB
-};
-
-// ****************************************************************
-
-class TAO_SSLIOP_Export TAO_SSLIOP_Connector : public TAO_IIOP_Connector
-{
- // = TITLE
- // IIOP-specific Connector bridge for pluggable protocols.
- //
- // = DESCRIPTION
- // Concrete instance of the TAO_Connector class. Responsible
- // for establishing a connection with a server and is called from the
- // Connector_Registory.
- //
-public:
- // = Initialization and termination methods.
- TAO_SSLIOP_Connector (int default_is_ssl = 0);
- // Constructor.
-
- // = The TAO_Connector methods, please check the documentation on
- // Pluggable.h
- virtual int open (TAO_ORB_Core *orb_core);
- virtual int close (void);
- virtual int connect (TAO_Profile *profile,
- TAO_Transport *&transport,
- ACE_Time_Value *max_wait_time);
- virtual TAO_Profile *create_profile (TAO_InputCDR& cdr);
-
-#if defined (TAO_USES_ROBUST_CONNECTION_MGMT)
- virtual int purge_connections (void);
- // Purge "old" connections.
-#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */
-
-protected:
- // = More TAO_Connector methods, please check the documentation on
- // Pluggable.h
- virtual void make_profile (const char *endpoint,
- TAO_Profile *&,
- CORBA::Environment &ACE_TRY_ENV =
- TAO_default_environment ());
-
-#if defined (TAO_USES_ROBUST_CONNECTION_MGMT)
- virtual int make_caching_strategy (void);
- // According to the option specified, create the appropriate caching
- // strategy used for purging unused connections from the connection
- // cache.
-#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */
-
-public:
-
-#if defined (TAO_USES_ROBUST_CONNECTION_MGMT)
- // = Connection Caching Strategy.
- typedef size_t TAO_ATTRIBUTES;
- typedef ACE_Pair<TAO_SSLIOP_Client_Connection_Handler *,
- TAO_ATTRIBUTES>
- TAO_CACHED_HANDLER;
- typedef ACE_Refcounted_Hash_Recyclable<ACE_INET_Addr>
- TAO_IADDR;
- typedef ACE_Hash<TAO_IADDR> TAO_HASH_KEY;
- typedef ACE_Equal_To<TAO_IADDR> TAO_COMPARE_KEYS;
-
- typedef ACE_Hash_Map_Manager_Ex<TAO_IADDR,
- TAO_CACHED_HANDLER,
- TAO_HASH_KEY,
- TAO_COMPARE_KEYS,
- ACE_Null_Mutex>
- TAO_HASH_MAP;
- typedef ACE_Hash_Map_Iterator_Ex<TAO_IADDR,
- TAO_CACHED_HANDLER,
- TAO_HASH_KEY,
- TAO_COMPARE_KEYS,
- ACE_Null_Mutex>
- TAO_HASH_MAP_ITERATOR;
- typedef ACE_Hash_Map_Reverse_Iterator_Ex<TAO_IADDR,
- TAO_CACHED_HANDLER,
- TAO_HASH_KEY,
- TAO_COMPARE_KEYS,
- ACE_Null_Mutex>
- TAO_HASH_MAP_REVERSE_ITERATOR;
-
- typedef ACE_Refcounted_Recyclable_Handler_Caching_Utility<TAO_IADDR,
- TAO_CACHED_HANDLER,
- TAO_HASH_MAP,
- TAO_HASH_MAP_ITERATOR,
- TAO_ATTRIBUTES>
- TAO_CACHING_UTILITY;
-
-#if defined (ACE_HAS_BROKEN_EXTENDED_TEMPLATES)
- typedef ACE_LRU_Caching_Strategy<TAO_ATTRIBUTES,
- TAO_CACHING_UTILITY>
- TAO_CACHING_STRATEGY;
-#else
- typedef ACE_Caching_Strategy<TAO_ATTRIBUTES,
- TAO_CACHING_UTILITY>
- TAO_CACHING_STRATEGY;
-#endif /* ACE_HAS_BROKEN_EXTENDED_TEMPLATES */
-
- typedef ACE_Cached_Connect_Strategy_Ex<TAO_SSLIOP_Client_Connection_Handler,
- ACE_SSL_SOCK_CONNECTOR,
- TAO_CACHING_STRATEGY,
- TAO_ATTRIBUTES,
- TAO_Cached_Connector_Lock>
- TAO_CACHED_CONNECT_STRATEGY;
-#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */
-
- typedef ACE_NOOP_Concurrency_Strategy<TAO_SSLIOP_Client_Connection_Handler>
- TAO_NULL_ACTIVATION_STRATEGY;
-
- typedef ACE_NOOP_Creation_Strategy<TAO_SSLIOP_Client_Connection_Handler>
- TAO_NULL_CREATION_STRATEGY;
-
-private:
- int default_is_ssl_;
- // If not zero it tries to use SSL by default.
-
- TAO_NULL_ACTIVATION_STRATEGY null_activation_strategy_;
- TAO_NULL_CREATION_STRATEGY null_creation_strategy_;
-
- TAO_SSLIOP_BASE_CONNECTOR base_connector_;
- // The connector initiating connection requests for IIOP.
-
-#if defined (TAO_USES_ROBUST_CONNECTION_MGMT)
- TAO_CACHED_CONNECT_STRATEGY *cached_connect_strategy_;
- // Cached connect strategy.
-
- TAO_CACHING_STRATEGY *caching_strategy_;
- // Caching strategy which decides the order of removal of entries
- // from the connection cache.
-#endif /* TAO_USES_ROBUST_CONNECTION_MGMT */
-
-};
-
-#endif /* TAO_SSLIOP_CONNECTOR_H */
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Export.h b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Export.h
deleted file mode 100644
index cd5e50d4c8d..00000000000
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Export.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by
-// ${ACE_ROOT}/GenExportH.BAT
-// ------------------------------
-#ifndef TAO_SSLIOP_EXPORT_H
-#define TAO_SSLIOP_EXPORT_H
-
-#include "ace/OS.h"
-
-#if !defined (TAO_SSLIOP_HAS_DLL)
-#define TAO_SSLIOP_HAS_DLL 1
-#endif /* ! TAO_SSLIOP_HAS_DLL */
-
-#if defined (TAO_SSLIOP_HAS_DLL)
-# if (TAO_SSLIOP_HAS_DLL == 1)
-# if defined (TAO_SSLIOP_BUILD_DLL)
-# define TAO_SSLIOP_Export ACE_Proper_Export_Flag
-# define TAO_SSLIOP_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# else
-# define TAO_SSLIOP_Export ACE_Proper_Import_Flag
-# define TAO_SSLIOP_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# endif /* TAO_SSLIOP_BUILD_DLL */
-# else
-# define TAO_SSLIOP_Export
-# define TAO_SSLIOP_SINGLETON_DECLARATION(T)
-# endif /* ! TAO_SSLIOP_HAS_DLL == 1 */
-#else
-# define TAO_SSLIOP_Export
-# define TAO_SSLIOP_SINGLETON_DECLARATION(T)
-#endif /* TAO_SSLIOP_HAS_DLL */
-
-#endif /* TAO_SSLIOP_EXPORT_H */
-
-// End of auto generated file.
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp
deleted file mode 100644
index 5c6b3a9409c..00000000000
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp
+++ /dev/null
@@ -1,169 +0,0 @@
-// $Id$
-
-#include "SSLIOP_Factory.h"
-#include "SSLIOP_Acceptor.h"
-#include "SSLIOP_Connector.h"
-#include "SSL_Context.h"
-#include "ace/Dynamic_Service.h"
-
-ACE_RCSID(tao, SSLIOP_Factory, "$Id$")
-
-static const char prefix_[] = "iiop";
-
-TAO_SSLIOP_Protocol_Factory::TAO_SSLIOP_Protocol_Factory (void)
- : major_ (TAO_DEF_GIOP_MAJOR),
- minor_ (TAO_DEF_GIOP_MINOR),
- use_ssl_ (1)
-{
-}
-
-TAO_SSLIOP_Protocol_Factory::~TAO_SSLIOP_Protocol_Factory (void)
-{
-}
-
-int
-TAO_SSLIOP_Protocol_Factory::match_prefix (const ACE_CString &prefix)
-{
- // Check for the proper prefix for this protocol.
- return (ACE_OS::strcasecmp (prefix.c_str (), ::prefix_) == 0);
-}
-
-const char *
-TAO_SSLIOP_Protocol_Factory::prefix (void) const
-{
- return ::prefix_;
-}
-
-char
-TAO_SSLIOP_Protocol_Factory::options_delimiter (void) const
-{
- return '/';
-}
-
-TAO_Acceptor *
-TAO_SSLIOP_Protocol_Factory::make_acceptor (void)
-{
- TAO_Acceptor *acceptor = 0;
-
- ACE_NEW_RETURN (acceptor,
- TAO_SSLIOP_Acceptor (),
- 0);
-
- return acceptor;
-}
-
-int
-TAO_SSLIOP_Protocol_Factory::init (int argc,
- char* argv[])
-{
- for (int curarg = 0; curarg != argc; ++curarg)
- {
- if (ACE_OS::strcasecmp (argv[curarg],
- "-SSLDisable") == 0)
- {
- this->use_ssl_ = 0;
- }
-
- else if (ACE_OS::strcasecmp (argv[curarg],
- "-SSLCertificate") == 0)
- {
- curarg++;
- if (curarg < argc)
- {
- char *lasts = 0;
- const char *type_name =
- ACE_OS::strtok_r (argv[curarg], ":", &lasts);
- const char *path =
- ACE_OS::strtok_r (0, ":", &lasts);
- int type = -1;
- if (ACE_OS::strcasecmp (type_name, "ASN1") == 0)
- {
- type = SSL_FILETYPE_ASN1;
- }
- else if (ACE_OS::strcasecmp (type_name, "PEM") == 0)
- {
- type = SSL_FILETYPE_PEM;
- }
- ACE_SSL_Context::instance ()->certificate (path, type);
- }
- }
-
- else if (ACE_OS::strcasecmp (argv[curarg],
- "-SSLPrivateKey") == 0)
- {
- curarg++;
- if (curarg < argc)
- {
- char *lasts = 0;
- const char *type_name =
- ACE_OS::strtok_r (argv[curarg], ":", &lasts);
- const char *path =
- ACE_OS::strtok_r (0, ":", &lasts);
- int type = -1;
- if (ACE_OS::strcasecmp (type_name, "ASN1") == 0)
- {
- type = SSL_FILETYPE_ASN1;
- }
- else if (ACE_OS::strcasecmp (type_name, "PEM") == 0)
- {
- type = SSL_FILETYPE_PEM;
- }
- ACE_SSL_Context::instance ()->private_key (path, type);
- }
- }
-
- else if (ACE_OS::strcasecmp (argv[curarg],
- "-SSLAuthenticate") == 0)
- {
- curarg++;
- if (curarg < argc)
- {
- int mode = SSL_VERIFY_NONE;
- if (ACE_OS::strcasecmp (argv[curarg], "NONE") == 0)
- {
- mode = SSL_VERIFY_NONE;
- }
- else if (ACE_OS::strcasecmp (argv[curarg], "SERVER") == 0)
- {
- mode = SSL_VERIFY_PEER;
- }
- else if (ACE_OS::strcasecmp (argv[curarg], "CLIENT") == 0
- || ACE_OS::strcasecmp (argv[curarg],
- "SERVER_AND_CLIENT") == 0)
- {
- mode = SSL_VERIFY_PEER|SSL_VERIFY_FAIL_IF_NO_PEER_CERT;
- }
- ACE_SSL_Context::instance ()->default_verify_mode (mode);
- }
- }
- }
-
- return 0;
-}
-
-TAO_Connector *
-TAO_SSLIOP_Protocol_Factory::make_connector (void)
-{
- TAO_Connector *connector = 0;
-
- ACE_NEW_RETURN (connector,
- TAO_SSLIOP_Connector (this->use_ssl_),
- 0);
- return connector;
-}
-
-int
-TAO_SSLIOP_Protocol_Factory::requires_explicit_endpoint (void) const
-{
- return 0;
-}
-
-ACE_STATIC_SVC_DEFINE (TAO_SSLIOP_Protocol_Factory,
- ASYS_TEXT ("SSLIOP_Factory"),
- ACE_SVC_OBJ_T,
- &ACE_SVC_NAME (TAO_SSLIOP_Protocol_Factory),
- ACE_Service_Type::DELETE_THIS |
- ACE_Service_Type::DELETE_OBJ,
- 0)
-
-ACE_FACTORY_DEFINE (TAO_SSLIOP, TAO_SSLIOP_Protocol_Factory)
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.h b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.h
deleted file mode 100644
index dfd2651eb52..00000000000
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// -*- C++ -*-
-// $Id$
-// ============================================================================
-//
-// = LIBRARY
-// TAO_SSLIOP
-//
-// = FILENAME
-// SSLIOP_Factory.h
-//
-// = AUTHOR
-// Carlos O'Ryan <coryan@ece.uci.edu>
-// Ossama Othman <ossama@ece.uci.edu>
-//
-// ============================================================================
-
-#ifndef TAO_SSLIOP_FACTORY_H
-#define TAO_SSLIOP_FACTORY_H
-
-#include "tao/Protocol_Factory.h"
-
-#include "SSL_Context.h"
-#include "SSLIOP_Export.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-class TAO_Acceptor;
-class TAO_Connector;
-
-class TAO_SSLIOP_Export TAO_SSLIOP_Protocol_Factory : public TAO_Protocol_Factory
-{
-public:
- TAO_SSLIOP_Protocol_Factory (void);
- virtual ~TAO_SSLIOP_Protocol_Factory (void);
-
- // = Service Configurator hooks.
- virtual int init (int argc, char* argv[]);
- // Dynamic linking hook
-
- virtual int match_prefix (const ACE_CString &prefix);
- // Verify prefix is a match
-
- virtual const char *prefix (void) const;
- // Returns the prefix used by the protocol.
-
- virtual char options_delimiter (void) const;
- // Return the character used to mark where an endpoint ends and
- // where its options begin.
-
- // = Check Protocol_Factory.h for a description of these methods.
- virtual TAO_Acceptor *make_acceptor (void);
- virtual TAO_Connector *make_connector (void);
- virtual int requires_explicit_endpoint (void) const;
-
-private:
- int major_;
- int minor_;
- // Changing the version number can be used to provide backwards
- // compatibility with old clients.
-
- int use_ssl_;
- // Use SSL when establishing connections
-};
-
-ACE_STATIC_SVC_DECLARE (TAO_SSLIOP_Protocol_Factory)
-ACE_FACTORY_DECLARE (TAO_SSLIOP, TAO_SSLIOP_Protocol_Factory)
-
-#endif /* TAO_SSLIOP_FACTORY_H */
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Profile.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Profile.cpp
deleted file mode 100644
index 58589958d04..00000000000
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Profile.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-// $Id$
-
-#include "SSLIOP_Profile.h"
-#include "SSLIOP_Connect.h"
-#include "tao/CDR.h"
-#include "tao/Environment.h"
-#include "tao/ORB.h"
-#include "tao/ORB_Core.h"
-#include "tao/debug.h"
-
-ACE_RCSID(tao, SSLIOP_Profile, "$Id$")
-
-#if !defined (__ACE_INLINE__)
-# include "SSLIOP_Profile.i"
-#endif /* __ACE_INLINE__ */
-
-TAO_SSLIOP_Profile::TAO_SSLIOP_Profile (const ACE_INET_Addr &addr,
- const TAO_ObjectKey &object_key,
- const TAO_GIOP_Version &version,
- TAO_ORB_Core *orb_core,
- u_short ssl_port)
- : TAO_IIOP_Profile (addr,
- object_key,
- version,
- orb_core),
- ssl_hint_ (0)
-{
- this->ssl_component_.port = ssl_port;
-}
-
-TAO_SSLIOP_Profile::TAO_SSLIOP_Profile (const char* host,
- CORBA::UShort port,
- const TAO_ObjectKey &object_key,
- const ACE_INET_Addr &addr,
- const TAO_GIOP_Version &version,
- TAO_ORB_Core *orb_core,
- u_short ssl_port)
- : TAO_IIOP_Profile (host,
- port,
- object_key,
- addr,
- version,
- orb_core),
- ssl_hint_ (0)
-{
- this->ssl_component_.port = ssl_port;
-}
-
-TAO_SSLIOP_Profile::TAO_SSLIOP_Profile (const char *string,
- TAO_ORB_Core *orb_core,
- u_short ssl_port,
- CORBA::Environment &ACE_TRY_ENV)
- : TAO_IIOP_Profile (string, orb_core, ACE_TRY_ENV),
- ssl_hint_ (0)
-{
- this->ssl_component_.port = ssl_port;
-}
-
-TAO_SSLIOP_Profile::TAO_SSLIOP_Profile (TAO_ORB_Core *orb_core)
- : TAO_IIOP_Profile (orb_core),
- ssl_hint_ (0)
-{
- this->ssl_component_.port = 0;
-}
-
-TAO_SSLIOP_Profile::~TAO_SSLIOP_Profile (void)
-{
-}
-
-void
-TAO_SSLIOP_Profile::reset_hint (void)
-{
- this->TAO_IIOP_Profile::reset_hint ();
- // @@ Who is doing the locking here!
- if (this->ssl_hint_)
- {
- this->ssl_hint_->cleanup_hint ();
- this->ssl_hint_ = 0;
- }
-}
-
-// return codes:
-// -1 -> error
-// 0 -> can't understand this version
-// 1 -> success.
-int
-TAO_SSLIOP_Profile::decode (TAO_InputCDR& cdr)
-{
- int r = this->TAO_IIOP_Profile::decode (cdr);
- if (r != 1)
- return r;
-
- IOP::TaggedComponent component;
- component.tag = IOP::TAG_SSL_SEC_TRANS;
- if (this->tagged_components ().get_component (component) == 0)
- {
- this->ssl_component_.port = 0;
- return 1;
- }
- else
- {
- TAO_InputCDR cdr (
- ACE_reinterpret_cast (const char*,
- component.component_data.get_buffer ()),
- component.component_data.length ());
- CORBA::Boolean byte_order;
- if ((cdr >> ACE_InputCDR::to_boolean (byte_order)) == 0)
- return -1;
- cdr.reset_byte_order (ACE_static_cast(int,byte_order));
-
- cdr >> this->ssl_component_;
- }
-
- return 1;
-}
-
-CORBA::Boolean
-TAO_SSLIOP_Profile::is_equivalent (const TAO_Profile *other_profile)
-{
- if (this->TAO_IIOP_Profile::is_equivalent (other_profile) == 0)
- return 0;
-
- const TAO_SSLIOP_Profile *op =
- ACE_dynamic_cast (const TAO_SSLIOP_Profile *, other_profile);
-
- if (this->ssl_component_.port != 0
- && op->ssl_component_.port != 0
- && this->ssl_component_.port != op->ssl_component_.port)
- return 0;
- // @@ Anything else to check????
-
- return 1;
-}
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Profile.h b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Profile.h
deleted file mode 100644
index d782ee547df..00000000000
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Profile.h
+++ /dev/null
@@ -1,109 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO_SSLIOP
-//
-// = FILENAME
-// SSLIOP_Profile.h
-//
-// = DESCRIPTION
-// SSLIOP profile specific processing
-//
-// = AUTHOR
-// Carlos O'Ryan <coryan@ece.uci.edu>
-// Ossama Othman <ossama@ece.uci.edu>
-//
-// ============================================================================
-
-#ifndef TAO_SSLIOP_PROFILE_H
-#define TAO_SSLIOP_PROFILE_H
-
-#include "tao/IIOP_Profile.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "SSLIOPC.h"
-#include "SSLIOP_Export.h"
-
-class TAO_SSLIOP_Client_Connection_Handler;
-
-// TAO SSLIOP_Profile concrete Profile definitions
-class TAO_SSLIOP_Export TAO_SSLIOP_Profile : public TAO_IIOP_Profile
-{
- // = TITLE
- // This class defines the protocol specific attributes required
- // for locating ORBs over a TCP/IP network, using either IIOP or
- // IIOP/SSL for communication.
- //
- // = DESCRIPTION
- // This class extends TAO_IIOP_Profile to support secure
- // communication using SSL.
- //
-public:
- TAO_SSLIOP_Profile (const ACE_INET_Addr &addr,
- const TAO_ObjectKey &object_key,
- const TAO_GIOP_Version &version,
- TAO_ORB_Core *orb_core,
- u_short ssl_port = 0);
- // Profile constructor, same as above except the object_key has
- // already been marshaled.
-
- TAO_SSLIOP_Profile (const char *host,
- CORBA::UShort port,
- const TAO_ObjectKey &object_key,
- const ACE_INET_Addr &addr,
- const TAO_GIOP_Version &version,
- TAO_ORB_Core *orb_core,
- u_short ssl_port = 0);
- // Profile constructor, this is the most efficient since it
- // doesn't require any address resolution processing.
-
- TAO_SSLIOP_Profile (const char *string,
- TAO_ORB_Core *orb_core,
- u_short ssl_port,
- CORBA::Environment &ACE_TRY_ENV =
- TAO_default_environment ());
- // Create object using a string ior.
-
- TAO_SSLIOP_Profile (TAO_ORB_Core *orb_core);
- // Profile constructor, default.
-
- ~TAO_SSLIOP_Profile (void);
- // Destructor is to be called only through <_decr_refcnt>.
-
- CORBA::UShort ssl_port (void) const;
- // The port used for SSL communication.
-
- TAO_SSLIOP_Client_Connection_Handler *&ssl_hint (void);
- // This is a hint for which connection handler to use.
-
- // = Please see Profile.h for the documentation of these methods.
- virtual int decode (TAO_InputCDR& cdr);
- virtual CORBA::Boolean is_equivalent (const TAO_Profile *other_profile);
- virtual void reset_hint (void);
-
-private:
- TAO_SSLIOP_Profile (const TAO_SSLIOP_Profile &pfile);
- TAO_SSLIOP_Profile &operator= (const TAO_SSLIOP_Profile &src);
- // private & undefined
-
-private:
- SSLIOP::SSL ssl_component_;
- // Cache the SSL tagged component in a decoded format. Notice that
- // we do not need to marshal this object!
-
- TAO_SSLIOP_Client_Connection_Handler *ssl_hint_;
- // Pointer to a connection handler which we successfully used
- // already.
-};
-
-#if defined (__ACE_INLINE__)
-# include "SSLIOP_Profile.i"
-#endif /* __ACE_INLINE__ */
-
-#endif /* TAO_SSLIOP_PROFILE_H */
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Profile.i b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Profile.i
deleted file mode 100644
index dccef239ec9..00000000000
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Profile.i
+++ /dev/null
@@ -1,14 +0,0 @@
-// -*- C++ -*-
-// $Id$
-
-ACE_INLINE CORBA::UShort
-TAO_SSLIOP_Profile::ssl_port (void) const
-{
- return this->ssl_component_.port;
-}
-
-ACE_INLINE TAO_SSLIOP_Client_Connection_Handler *&
-TAO_SSLIOP_Profile::ssl_hint(void)
-{
- return this->ssl_hint_;
-}
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp
deleted file mode 100644
index 1c151315037..00000000000
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp
+++ /dev/null
@@ -1,505 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-// $Id$
-
-#include "SSLIOP_Transport.h"
-#include "SSLIOP_Connect.h"
-#include "SSLIOP_Profile.h"
-#include "tao/Timeprobe.h"
-#include "tao/CDR.h"
-#include "tao/Transport_Mux_Strategy.h"
-#include "tao/Wait_Strategy.h"
-#include "tao/Sync_Strategies.h"
-#include "tao/Stub.h"
-#include "tao/ORB_Core.h"
-#include "tao/debug.h"
-
-#include "tao/GIOP_Message_Connectors.h"
-
-#if defined (ACE_ENABLE_TIMEPROBES)
-
-static const char *TAO_Transport_Timeprobe_Description[] =
- {
- "SSLIOP_Transport::send - start",
- "SSLIOP_Transport::send - end",
-
- "SSLIOP_Transport::receive - start",
- "SSLIOP_Transport::receive - end",
-
- "SSLIOP_Client_Transport::start_request - start",
- "SSLIOP_Client_Transport::start_request - end"
- };
-
-enum
- {
- TAO_SSLIOP_TRANSPORT_SEND_START = 2200,
- TAO_SSLIOP_TRANSPORT_SEND_END,
-
- TAO_SSLIOP_TRANSPORT_RECEIVE_START,
- TAO_SSLIOP_TRANSPORT_RECEIVE_END,
-
- TAO_SSLIOP_CLIENT_TRANSPORT_START_REQUEST_START,
- TAO_SSLIOP_CLIENT_TRANSPORT_START_REQUEST_END
- };
-
-
-// Setup Timeprobes
-ACE_TIMEPROBE_EVENT_DESCRIPTIONS (TAO_Transport_Timeprobe_Description,
- TAO_SSLIOP_TRANSPORT_SEND_START);
-
-#endif /* ACE_ENABLE_TIMEPROBES */
-
-TAO_SSLIOP_Transport::TAO_SSLIOP_Transport (TAO_SSLIOP_Handler_Base *handler,
- TAO_ORB_Core *orb_core)
- : TAO_Transport (TAO_TAG_IIOP_PROFILE,
- orb_core),
- handler_ (handler)
-{
-}
-
-TAO_SSLIOP_Transport::~TAO_SSLIOP_Transport (void)
-{
-}
-
-TAO_SSLIOP_Handler_Base *&
-TAO_SSLIOP_Transport::handler (void)
-{
- return this->handler_;
-}
-
-int
-TAO_SSLIOP_Transport::idle (void)
-{
- return this->handler_->idle();
-}
-
-void
-TAO_SSLIOP_Transport::close_connection (void)
-{
- this->handler_->handle_close ();
-}
-
-ACE_HANDLE
-TAO_SSLIOP_Transport::handle (void)
-{
- return this->handler_->get_handle ();
-}
-
-ACE_Event_Handler *
-TAO_SSLIOP_Transport::event_handler (void)
-{
- return this->handler_;
-}
-
-// ****************************************************************
-
-TAO_SSLIOP_Server_Transport::
- TAO_SSLIOP_Server_Transport (TAO_SSLIOP_Server_Connection_Handler *handler,
- TAO_ORB_Core* orb_core)
- : TAO_SSLIOP_Transport (handler, orb_core),
- server_handler_ (handler),
- message_state_ (orb_core)
-{
-}
-
-TAO_SSLIOP_Server_Transport::~TAO_SSLIOP_Server_Transport (void)
-{
-}
-
-// ****************************************************************
-
-TAO_SSLIOP_Client_Transport::
- TAO_SSLIOP_Client_Transport (TAO_SSLIOP_Client_Connection_Handler *handler,
- TAO_ORB_Core *orb_core)
- : TAO_SSLIOP_Transport (handler,
- orb_core),
- client_handler_ (handler),
- client_mesg_factory_ (0),
- orb_core_ (orb_core),
- params_ ()
-{
-}
-
-TAO_SSLIOP_Client_Transport::~TAO_SSLIOP_Client_Transport (void)
-{
-}
-
-TAO_SSLIOP_Client_Connection_Handler *
-TAO_SSLIOP_Client_Transport::client_handler (void)
-{
- return this->client_handler_;
-}
-
-void
-TAO_SSLIOP_Client_Transport::start_request (TAO_ORB_Core * /* orb_core */,
- TAO_Target_Specification & /* spec */,
- TAO_OutputCDR &output,
- CORBA::Environment &ACE_TRY_ENV)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- TAO_FUNCTION_PP_TIMEPROBE (TAO_SSLIOP_CLIENT_TRANSPORT_START_REQUEST_START);
-
-// const TAO_SSLIOP_Profile* profile =
-// ACE_dynamic_cast(const TAO_SSLIOP_Profile*, pfile);
-
-// // @@ This should be implemented in the transport object, which
-// // would query the profile to obtain the version...
-// if (TAO_GIOP::start_message (profile->version (),
-// TAO_GIOP::Request,
-// output,
-// orb_core) == 0)
- if (this->client_mesg_factory_->write_protocol_header
- (TAO_PLUGGABLE_MESSAGE_REQUEST,
- output) == 0)
- ACE_THROW (CORBA::MARSHAL ());
-}
-
-void
-TAO_SSLIOP_Client_Transport::start_locate (TAO_ORB_Core * /* orb_core */,
- TAO_Target_Specification & spec,
- TAO_Operation_Details & opdetails,
- TAO_OutputCDR &output,
- CORBA::Environment &ACE_TRY_ENV)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // See this is GIOP way of doing this..But anyway IIOP will be tied
- // up with GIOP. (comment from Bala?)
- if (this->client_mesg_factory_->write_protocol_header
- (TAO_PLUGGABLE_MESSAGE_LOCATEREQUEST,
- output) == 0)
- ACE_THROW (CORBA::MARSHAL ());
-
- if (this->client_mesg_factory_->write_message_header (
- opdetails,
- TAO_PLUGGABLE_MESSAGE_LOCATE_REQUEST_HEADER,
- spec,
- output) == 0)
- ACE_THROW (CORBA::MARSHAL ());
-}
-
-int
-TAO_SSLIOP_Client_Transport::send_request (TAO_Stub *stub,
- TAO_ORB_Core *orb_core,
- TAO_OutputCDR &stream,
- int two_way,
- ACE_Time_Value *max_wait_time)
-{
- if (this->ws_->sending_request (orb_core,
- two_way) == -1)
- return -1;
-
- if (this->client_mesg_factory_->send_message (this,
- stream,
- max_wait_time,
- stub,
- two_way) == -1)
- return -1;
-
- return this->idle_after_send ();
-}
-
-// Return 0, when the reply is not read fully, 1 if it is read fully.
-// @@ This code should go in the TAO_Transport class is repeated for
-// each transport!!
-int
-TAO_SSLIOP_Client_Transport::handle_client_input (int /* block */,
- ACE_Time_Value *max_wait_time)
-{
-
- // Notice that the message_state is only modified in one thread at a
- // time because the reactor does not call handle_input() for the
- // same Event_Handler in two threads at the same time.
-
- // Get the message state from the Transport Mux Strategy.
- TAO_GIOP_Message_State* message_state =
- this->tms_->get_message_state ();
-
- if (message_state == 0)
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) SSLIOP_Transport::handle_client_input -"
- " nil message state\n"));
- return -1;
- }
-
- int result =
- this->client_mesg_factory_->handle_input (this,
- this->orb_core_,
- *message_state,
- max_wait_time);
-
- if (result == -1)
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - %p\n",
- "SSLIOP_Transport::handle_client_input, handle_input"));
- return -1;
- }
- if (result == 0)
- return result;
-
- // OK, the complete message is here...
-
- result = this->client_mesg_factory_->parse_reply (*message_state,
- this->params_);
-
- if (result == -1)
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - %p\n",
- "SSLIOP_Transport::handle_client_input, parse reply"));
- message_state->reset ();
- return -1;
- }
-
- result =
- this->tms_->dispatch_reply (this->params_.request_id_,
- this->params_.reply_status_,
- message_state->giop_version,
- this->params_.svc_ctx_,
- message_state);
-
- if (result == -1)
- {
- if (TAO_debug_level > 0)
- ACE_ERROR ((LM_ERROR,
- "TAO (%P|%t) : SSLIOP_Client_Transport::"
- "handle_client_input - "
- "dispatch reply failed\n"));
- message_state->reset ();
- return -1;
- }
-
- if (result == 0)
- {
- message_state->reset ();
- return 0;
- }
-
- // This is a NOOP for the Exclusive request case, but it actually
- // destroys the stream in the muxed case.
- this->tms_->destroy_message_state (message_state);
-
- return result;
-}
-
-int
-TAO_SSLIOP_Client_Transport::register_handler (void)
-{
- // @@ It seems like this method should go away, the right reactor is
- // picked at object creation time.
- ACE_Reactor *r = this->orb_core ()->reactor ();
- if (r == this->client_handler ()->reactor ())
- return 0;
-
- return r->register_handler (this->client_handler (),
- ACE_Event_Handler::READ_MASK);
-}
-
-int
-TAO_SSLIOP_Client_Transport::messaging_init (CORBA::Octet major,
- CORBA::Octet minor)
-{
- // DO NOT add support for GIOPlite to SSLIOP. It introduces
- // security holes!
-
- if (this->client_mesg_factory_ == 0)
- {
- if (major == TAO_DEF_GIOP_MAJOR)
- {
- if (minor > TAO_DEF_GIOP_MINOR)
- minor = TAO_DEF_GIOP_MINOR;
-
- switch (minor)
- {
- case 0:
- ACE_NEW_RETURN (this->client_mesg_factory_,
- TAO_GIOP_Message_Connector_10,
- 0);
- break;
- case 1:
- ACE_NEW_RETURN (this->client_mesg_factory_,
- TAO_GIOP_Message_Connector_11,
- 0);
- break;
- default:
- if (TAO_debug_level > 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("(%N|%l|%p|%t) ")
- ASYS_TEXT ("No matching minor ")
- ASYS_TEXT ("version number \n")),
- 0);
- }
- }
- }
- else
- {
- if (TAO_debug_level > 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("(%N|%l|%p|%t) ")
- ASYS_TEXT ("No matching minor ")
- ASYS_TEXT ("version number \n")),
- 0);
- }
- }
- }
-
- return 1;
-}
-
-CORBA::Boolean
-TAO_SSLIOP_Client_Transport::send_request_header (
- TAO_Operation_Details &opdetails,
- TAO_Target_Specification &spec,
- TAO_OutputCDR & msg)
-{
- // We are going to pass on this request to the underlying messaging
- // layer. It should take care of this request.
- CORBA::Boolean retval =
- this->client_mesg_factory_->write_message_header (
- opdetails,
- TAO_PLUGGABLE_MESSAGE_REQUEST_HEADER,
- spec,
- msg);
-
- return retval;
-}
-
-// *********************************************************************
-
-ssize_t
-TAO_SSLIOP_Transport::send (TAO_Stub *stub,
- int two_way,
- const ACE_Message_Block *message_block,
- const ACE_Time_Value *max_wait_time)
-{
- if (stub == 0 || two_way)
- {
- return this->send (message_block,
- max_wait_time);
- }
- else
- {
- TAO_Sync_Strategy &sync_strategy = stub->sync_strategy ();
-
- return sync_strategy.send (*this,
- *stub,
- message_block,
- max_wait_time);
- }
-}
-
-ssize_t
-TAO_SSLIOP_Transport::send (const ACE_Message_Block *message_block,
- const ACE_Time_Value *max_wait_time)
-{
- TAO_FUNCTION_PP_TIMEPROBE (TAO_SSLIOP_TRANSPORT_SEND_START);
-
- // @@ This code should be refactored into ACE.cpp or something
- // similar!
-
- // For the most part this was copied from GIOP::send_request and
- // friends.
-
- iovec iov[IOV_MAX];
- int iovcnt = 0;
- ssize_t n = 0;
- ssize_t nbytes = 0;
-
- for (const ACE_Message_Block *i = message_block;
- i != 0;
- i = i->cont ())
- {
- // Make sure there is something to send!
- if (i->length () > 0)
- {
- iov[iovcnt].iov_base = i->rd_ptr ();
- iov[iovcnt].iov_len = i->length ();
- iovcnt++;
-
- // The buffer is full make a OS call. @@ TODO this should
- // be optimized on a per-platform basis, for instance, some
- // platforms do not implement writev() there we should copy
- // the data into a buffer and call send_n(). In other cases
- // there may be some limits on the size of the iovec, there
- // we should set IOV_MAX to that limit.
- if (iovcnt == IOV_MAX)
- {
- if (max_wait_time == 0)
- n = this->handler_->peer ().sendv_n (iov,
- iovcnt);
- else
- // @@ No timeouts!!!
- n = this->handler_->peer ().sendv_n (iov,
- iovcnt
- /*, max_wait_time */);
-
- if (n <= 0)
- return n;
-
- nbytes += n;
- iovcnt = 0;
- }
- }
- }
-
- // Check for remaining buffers to be sent!
- if (iovcnt != 0)
- {
- n = this->handler_->peer ().sendv_n (iov,
- iovcnt);
- if (n < 1)
- return n;
-
- nbytes += n;
- }
-
- return nbytes;
-}
-
-ssize_t
-TAO_SSLIOP_Transport::send (const u_char *buf,
- size_t len,
- const ACE_Time_Value *)
-{
- TAO_FUNCTION_PP_TIMEPROBE (TAO_SSLIOP_TRANSPORT_SEND_START);
-
- return this->handler_->peer ().send_n (buf, len);
-}
-
-ssize_t
-TAO_SSLIOP_Transport::recv (char *buf,
- size_t len,
- const ACE_Time_Value * /* max_wait_time */)
-{
- TAO_FUNCTION_PP_TIMEPROBE (TAO_SSLIOP_TRANSPORT_RECEIVE_START);
-
- // @@ No timeouts!
- return this->handler_->peer ().recv_n (buf,
- len
- /* , max_wait_time */);
-}
-
-// Default action to be taken for send request.
-int
-TAO_SSLIOP_Transport::send_request (TAO_Stub *,
- TAO_ORB_Core * /* orb_core */,
- TAO_OutputCDR & /* stream */,
- int /* twoway */,
- ACE_Time_Value * /* max_wait_time */)
-{
- return -1;
-}
-
-CORBA::Boolean
-TAO_SSLIOP_Transport::send_request_header (TAO_Operation_Details &,
- TAO_Target_Specification &,
- TAO_OutputCDR &)
-{
- // We should never be here. So return an error.
- return 0;
-}
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h
deleted file mode 100644
index 313fd58fc7c..00000000000
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h
+++ /dev/null
@@ -1,204 +0,0 @@
-// This may look like C, but it's really -*- C++ -*-
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO_SSLIOP
-//
-// = FILENAME
-// SSLIOP_Transport.h
-//
-// = DESCRIPTION
-// SSLIOP Transport specific processing
-//
-// = AUTHOR
-// Carlos O'Ryan <coryan@ece.uci.edu>
-// Ossama Othman <ossama@ece.uci.edu>
-//
-// ============================================================================
-
-#ifndef TAO_SSLIOP_TRANSPORT_H
-#define TAO_SSLIOP_TRANSPORT_H
-
-#include "tao/Pluggable.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "tao/operation_details.h"
-#include "tao/GIOP_Message_State.h"
-#include "tao/Pluggable_Messaging_Utils.h"
-
-#include "SSLIOP_Export.h"
-
-// Forward decls.
-class TAO_SSLIOP_Handler_Base;
-class TAO_SSLIOP_Client_Connection_Handler;
-class TAO_SSLIOP_Server_Connection_Handler;
-class TAO_ORB_Core;
-
-class TAO_SSLIOP_Export TAO_SSLIOP_Transport : public TAO_Transport
-{
- // = TITLE
- // This class acts as a bridge class to the transport specific
- // connection handler (handler_).
- //
- // = DESCRIPTION
- // Specialization of the base TAO_Transport class to handle the IIOP
- // protocol. This class in turn will be further specialized for
- // the client and server side.
-public:
- TAO_SSLIOP_Transport (TAO_SSLIOP_Handler_Base *handler,
- TAO_ORB_Core *orb_core);
- // Base object's creator method.
-
- ~TAO_SSLIOP_Transport (void);
- // Default destructor.
-
- TAO_SSLIOP_Handler_Base *&handler (void);
- // Return a reference to the corresponding connection handler.
-
- // = The TAO_Transport methods, please check the documentation in
- // "tao/Pluggable.h" for more details.
- virtual void close_connection (void);
- virtual int idle (void);
- virtual ACE_HANDLE handle (void);
- virtual ACE_Event_Handler *event_handler (void);
- virtual ssize_t send (TAO_Stub *stub,
- int two_way,
- const ACE_Message_Block *mblk,
- const ACE_Time_Value *s = 0);
- virtual ssize_t send (const ACE_Message_Block *mblk,
- const ACE_Time_Value *s = 0);
- virtual ssize_t send (const u_char *buf,
- size_t len,
- const ACE_Time_Value *s = 0);
- virtual ssize_t recv (char *buf,
- size_t len,
- const ACE_Time_Value *s = 0);
- virtual int send_request (TAO_Stub *stub,
- TAO_ORB_Core *orb_core ,
- TAO_OutputCDR &stream,
- int twoway,
- ACE_Time_Value *max_wait_time);
-
- virtual CORBA::Boolean
- send_request_header (TAO_Operation_Details &opdetails,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &msg);
-
-protected:
- TAO_SSLIOP_Handler_Base *handler_;
- // the connection service handler used for accessing lower layer
- // communication protocols.
-};
-
-class TAO_SSLIOP_Export TAO_SSLIOP_Client_Transport : public TAO_SSLIOP_Transport
-{
- // = TITLE
- // The Transport class used for Client side communication with a
- // server.
- //
- // = DESCRIPTION
- // Specialization of the TAO_SSLIOP_Transport class for client
- // side. Methods related to sending one and two way requests
- // lives here.
-public:
- TAO_SSLIOP_Client_Transport (TAO_SSLIOP_Client_Connection_Handler *handler,
- TAO_ORB_Core *orb_core);
- // Constructor. Note, TAO_SSLIOP_Handler_Base is the base class for
- // both TAO_SSLIOP_Client_Connection_Handler and
- // TAO_SSLIOP_Server_Connection_Handler.
-
- ~TAO_SSLIOP_Client_Transport (void);
- // destructor
-
- TAO_SSLIOP_Client_Connection_Handler *client_handler (void);
- // return a pointer to the client's connection handler.
-
- // = The TAO_Transport methods, please check the documentation in
- // "tao/Pluggable.h" for more details.
- virtual void start_request (TAO_ORB_Core *orb_core,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &output,
- CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ())
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void start_locate (TAO_ORB_Core *orb_core,
- TAO_Target_Specification &spec,
- TAO_Operation_Details &opdetails,
- TAO_OutputCDR &output,
- CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ())
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual int send_request (TAO_Stub *stub,
- TAO_ORB_Core *orb_core,
- TAO_OutputCDR &stream,
- int twoway,
- ACE_Time_Value *max_wait_time);
- virtual int handle_client_input (int block = 0,
- ACE_Time_Value *max_time_value = 0);
- virtual int register_handler (void);
-
- virtual CORBA::Boolean
- send_request_header (TAO_Operation_Details &opdetails,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &msg);
-
- int messaging_init (CORBA::Octet major,
- CORBA::Octet minor);
- // Initialize the messaging object.
-
- // void use_lite (CORBA::Boolean flag);
- // Use the lite GIOP implementation
- // @@ The lite implementation of GIOP is not supported for SSLIOP
- // since it introduces security holes.
- // -Ossama
-
-private:
- TAO_SSLIOP_Client_Connection_Handler *client_handler_;
- // pointer to the corresponding client side connection handler.
-
- TAO_Pluggable_Messaging *client_mesg_factory_;
- // The message_factor instance specific for this particular
- // transport protocol.
-
- TAO_ORB_Core *orb_core_;
- // Our ORB core
-
- TAO_Pluggable_Reply_Params params_;
- // The reply data that is sent back by the server
-};
-
-// ****************************************************************
-
-class TAO_SSLIOP_Export TAO_SSLIOP_Server_Transport : public TAO_SSLIOP_Transport
-{
- // = TITLE
- // The Transport class used for server communication with a
- // connected client.
- //
- // = DESCRIPTION
- // Specialization of the TAO_SSLIOP_Transport class for the server side.
- // methods for reading messages (requests) and sending replies live
- // here.
-public:
-
- TAO_SSLIOP_Server_Transport (TAO_SSLIOP_Server_Connection_Handler *handler,
- TAO_ORB_Core *orb_core);
- // Default creator method.
-
- ~TAO_SSLIOP_Server_Transport (void);
- // Default destructor
-
- TAO_SSLIOP_Server_Connection_Handler *server_handler_;
- // Pointer to the corresponding connection handler.
-
- TAO_GIOP_Message_State message_state_;
- // This keep the state of the current message, to enable
- // non-blocking reads, fragment reassembly, etc.
-};
-
-#endif /* TAO_SSLIOP_TRANSPORT_H */