summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorfields_t <fields_t@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2011-11-16 22:46:23 +0000
committerfields_t <fields_t@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2011-11-16 22:46:23 +0000
commit4c37b556670e492dae6bc478d3713e1ad9f13164 (patch)
treef582a5500e8934969ff915b631f3b334da0751c3 /TAO
parenta1560a191ea117266b73fa4a481ea2b0f772c221 (diff)
downloadATCD-4c37b556670e492dae6bc478d3713e1ad9f13164.tar.gz
ChangeLogTag: Wed Nov 16 22:23:08 UTC 2011 Trevor Fields <fields_t@ociweb.com>
Test for SSLIOP creating connections to exceed the ORBMuxedConnectionMax setting.
Diffstat (limited to 'TAO')
-rw-r--r--TAO/ChangeLog33
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Client_Task.cpp34
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Client_Task.h35
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/MT_BiDir_SSL.mpc43
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/README19
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Receiver.idl11
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Receiver_i.cpp26
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Receiver_i.h35
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Sender.idl14
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Sender_i.cpp62
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Sender_i.h55
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Server_Task.cpp75
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Server_Task.h54
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/client.conf12
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/client.conf.xml14
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/client.cpp152
-rwxr-xr-xTAO/orbsvcs/tests/Security/MT_BiDir_SSL/run_test.pl148
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/server.conf11
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/server.conf.xml13
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/server.cpp178
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/ca.pem34
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/client-cert.pem17
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/client-key.pem32
-rwxr-xr-xTAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/make-client-keys16
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/server-cert.pem17
-rw-r--r--TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/server-key.pem32
26 files changed, 1172 insertions, 0 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 2930d7b210c..a421bf694da 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,36 @@
+Wed Nov 16 22:23:08 UTC 2011 Trevor Fields <fields_t@ociweb.com>
+
+ * orbsvcs/tests/Security/MT_BiDir_SSL:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/client.conf:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/client.conf.xml:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/client.cpp:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/Client_Task.cpp:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/Client_Task.h:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/MT_BiDir_SSL.mpc:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/README:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/Receiver.idl:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/Receiver_i.cpp:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/Receiver_i.h:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/run_test.pl:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/Sender.idl:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/Sender_i.cpp:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/Sender_i.h:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/server.conf:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/server.conf.xml:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/server.cpp:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/Server_Task.cpp:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/Server_Task.h:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/ssl:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/ssl/ca.pem:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/ssl/client-cert.pem:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/ssl/client-key.pem:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/ssl/make-client-keys:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/ssl/server-cert.pem:
+ * orbsvcs/tests/Security/MT_BiDir_SSL/ssl/server-key.pem:
+
+ Test for SSLIOP creating connections to exceed the
+ ORBMuxedConnectionMax setting.
+
Tue Nov 15 22:13:12 UTC 2011 Trevor Fields <fields_t@ociweb.com>
* orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.cpp:
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Client_Task.cpp b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Client_Task.cpp
new file mode 100644
index 00000000000..24d1baf9ead
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Client_Task.cpp
@@ -0,0 +1,34 @@
+//
+// $Id$
+//
+
+#include "Client_Task.h"
+
+Client_Task::Client_Task (CORBA::ORB_ptr orb,
+ ACE_Thread_Manager *thr_mgr)
+ : ACE_Task_Base (thr_mgr)
+ , orb_ (CORBA::ORB::_duplicate (orb))
+ {
+}
+
+int
+Client_Task::svc (void)
+{
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting client task\n"));
+
+ // Wait for 2 minutes...
+ ACE_Time_Value tv (60,0);
+
+ try
+ {
+ this->orb_->run (tv);
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("(%P|%t) Client_Task::svc exception!!!\n");
+
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) Client task finished\n"));
+ return 0;
+}
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Client_Task.h b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Client_Task.h
new file mode 100644
index 00000000000..4b8f586e00a
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Client_Task.h
@@ -0,0 +1,35 @@
+//
+// $Id$
+//
+
+#ifndef MT_BIDIR__CLIENT_TASK_H
+#define MT_BIDIR_CLIENT_TASK_H
+#include /**/ "ace/pre.h"
+
+#include "ace/Task.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "tao/ORB.h"
+
+
+/// Implement a Task to run the experiments using multiple threads.
+class Client_Task : public ACE_Task_Base
+{
+public:
+ /// Constructor
+ Client_Task (CORBA::ORB_ptr orb,
+ ACE_Thread_Manager *thr_mgr);
+
+ /// Thread entry point
+ int svc (void);
+
+private:
+ /// Reference to the ORB
+ CORBA::ORB_var orb_;
+};
+
+#include /**/ "ace/post.h"
+#endif /* MT_BIDIR_CLIENT_TASK_H */
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/MT_BiDir_SSL.mpc b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/MT_BiDir_SSL.mpc
new file mode 100644
index 00000000000..b9de35dbb68
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/MT_BiDir_SSL.mpc
@@ -0,0 +1,43 @@
+// -*- MPC -*-
+// $Id$
+
+project(*idl): taoidldefaults {
+ IDL_Files {
+ Receiver.idl
+ Sender.idl
+ }
+ custom_only = 1
+}
+
+project(*Server): taoserver, avoids_minimum_corba, bidir_giop, avoids_corba_e_micro {
+ after += *idl
+ Source_Files {
+ Sender_i.cpp
+ Server_Task.cpp
+ server.cpp
+ }
+ Source_Files {
+ ReceiverC.cpp
+ SenderC.cpp
+ SenderS.cpp
+ }
+ IDL_Files {
+ }
+}
+
+project(*Client): taoserver, avoids_minimum_corba, bidir_giop, avoids_corba_e_micro {
+ exename = client
+ after += *idl
+ Source_Files {
+ Client_Task.cpp
+ Receiver_i.cpp
+ client.cpp
+ }
+ Source_Files {
+ ReceiverC.cpp
+ ReceiverS.cpp
+ SenderC.cpp
+ }
+ IDL_Files {
+ }
+}
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/README b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/README
new file mode 100644
index 00000000000..28e9973ebe4
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/README
@@ -0,0 +1,19 @@
+/**
+
+$Id$
+
+@page MT_BiDir_SSL Test README File
+
+ This is a stress test that exercises the birectional GIOP
+connection implementation with multiple threads in TAO using SSLIOP.
+
+To run the test use the run_test.pl script:
+
+$ ./run_test.pl
+
+the script returns 0 if the test was successful.
+
+*/
+
+
+
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Receiver.idl b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Receiver.idl
new file mode 100644
index 00000000000..b8e7383670e
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Receiver.idl
@@ -0,0 +1,11 @@
+//
+// $Id$
+//
+
+interface Receiver
+{
+ typedef sequence<octet> Payload;
+
+ /// A simple remote call
+ void receive_payload (in Receiver::Payload pay);
+};
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Receiver_i.cpp b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Receiver_i.cpp
new file mode 100644
index 00000000000..72b6bf4f7aa
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Receiver_i.cpp
@@ -0,0 +1,26 @@
+//
+// $Id$
+//
+#include "Receiver_i.h"
+
+Receiver_i::Receiver_i (void)
+ : message_count_ (0)
+ , byte_count_ (0)
+{
+}
+
+
+void
+Receiver_i::receive_payload (const Receiver::Payload &payload)
+{
+ ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_);
+ this->message_count_++;
+ this->byte_count_ += payload.length ();
+}
+
+CORBA::Long
+Receiver_i::get_event_count (void)
+{
+ ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->mutex_, 0);
+ return this->message_count_;
+}
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Receiver_i.h b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Receiver_i.h
new file mode 100644
index 00000000000..398955cca27
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Receiver_i.h
@@ -0,0 +1,35 @@
+//
+// $Id$
+//
+
+#ifndef MT_BIDIR_RECEIVER_I_H
+#define MT_BIDIR_RECEIVER_I_H
+#include /**/ "ace/pre.h"
+
+#include "ReceiverS.h"
+
+/**
+ * Simply print count how many bytes were received.
+ */
+class Receiver_i
+ : public virtual POA_Receiver
+{
+public:
+ /// Constructor
+ Receiver_i (void);
+
+
+ /// Get the number of events that have been received, local method
+ CORBA::Long get_event_count (void);
+
+ // = The skeleton methods
+ virtual void receive_payload (const Receiver::Payload &payload);
+
+private:
+ TAO_SYNCH_MUTEX mutex_;
+ CORBA::ULong message_count_;
+ CORBA::ULong byte_count_;
+};
+
+#include /**/ "ace/post.h"
+#endif /* MUXING_RECEIVER_H */
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Sender.idl b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Sender.idl
new file mode 100644
index 00000000000..9aa036f3327
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Sender.idl
@@ -0,0 +1,14 @@
+//
+// $Id$
+//
+#include "Receiver.idl"
+
+interface Sender
+{
+
+ exception Table_Full {};
+
+ /// Receive the Receiver object and return a id for the object.
+ long receiver_object (in Receiver recv)
+ raises (Table_Full);
+};
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Sender_i.cpp b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Sender_i.cpp
new file mode 100644
index 00000000000..35f2360528c
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Sender_i.cpp
@@ -0,0 +1,62 @@
+// $Id$
+
+#include "Sender_i.h"
+#include "ace/Manual_Event.h"
+
+Sender_i::Sender_i (CORBA::ULong no_clients,
+ ACE_Manual_Event &event)
+ : event_ (event)
+ , receivers_ (0)
+ , no_clients_ (no_clients)
+ , last_index_ (0)
+ , payload_ (32768)
+{
+ ACE_NEW (this->receivers_,
+ Receiver_var [no_clients]);
+
+ // Okay to have a magic number...
+ this->payload_.length (32768);
+
+ for (CORBA::ULong j = 0; j != this->payload_.length (); ++j)
+ this->payload_[j] = (j % 256);
+}
+
+Sender_i::~Sender_i (void)
+{
+ delete []this->receivers_;
+}
+
+CORBA::Long
+Sender_i::receiver_object (Receiver_ptr recv)
+{
+ ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
+ ace_mon,
+ this->mutex_,-1);
+
+ if (this->no_clients_ == this->last_index_)
+ throw Sender::Table_Full ();
+
+ this->receivers_[this->last_index_] =
+ Receiver::_duplicate (recv);
+
+ ++this->last_index_;
+
+ if (this->last_index_ == this->no_clients_)
+ {
+ this->event_.signal ();
+ }
+
+ return this->last_index_;
+}
+
+
+void
+Sender_i::send_message (void)
+{
+ // NOTE:No synchronization with purpose. Synchrnozing this is
+ // going to spoil the whole purpose of this test.
+ CORBA::ULong send_to =
+ static_cast<CORBA::ULong> (ACE_OS::rand () % this->no_clients_);
+
+ this->receivers_[send_to]->receive_payload (this->payload_);
+}
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Sender_i.h b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Sender_i.h
new file mode 100644
index 00000000000..79032e33f6f
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Sender_i.h
@@ -0,0 +1,55 @@
+// -*- C++ -*-
+//
+// $Id$
+
+#ifndef MT_BIDIR_RECEIVER_H
+#define MT_BIDIR_RECEIVER_H
+#include /**/ "ace/pre.h"
+
+#include "SenderS.h"
+
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+class ACE_Manual_Event;
+ACE_END_VERSIONED_NAMESPACE_DECL
+
+/**
+ * Simply print count how many bytes were received.
+ */
+class Sender_i
+ : public virtual POA_Sender
+{
+public:
+ /// Constructor
+ Sender_i (CORBA::ULong no_clients,
+ ACE_Manual_Event &event);
+
+ virtual ~Sender_i (void);
+
+ // = The skeleton methods
+ virtual CORBA::Long receiver_object (Receiver *recv);
+
+ /// Public method defined locally
+ void send_message (void);
+
+private:
+ /// Synchronizing acces to this class
+ TAO_SYNCH_MUTEX mutex_;
+
+ /// An event for waking other threads
+ ACE_Manual_Event &event_;
+
+ /// An array of receiver pointers
+ Receiver_var *receivers_;
+
+ /// Size of the <this->receivers_> array
+ CORBA::ULong no_clients_;
+
+ /// Receiver index
+ CORBA::ULong last_index_;
+
+ /// Payload that is being sent
+ Receiver::Payload payload_;
+};
+
+#include /**/ "ace/post.h"
+#endif /* MUXING_RECEIVER_H */
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Server_Task.cpp b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Server_Task.cpp
new file mode 100644
index 00000000000..d095f295801
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Server_Task.cpp
@@ -0,0 +1,75 @@
+//
+// $Id$
+//
+
+#include "Server_Task.h"
+#include "Sender_i.h"
+#include "tao/ORB_Core.h"
+#include "tao/Thread_Lane_Resources.h"
+#include "tao/Transport_Cache_Manager.h"
+#include "ace/Manual_Event.h"
+
+Server_Task::Server_Task (Sender_i *sender,
+ ACE_Manual_Event &event,
+ int no_iterations,
+ CORBA::ORB_ptr orb,
+ ACE_Thread_Manager *thr_mgr)
+ : ACE_Task_Base (thr_mgr)
+ , sender_ (sender)
+ , event_ (event)
+ , no_iterations_ (no_iterations)
+ , orb_ (CORBA::ORB::_duplicate (orb))
+{
+}
+
+int
+Server_Task::svc (void)
+{
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) Wait for the Event\n"));
+
+ /// Wait on the event
+ /// Yes, wait on event twice. One for making sure that we have got
+ /// all the clients come and register with us.
+ this->event_.wait ();
+
+
+
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) Start doing some work....\n"));
+
+
+ try
+ {
+ // Before start
+ CORBA::ULong connection_no =
+ this->orb_->orb_core ()->lane_resources ().transport_cache ().current_size ();
+
+ for (int i = 0; i != this->no_iterations_; ++i)
+ {
+ if (i%50 == 0)
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) Sending message ....\n"));
+
+ this->sender_->send_message ();
+
+ // Sanity check for connections..
+ if (connection_no <
+ this->orb_->orb_core ()->lane_resources ().transport_cache ().current_size ())
+ {
+ // Get the latest and the greatest..
+ connection_no =
+ this->orb_->orb_core ()->lane_resources ().transport_cache ().current_size ();
+ ACE_ERROR ((LM_DEBUG,
+ "(%P|%t) ERROR: New connections have been created\n"));
+ ACE_ERROR ((LM_DEBUG,
+ "(%P|%t) ERROR: We will crash now...\n"));
+ ACE_OS::abort ();
+ }
+
+ }
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Caught exception in iteration.\n");
+ }
+
+ return 0;
+}
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Server_Task.h b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Server_Task.h
new file mode 100644
index 00000000000..42686741b21
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/Server_Task.h
@@ -0,0 +1,54 @@
+// -*- C++ -*-
+//
+// $Id$
+
+#ifndef MT_BIDIR_SERVER_TASK_H
+#define MT_BIDIR_SERVER_TASK_H
+
+#include /**/ "ace/pre.h"
+
+#include "ace/Task.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "tao/ORB.h"
+
+class Sender_i;
+
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+class ACE_Manual_Event;
+ACE_END_VERSIONED_NAMESPACE_DECL
+
+/// Implement a Task to run the experiments using multiple threads.
+class Server_Task : public ACE_Task_Base
+{
+public:
+ /// Constructor
+ Server_Task (Sender_i *s,
+ ACE_Manual_Event &event,
+ int no_iterations,
+ CORBA::ORB_ptr orb,
+ ACE_Thread_Manager *thr_mgr);
+
+ /// Thread entry point
+ int svc (void);
+
+private:
+ /// The sender object
+ Sender_i *sender_;
+
+ /// The synchronizer
+ ACE_Manual_Event &event_;
+
+ /// Number of messages that needs to be sent
+ int no_iterations_;
+
+ /// The ORB on which we run..
+ CORBA::ORB_var orb_;
+};
+
+#include /**/ "ace/post.h"
+
+#endif /* MT_BIDIR_SERVER_TASK_H */
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/client.conf b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/client.conf
new file mode 100644
index 00000000000..13aca91454e
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/client.conf
@@ -0,0 +1,12 @@
+# $Id$
+
+dynamic SSLIOP_Factory Service_Object *
+ TAO_SSLIOP:_make_TAO_SSLIOP_Protocol_Factory()
+ "-SSLAuthenticate SERVER_AND_CLIENT -SSLPrivateKey 'PEM:ssl/client-key.pem' -SSLCertificate 'PEM:ssl/client-cert.pem' -SSLCAFile 'PEM:ssl/ca.pem'"
+
+dynamic Advanced_Resource_Factory Service_Object*
+ TAO_Strategies:_make_TAO_Advanced_Resource_Factory ()
+ "-ORBProtocolFactory SSLIOP_Factory -ORBMuxedConnectionMax 1"
+
+static Client_Strategy_Factory "-ORBConnectStrategy blocked"
+
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/client.conf.xml b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/client.conf.xml
new file mode 100644
index 00000000000..6e34a5555df
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/client.conf.xml
@@ -0,0 +1,14 @@
+<?xml version='1.0'?>
+<!-- Converted from ./orbsvcs/tests/Security/MT_SSLIOP/client.conf by svcconf-convert.pl -->
+<ACE_Svc_Conf>
+ <!-- -->
+ <!-- $Id$ -->
+ <!-- -->
+ <dynamic id="SSLIOP_Factory" type="Service_Object">
+ <initializer path="TAO_SSLIOP" init="_make_TAO_SSLIOP_Protocol_Factory" params="-SSLAuthenticate SERVER_AND_CLIENT -SSLPrivateKey PEM:ssl/client-key.pem -SSLCertificate PEM:ssl/client-cert.pem -SSLCAFile PEM:ssl/ca.pem"/>
+ </dynamic>
+<dynamic id="Advanced_Resource_Factory" type="Service_Object">
+ <initializer path="TAO_Strategies" init="_make_TAO_Advanced_Resource_Factory" params="-ORBProtocolFactory SSLIOP_Factory -ORBMuxedConnectionMax 1"/>
+ </dynamic>
+ <static id="Resource_Factory" params="-ORBConnectStrategy blocked"/>
+</ACE_Svc_Conf>
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/client.cpp b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/client.cpp
new file mode 100644
index 00000000000..abf16e115a9
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/client.cpp
@@ -0,0 +1,152 @@
+// $Id$
+
+#include "ace/Get_Opt.h"
+#include "Receiver_i.h"
+#include "SenderC.h"
+#include "tao/BiDir_GIOP/BiDirGIOP.h"
+#include "tao/AnyTypeCode/Any.h"
+#include "Client_Task.h"
+
+const ACE_TCHAR *ior = ACE_TEXT("file://test.ior");
+
+int
+parse_args (int argc, ACE_TCHAR *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("k:"));
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'k':
+ ior = get_opts.optarg;
+ break;
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s "
+ "-k <ior> "
+ "\n",
+ argv [0]),
+ -1);
+ }
+ // Indicates successful parsing of the command line
+ return 0;
+}
+
+int
+ACE_TMAIN(int argc, ACE_TCHAR *argv[])
+{
+
+ try
+ {
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv);
+
+ if (parse_args (argc, argv) != 0)
+ return 1;
+
+ CORBA::Object_var poa_object =
+ orb->resolve_initial_references ("RootPOA");
+
+ if (CORBA::is_nil (poa_object.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ " (%P|%t) Unable to initialize the POA.\n"),
+ 1);
+
+ PortableServer::POA_var root_poa =
+ PortableServer::POA::_narrow (poa_object.in ());
+
+ PortableServer::POAManager_var poa_manager =
+ root_poa->the_POAManager ();
+
+ // Policies for the childPOA to be created.
+ CORBA::PolicyList policies (1);
+ policies.length (1);
+
+ CORBA::Any pol;
+ pol <<= BiDirPolicy::BOTH;
+ policies[0] =
+ orb->create_policy (BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE,
+ pol);
+
+ // Create POA as child of RootPOA with the above policies. This POA
+ // will receive request in the same connection in which it sent
+ // the request
+ PortableServer::POA_var child_poa =
+ root_poa->create_POA ("childPOA",
+ poa_manager.in (),
+ policies);
+
+ // Creation of childPOA is over. Destroy the Policy objects.
+ for (CORBA::ULong i = 0;
+ i < policies.length ();
+ ++i)
+ {
+ policies[i]->destroy ();
+ }
+
+ poa_manager->activate ();
+
+ CORBA::Object_var object =
+ orb->string_to_object (ior);
+
+ Sender_var sender =
+ Sender::_narrow (object.in ());
+
+ if (CORBA::is_nil (sender.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Object reference <%s> is nil.\n",
+ ior),
+ 1);
+ }
+
+
+ Receiver_i *receiver;
+ ACE_NEW_RETURN (receiver,
+ Receiver_i (),
+ -1);
+
+ PortableServer::ServantBase_var owner_transfer (receiver);
+
+ PortableServer::ObjectId_var id =
+ root_poa->activate_object (receiver);
+
+ CORBA::Object_var object_act = root_poa->id_to_reference (id.in ());
+
+ Receiver_var receiver_obj =
+ Receiver::_narrow (object_act.in ());
+
+ // Send the calback object to the server
+ sender->receiver_object (receiver_obj.in ());
+
+ // Threads that will handle the call backs
+ Client_Task client_task (orb.in (),
+ ACE_Thread_Manager::instance ());
+
+ if (client_task.activate (THR_NEW_LWP | THR_JOINABLE, 4, 1) == -1)
+ {
+ ACE_ERROR ((LM_ERROR, "Error activating client task\n"));
+ }
+
+ ACE_Thread_Manager::instance ()->wait ();
+
+ CORBA::Long count =
+ receiver->get_event_count ();
+
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) Number of events received.. [%d]\n",
+ count));
+
+ root_poa->destroy (1,
+ 1);
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Caught exception:");
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/run_test.pl b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/run_test.pl
new file mode 100755
index 00000000000..a6125da53b2
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/run_test.pl
@@ -0,0 +1,148 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# $Id$
+# -*- perl -*-
+
+use lib "$ENV{ACE_ROOT}/bin";
+use PerlACE::TestTarget;
+
+$status = 0;
+$debug_level = '0';
+
+foreach $i (@ARGV) {
+ if ($i eq '-debug') {
+ $debug_level = '10';
+ }
+}
+
+my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
+my $client1 = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
+my $client2 = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n";
+my $client3 = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n";
+
+my $iorbase = "server.ior";
+my $server_iorfile = $server->LocalFile ($iorbase);
+my $client1_iorfile = $client1->LocalFile ($iorbase);
+my $client2_iorfile = $client2->LocalFile ($iorbase);
+my $client3_iorfile = $client3->LocalFile ($iorbase);
+$server->DeleteFile($iorbase);
+$client1->DeleteFile($iorbase);
+$client2->DeleteFile($iorbase);
+$client3->DeleteFile($iorbase);
+
+my $server_conf_base = "server$PerlACE::svcconf_ext";
+my $server_conf = $server->LocalFile ($server_conf_base);
+
+my $client_conf_base = "client$PerlACE::svcconf_ext";
+
+# Copy the configuration file to the target.
+if ($server->PutFile ($server_conf_base) == -1) {
+ print STDERR "ERROR: cannot set file <$server_conf>\n";
+ exit 1;
+}
+
+$SV = $server->CreateProcess ("server",
+ "-ORBdebuglevel $debug_level -ORBSvcConf $server_conf " .
+ "-o $server_iorfile -c 3 -i 100");
+$CL1 = $client1->CreateProcess ("client", "-ORBSvcConf $client_conf_base -k file://$client1_iorfile");
+$CL2 = $client2->CreateProcess ("client", "-ORBSvcConf $client_conf_base -k file://$client2_iorfile");
+$CL3 = $client3->CreateProcess ("client", "-ORBSvcConf $client_conf_base -k file://$client3_iorfile");
+
+$server_status = $SV->Spawn ();
+
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
+ exit 1;
+}
+
+if ($server->WaitForFileTimed ($iorbase,
+ $server->ProcessStartWaitInterval()) == -1) {
+ print STDERR "ERROR: cannot find file <$server_iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
+}
+
+if ($server->GetFile ($iorbase) == -1) {
+ print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
+}
+if ($client1->PutFile ($iorbase) == -1) {
+ print STDERR "ERROR: cannot set file <$client1_iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
+}
+if ($client2->PutFile ($iorbase) == -1) {
+ print STDERR "ERROR: cannot set file <$client2_iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
+}
+if ($client3->PutFile ($iorbase) == -1) {
+ print STDERR "ERROR: cannot set file <$client3_iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
+}
+
+$client_status = $CL1->Spawn ();
+
+if ($client_status != 0) {
+ print STDERR "ERROR: client returned $client_status\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
+}
+
+$client_status = $CL2->Spawn ();
+
+if ($client_status != 0) {
+ print STDERR "ERROR: client returned $client_status\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ $CL1->Kill (); $CL1->TimedWait (1);
+ exit 1;
+}
+
+$client_status = $CL3->Spawn ();
+
+if ($client_status != 0) {
+ print STDERR "ERROR: client returned $client_status\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ $CL1->Kill (); $CL1->TimedWait (1);
+ $CL2->Kill (); $CL2->TimedWait (1);
+ exit 1;
+}
+
+$client_status = $CL1->WaitKill ($client1->ProcessStopWaitInterval() + 60);
+
+if ($client_status != 0) {
+ print STDERR "ERROR: client returned $client_status\n";
+ $status = 1;
+}
+
+$client_status = $CL2->WaitKill ($client2->ProcessStopWaitInterval() + 60);
+
+if ($client_status != 0) {
+ print STDERR "ERROR: client returned $client_status\n";
+ $status = 1;
+}
+
+$client_status = $CL3->WaitKill ($client3->ProcessStopWaitInterval() + 60);
+
+if ($client_status != 0) {
+ print STDERR "ERROR: client returned $client_status\n";
+ $status = 1;
+}
+
+$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
+
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
+ $status = 1;
+}
+
+$server->DeleteFile($iorbase);
+$client1->DeleteFile($iorbase);
+$client2->DeleteFile($iorbase);
+$client3->DeleteFile($iorbase);
+
+exit $status;
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/server.conf b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/server.conf
new file mode 100644
index 00000000000..6453d89749c
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/server.conf
@@ -0,0 +1,11 @@
+# $Id$
+#
+dynamic SSLIOP_Factory Service_Object *
+ TAO_SSLIOP:_make_TAO_SSLIOP_Protocol_Factory()
+ "-SSLAuthenticate SERVER_AND_CLIENT -SSLPrivateKey 'PEM:ssl/server-key.pem' -SSLCertificate 'PEM:ssl/server-cert.pem' -SSLCAFile 'PEM:ssl/ca.pem'"
+
+dynamic Advanced_Resource_Factory Service_Object*
+ TAO_Strategies:_make_TAO_Advanced_Resource_Factory ()
+ "-ORBProtocolFactory SSLIOP_Factory -ORBMuxedConnectionMax 1"
+
+static Client_Strategy_Factory "-ORBConnectStrategy blocked"
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/server.conf.xml b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/server.conf.xml
new file mode 100644
index 00000000000..bc593d14981
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/server.conf.xml
@@ -0,0 +1,13 @@
+<?xml version='1.0'?>
+<!-- Converted from ./tests/MT_BiDir/server.conf by svcconf-convert.pl -->
+<ACE_Svc_Conf>
+ <!-- $Id$ -->
+ <!-- -->
+<dynamic id="SSLIOP_Factory" type="Service_Object">
+ <initializer path="TAO_SSLIOP" init="_make_TAO_SSLIOP_Protocol_Factory" params="-SSLAuthenticate SERVER_AND_CLIENT -SSLPrivateKey PEM:ssl/server-key.pem -SSLCertificate PEM:ssl/server-cert.pem -SSLCAFile PEM:ssl/ca.pem"/>
+ </dynamic>
+<dynamic id="Advanced_Resource_Factory" type="Service_Object">
+ <initializer path="TAO_Strategies" init="_make_TAO_Advanced_Resource_Factory" params="-ORBProtocolFactory SSLIOP_Factory -ORBMuxedConnectionMax 1"/>
+ </dynamic>
+ <static id="Resource_Factory" params="-ORBConnectStrategy blocked"/>
+</ACE_Svc_Conf>
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/server.cpp b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/server.cpp
new file mode 100644
index 00000000000..043ed95d566
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/server.cpp
@@ -0,0 +1,178 @@
+// $Id$
+
+#include "ace/Get_Opt.h"
+#include "Sender_i.h"
+#include "tao/BiDir_GIOP/BiDirGIOP.h"
+#include "tao/AnyTypeCode/Any.h"
+#include "Server_Task.h"
+#include "tao/ORB_Core.h"
+#include "tao/Thread_Lane_Resources.h"
+#include "tao/Transport_Cache_Manager.h"
+#include "ace/Manual_Event.h"
+
+const ACE_TCHAR *ior_output_file = 0;
+static int no_iterations = 10;
+static int no_clients = 2;
+
+int
+parse_args (int argc, ACE_TCHAR *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("o:i:c:"));
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'o':
+ ior_output_file = get_opts.optarg;
+ break;
+ case 'c':
+ no_clients = ACE_OS::atoi (get_opts.optarg);
+ break;
+ case 'i':
+ no_iterations = ACE_OS::atoi (get_opts.optarg);
+ break;
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s "
+ "-o <iorfile>"
+ "-c <no_clients>"
+ "-i <no_iterations>"
+ "\n",
+ argv [0]),
+ -1);
+ }
+ // Indicates successful parsing of the command line
+ return 0;
+}
+
+
+int
+ACE_TMAIN(int argc, ACE_TCHAR *argv[])
+{
+ try
+ {
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv);
+
+ if (parse_args (argc, argv) != 0)
+ return 1;
+
+ CORBA::Object_var poa_object =
+ orb->resolve_initial_references ("RootPOA");
+
+ if (CORBA::is_nil (poa_object.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ " (%P|%t) Unable to initialize the POA.\n"),
+ 1);
+
+ PortableServer::POA_var root_poa =
+ PortableServer::POA::_narrow (poa_object.in ());
+
+ PortableServer::POAManager_var poa_manager =
+ root_poa->the_POAManager ();
+
+ // Policies for the childPOA to be created.
+ CORBA::PolicyList policies (1);
+ policies.length (1);
+
+ CORBA::Any pol;
+ pol <<= BiDirPolicy::BOTH;
+ policies[0] =
+ orb->create_policy (BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE,
+ pol);
+
+ // Create POA as child of RootPOA with the above policies. This POA
+ // will receive request in the same connection in which it sent
+ // the request
+ PortableServer::POA_var child_poa =
+ root_poa->create_POA ("childPOA",
+ poa_manager.in (),
+ policies);
+
+ // Creation of childPOA is over. Destroy the Policy objects.
+ for (CORBA::ULong i = 0;
+ i < policies.length ();
+ ++i)
+ {
+ policies[i]->destroy ();
+ }
+
+ poa_manager->activate ();
+
+ ACE_Manual_Event manual_event;
+
+ Sender_i *sender = 0;
+ ACE_NEW_RETURN (sender,
+ Sender_i (no_clients,
+ manual_event),
+ -1);
+
+ PortableServer::ServantBase_var owner_transfer (sender);
+
+ PortableServer::ObjectId_var id =
+ child_poa->activate_object (sender);
+
+ CORBA::Object_var obj =
+ child_poa->id_to_reference (id.in ());
+
+ CORBA::String_var ior =
+ orb->object_to_string (obj.in ());
+
+ ACE_DEBUG ((LM_DEBUG, "Activated as <%C>\n", ior.in ()));
+
+ // If the ior_output_file exists, output the ior to it
+ if (ior_output_file != 0)
+ {
+ FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ if (output_file == 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot open output file for writing IOR: %s",
+ ior_output_file),
+ 1);
+ ACE_OS::fprintf (output_file, "%s", ior.in ());
+ ACE_OS::fclose (output_file);
+ }
+
+
+ // Get the main thread id..
+ ACE_thread_t thr_id = ACE_Thread::self ();
+
+ Server_Task server_task (sender,
+ manual_event,
+ no_iterations,
+ orb.in (),
+ ACE_Thread_Manager::instance ());
+
+
+ if (server_task.activate (THR_NEW_LWP | THR_JOINABLE, 4, 1) == -1)
+ {
+ ACE_ERROR ((LM_ERROR, "Error activating server task\n"));
+ }
+
+ // Only the main thread gets to run the ORB
+ if (thr_id == ACE_Thread::self ())
+ {
+ // run the ORB for at most 60 seconds...
+ ACE_Time_Value tv (60, 0);
+
+ // Call the ORB run from the main thread
+ orb->run (tv);
+
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) event loop finished\n"));
+ }
+
+ ACE_Thread_Manager::instance ()->wait ();
+
+ root_poa->destroy (1,
+ 1);
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Caught exception:");
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/ca.pem b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/ca.pem
new file mode 100644
index 00000000000..f580b756820
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/ca.pem
@@ -0,0 +1,34 @@
+-----BEGIN CERTIFICATE-----
+MIICyDCCAjGgAwIBAgIJAJLBvLx9WUXKMA0GCSqGSIb3DQEBBQUAME0xCzAJBgNV
+BAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3QuIExvdWlzMQwwCgYDVQQK
+EwNPQ0kxDzANBgNVBAMTBnNlcnZlcjAeFw0xMTA4MjIxNTMyMjNaFw0xMjA4MjEx
+NTMyMjNaME0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3Qu
+IExvdWlzMQwwCgYDVQQK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iG
+9w0BAQEFAAOBjQAwgYkCgYEA2qjlVQ1oFxHyEc6FueJf1ZgpU5TFCzW47eNTDWSg
+mZELK72neyZ9rtBHqUGmOYU4pNMDz9vqc3gZ29c0wesNgKRM9Xsc/9CXLZK3eSYY
+qiqxjrwG/2EnAXprskgK2Mrt26HdfKUBq7wdQwmLrleNtUoeKHyQyfe+eL/BTMSP
+GMMCAwEAAaOBrzCBrDAdBgNVHQ4EFgQUnO1q8yoFZPjmMm0Wu3TJT0gOFuIwfQYD
+VR0jBHYwdIAUnO1q8yoFZPjmMm0Wu3TJT0gOFuKhUaRPME0xCzAJBgNVBAYTAlVT
+MQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3QuIExvdWlzMQwwCgYDVQQKEwNPQ0kx
+DzANBgNVBAMTBmNsaWVudIIJAJfoN7qD0W7YMAwGA1UdEwQFMAMBAf8wDQYJKoZI
+hvcNAQEFBQADgYEArzMbOXyqBde8fjozyOOWEQcP+MppUbOVAXfdntbDwVYEld7S
+PofHVJ9jMNFN3HR5B7/5+NcwQRX6qivudMA5CXGyBTkH8Eeuth9E76tb6QJv8nTX
+bnIkk87foDoTxjHNkeBsNV89k2lMF721084yaISR4JJAJ5tRU0xXOzNkkpw=
+-----END CERTIFICATE-----
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/client-cert.pem b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/client-cert.pem
new file mode 100644
index 00000000000..cc35017c829
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/client-cert.pem
@@ -0,0 +1,17 @@
+-----BEGIN CERTIFICATE-----
+MIICyDCCAjGgAwIBAgIJAJfoN7qD0W7YMA0GCSqGSIb3DQEBBQUAME0xCzAJBgNV
+BAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3QuIExvdWlzMQwwCgYDVQQK
+EwNPQ0kxDzANBgNVBAMTBmNsaWVudDAeFw0xMTA4MjIxNTMyMjRaFw0xMjA4MjEx
+NTMyMjRaME0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3Qu
+IExvdWlzMQwwCgYDVQQKEwNPQ0kxDzANBgNVBAMTBmNsaWVudDCBnzANBgkqhkiG
+9w0BAQEFAAOBjQAwgYkCgYEA2qjlVQ1oFxHyEc6FueJf1ZgpU5TFCzW47eNTDWSg
+mZELK72neyZ9rtBHqUGmOYU4pNMDz9vqc3gZ29c0wesNgKRM9Xsc/9CXLZK3eSYY
+qiqxjrwG/2EnAXprskgK2Mrt26HdfKUBq7wdQwmLrleNtUoeKHyQyfe+eL/BTMSP
+GMMCAwEAAaOBrzCBrDAdBgNVHQ4EFgQUnO1q8yoFZPjmMm0Wu3TJT0gOFuIwfQYD
+VR0jBHYwdIAUnO1q8yoFZPjmMm0Wu3TJT0gOFuKhUaRPME0xCzAJBgNVBAYTAlVT
+MQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3QuIExvdWlzMQwwCgYDVQQKEwNPQ0kx
+DzANBgNVBAMTBmNsaWVudIIJAJfoN7qD0W7YMAwGA1UdEwQFMAMBAf8wDQYJKoZI
+hvcNAQEFBQADgYEArzMbOXyqBde8fjozyOOWEQcP+MppUbOVAXfdntbDwVYEld7S
+PofHVJ9jMNFN3HR5B7/5+NcwQRX6qivudMA5CXGyBTkH8Eeuth9E76tb6QJv8nTX
+bnIkk87foDoTxjHNkeBsNV89k2lMF721084yaISR4JJAJ5tRU0xXOzNkkpw=
+-----END CERTIFICATE-----
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/client-key.pem b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/client-key.pem
new file mode 100644
index 00000000000..adfbf067d3d
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/client-key.pem
@@ -0,0 +1,32 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXgIBAAKBgQDaqOVVDWgXEfIRz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TMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3Qu
+IExvdWlzMQwwCgYDVQQKEwNPQ0kxDzANBgNVBAMTBmNsaWVudDCBnzANBgkqhkiG
+9w0BAQEFAAOBjQAwgYkCgYEA2qjlVQ1oFxHyEc6FueJf1ZgpU5TFCzW47eNTDWSg
+mZELK72neyZ9rtBHqUGmOYU4pNMDz9vqc3gZ29c0wesNgKRM9Xsc/9CXLZK3eSYY
+qiqxjrwG/2EnAXprskgK2Mrt26HdfKUBq7wdQwmLrleNtUoeKHyQyfe+eL/BTMSP
+GMMCAwEAAaOBrzCBrDAdBgNVHQ4EFgQUnO1q8yoFZPjmMm0Wu3TJT0gOFuIwfQYD
+VR0jBHYwdIAUnO1q8yoFZPjmMm0Wu3TJT0gOFuKhUaRPME0xCzAJBgNVBAYTAlVT
+MQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3QuIExvdWlzMQwwCgYDVQQKEwNPQ0kx
+DzANBgNVBAMTBmNsaWVudIIJAJfoN7qD0W7YMAwGA1UdEwQFMAMBAf8wDQYJKoZI
+hvcNAQEFBQADgYEArzMbOXyqBde8fjozyOOWEQcP+MppUbOVAXfdntbDwVYEld7S
+PofHVJ9jMNFN3HR5B7/5+NcwQRX6qivudMA5CXGyBTkH8Eeuth9E76tb6QJv8nTX
+bnIkk87foDoTxjHNkeBsNV89k2lMF721084yaISR4JJAJ5tRU0xXOzNkkpw=
+-----END CERTIFICATE-----
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/make-client-keys b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/make-client-keys
new file mode 100755
index 00000000000..6ba5894dde9
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/make-client-keys
@@ -0,0 +1,16 @@
+#!/bin/bash -x
+
+openssl req -new -x509 -days 365 -nodes -newkey rsa:1024 \
+ -out server-cert.pem -keyout server-key.pem \
+ -subj "/C=US/ST=MO/L=St. Louis/O=OCI/CN=server"
+
+cat server-cert.pem >>server-key.pem
+cat server-cert.pem >ca.pem
+
+openssl req -new -x509 -days 365 -nodes -newkey rsa:1024 \
+ -out client-cert.pem -keyout client-key.pem \
+ -subj "/C=US/ST=MO/L=St. Louis/O=OCI/CN=client"
+
+cat client-cert.pem >>client-key.pem
+cat client-cert.pem >>ca.pem
+
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/server-cert.pem b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/server-cert.pem
new file mode 100644
index 00000000000..5438e2a4dda
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/server-cert.pem
@@ -0,0 +1,17 @@
+-----BEGIN CERTIFICATE-----
+MIICyDCCAjGgAwIBAgIJAJLBvLx9WUXKMA0GCSqGSIb3DQEBBQUAME0xCzAJBgNV
+BAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3QuIExvdWlzMQwwCgYDVQQK
+EwNPQ0kxDzANBgNVBAMTBnNlcnZlcjAeFw0xMTA4MjIxNTMyMjNaFw0xMjA4MjEx
+NTMyMjNaME0xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3Qu
+IExvdWlzMQwwCgYDVQQKEwNPQ0kxDzANBgNVBAMTBnNlcnZlcjCBnzANBgkqhkiG
+9w0BAQEFAAOBjQAwgYkCgYEAzqVyUomhG3Zjvn6up7p2QCtjVOWMzeVr1aWYu2Ce
+W+ts/bwhmLVnp2qiANYQbQF47sHkxtL3KYa3aQy2JFwmJqPa4k478mg/316Fy9Yc
+MxL7l9rDC3GLdSyq4M6xqtYz12RepUydFwGfphvpL7augq/iKOjYsotezpUH87Ok
+vtkCAwEAAaOBrzCBrDAdBgNVHQ4EFgQUE+ZKmmcNsspWePyp/z0dRJor4IowfQYD
+VR0jBHYwdIAUE+ZKmmcNsspWePyp/z0dRJor4IqhUaRPME0xCzAJBgNVBAYTAlVT
+MQswCQYDVQQIEwJNTzESMBAGA1UEBxMJU3QuIExvdWlzMQwwCgYDVQQKEwNPQ0kx
+DzANBgNVBAMTBnNlcnZlcoIJAJLBvLx9WUXKMAwGA1UdEwQFMAMBAf8wDQYJKoZI
+hvcNAQEFBQADgYEALoJCh6ZO52X3BfO/WbuBmvLbjwoX5LQdR+P/Ckz5ZKNdVTSI
+SkDDS+DUB77DMstAq65kcfq+gFwedb2k82Uk1TkenQ0BX3dBkAO2w5M2ipqHN2ez
+3kQ//pzWh/+k8QNgbQSwxKA2UwkbXBhDc2KbT+klhqCGA2hl0KySImgX5Jk=
+-----END CERTIFICATE-----
diff --git a/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/server-key.pem b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/server-key.pem
new file mode 100644
index 00000000000..673dcab56db
--- /dev/null
+++ b/TAO/orbsvcs/tests/Security/MT_BiDir_SSL/ssl/server-key.pem
@@ -0,0 +1,32 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQDOpXJSiaEbdmO+fq6nunZAK2NU5YzN5WvVpZi7YJ5b62z9vCGY
+tWenaqIA1hBtAXjuweTG0vcphrdpDLYkXCYmo9riTjvyaD/fXoXL1hwzEvuX2sML
+cYt1LKrgzrGq1jPXZF6lTJ0XAZ+mG+kvtq6Cr+Io6Niyi17OlQfzs6S+2QIDAQAB
+AoGBAM3ZOZzGxNoagRnOECW9NPaPQg/b6vtfwp+8qfxeLuHaD2Ri+ASrEGpRarfy
+hcJQaStNspvso5GWRTY8F2T49nZVDa2gKstfKAVFVUXkIcDUxbBeDgE294+5bhvQ
+8wzzCaHo8N//csfK40wjZkXjKu9tMN1YO0bPnUg+jAUh5kjRAkEA6e1kzuI/TXYT
+FOJEYXe6iMxkd7tnFJH9C6OP+oLQ5EEU/fzs2Denr2N4qGP/6t70K2Dox9tlChEg
+rtfE/974dwJBAOIlEYc5B2fSPCpqP9i/Xg2WB3gN91GpjsZUM0Q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