summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2008-01-15 19:06:41 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2008-01-15 19:06:41 +0000
commit50d531d10e4aa6634c018fe67c789f591f65480b (patch)
treedd9fffc9cfa5b72435b4f4c3ef20210c24588646
parent0668ea08d5f8ad1975c5f22978f79e4eefba3e97 (diff)
downloadATCD-50d531d10e4aa6634c018fe67c789f591f65480b.tar.gz
Tue Jan 15 19:05:12 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--TAO/ChangeLog25
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp2
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp4
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current_Impl.cpp4
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp8
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Invocation_Interceptor.cpp11
-rw-r--r--TAO/orbsvcs/tests/Security/Big_Request/TX_Object.idl3
-rw-r--r--TAO/orbsvcs/tests/Security/Big_Request/TX_Object_i.cpp3
-rw-r--r--TAO/orbsvcs/tests/Security/Big_Request/client.cpp71
9 files changed, 86 insertions, 45 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 1d6dff5626a..b8511eed88e 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,28 @@
+Tue Jan 15 19:05:12 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp:
+ * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current_Impl.cpp:
+ Const changes
+
+ * orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp:
+ Initialise some pointers with 0
+
+ * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp:
+ Const changes and use ACE_ERROR
+
+ * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Invocation_Interceptor.cpp:
+ Layout changes
+
+ * orbsvcs/tests/Security/Big_Request/client.cpp:
+ Extended this client to be able to specify the number of
+ iterations and the size of the data send
+
+ * orbsvcs/tests/Security/Big_Request/TX_Object.idl:
+ Use CORBA::OctetSeq
+
+ * orbsvcs/tests/Security/Big_Request/TX_Object_i.cpp:
+ Layout changes
+
Tue Jan 15 18:33:20 UTC 2008 Ciju John <johnc at ociweb dot com>
* tests/Bug_3193_Regression:
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp
index 374e03542f0..cf5896260cf 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp
@@ -282,7 +282,7 @@ TAO::SSLIOP::Connection_Handler::handle_timeout (const ACE_Time_Value &,
// We don't use this upcall for I/O. This is only used by the
// Connector to indicate that the connection timedout. Therefore,
// we should call close().
- int ret = this->close ();
+ int const ret = this->close ();
this->reset_state (TAO_LF_Event::LFS_TIMEOUT);
return ret;
}
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp
index 8f80d4dfd5f..321c571255d 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp
@@ -135,7 +135,7 @@ TAO::SSLIOP::CredentialsAcquirer::get_credentials (CORBA::Boolean on_list)
{
this->check_validity ();
- ::SSLIOP::AuthData *data;
+ ::SSLIOP::AuthData *data = 0;
if (!(this->acquisition_arguments_ >>= data))
throw CORBA::BAD_PARAM ();
@@ -161,7 +161,7 @@ TAO::SSLIOP::CredentialsAcquirer::get_credentials (CORBA::Boolean on_list)
throw CORBA::BAD_PARAM ();
}
- TAO::SSLIOP::OwnCredentials * creds;
+ TAO::SSLIOP::OwnCredentials * creds = 0;
ACE_NEW_THROW_EX (creds,
TAO::SSLIOP::OwnCredentials (x509.in (), evp.in ()),
CORBA::NO_MEMORY ());
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current_Impl.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current_Impl.cpp
index 6712f7ac78b..e625059d78c 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current_Impl.cpp
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current_Impl.cpp
@@ -88,7 +88,7 @@ TAO::SSLIOP::Current_Impl::get_peer_certificate_chain (
if (certs == 0)
return;
- const int chain_length = sk_X509_num (certs);
+ int const chain_length = sk_X509_num (certs);
cert_chain->length (chain_length);
// Copy the peer certificate chain to the SSLIOP::SSL_Cert
@@ -99,7 +99,7 @@ TAO::SSLIOP::Current_Impl::get_peer_certificate_chain (
::X509 *x = sk_X509_value (certs, i);
// Get the size of the ASN.1 encoding.
- const int cert_length = ::i2d_X509 (x, 0);
+ int const cert_length = ::i2d_X509 (x, 0);
if (cert_length <= 0)
continue; // @@ What do we do if there is an error?
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp
index db6fa0500aa..46c017fdd67 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp
@@ -96,8 +96,7 @@ TAO::SSLIOP::Protocol_Factory::make_acceptor (void)
// Parses a X509 path. Beware: This function modifies
// the buffer pointed to by arg!
int
-TAO::SSLIOP::Protocol_Factory::parse_x509_file (char *arg,
- char **path)
+TAO::SSLIOP::Protocol_Factory::parse_x509_file (char *arg, char **path)
{
ACE_ASSERT (arg != 0);
ACE_ASSERT (path != 0);
@@ -117,8 +116,7 @@ TAO::SSLIOP::Protocol_Factory::parse_x509_file (char *arg,
int
-TAO::SSLIOP::Protocol_Factory::init (int argc,
- char* argv[])
+TAO::SSLIOP::Protocol_Factory::init (int argc, char* argv[])
{
char *certificate_path = 0;
char *private_key_path = 0;
@@ -161,7 +159,7 @@ TAO::SSLIOP::Protocol_Factory::init (int argc,
session_id_len))
{
if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_ERROR,
+ ACE_ERROR ((LM_ERROR,
ACE_TEXT ("TAO (%P|%t) Unable to set the session id ")
ACE_TEXT ("context to \'%s\'\n"), session_id_context_));
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Invocation_Interceptor.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Invocation_Interceptor.cpp
index ddcf5182e5e..558678817af 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Invocation_Interceptor.cpp
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Invocation_Interceptor.cpp
@@ -150,7 +150,6 @@ TAO::SSLIOP::Server_Invocation_Interceptor::receive_request (
CORBA::ORBid_var orb_id = ri->orb_id ();
CORBA::OctetSeq_var adapter_id = ri->adapter_id ();
CORBA::OctetSeq_var object_id = ri->object_id ();
-
CORBA::String_var operation_name = ri->operation ();
CORBA::Boolean it_should_happen = false;
@@ -160,12 +159,14 @@ TAO::SSLIOP::Server_Invocation_Interceptor::receive_request (
cred_list,
operation_name.in());
if (TAO_debug_level >= 3)
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) SL2::access_allowed_ex returned %s\n",
- it_should_happen ? "true" : "false"));
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) SL2::access_allowed_ex returned %s\n",
+ it_should_happen ? "true" : "false"));
+ }
if (! it_should_happen)
- throw CORBA::NO_PERMISSION ();
+ throw CORBA::NO_PERMISSION ();
}
}
diff --git a/TAO/orbsvcs/tests/Security/Big_Request/TX_Object.idl b/TAO/orbsvcs/tests/Security/Big_Request/TX_Object.idl
index 5a1b4019323..d9c7441a64a 100644
--- a/TAO/orbsvcs/tests/Security/Big_Request/TX_Object.idl
+++ b/TAO/orbsvcs/tests/Security/Big_Request/TX_Object.idl
@@ -13,8 +13,9 @@
*/
//=============================================================================
+#include <OctetSeq.pidl>
-typedef sequence<octet> DataSeq;
+typedef CORBA::OctetSeq DataSeq;
interface TX_Object
{
diff --git a/TAO/orbsvcs/tests/Security/Big_Request/TX_Object_i.cpp b/TAO/orbsvcs/tests/Security/Big_Request/TX_Object_i.cpp
index d0500b4c774..4cea1fa04b9 100644
--- a/TAO/orbsvcs/tests/Security/Big_Request/TX_Object_i.cpp
+++ b/TAO/orbsvcs/tests/Security/Big_Request/TX_Object_i.cpp
@@ -2,7 +2,6 @@
#include "TX_Object_i.h"
-
ACE_RCSID (Big_Request,
TX_Object_i,
"$Id$")
@@ -38,7 +37,7 @@ TX_Object_i::recv (DataSeq_out data)
(*data) = this->data_;
ACE_DEBUG ((LM_DEBUG,
- "Sending octet sequence of length:\t%u\n",
+ "Sending octet sequence of length:\t%u\n",
data->length ()));
}
diff --git a/TAO/orbsvcs/tests/Security/Big_Request/client.cpp b/TAO/orbsvcs/tests/Security/Big_Request/client.cpp
index 2385f7bf3db..b280f093a6c 100644
--- a/TAO/orbsvcs/tests/Security/Big_Request/client.cpp
+++ b/TAO/orbsvcs/tests/Security/Big_Request/client.cpp
@@ -10,11 +10,13 @@ ACE_RCSID (Big_Request,
const char *ior = "file://test.ior";
const char *cert_file = "cacert.pem";
+long number_iterations = 1;
+long data_size = 3461724;
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "k:");
+ ACE_Get_Opt get_opts (argc, argv, "k:i:d:");
int c;
while ((c = get_opts ()) != -1)
@@ -23,11 +25,19 @@ parse_args (int argc, char *argv[])
case 'k':
ior = get_opts.opt_arg ();
break;
+ case 'i':
+ number_iterations = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
+ case 'd':
+ data_size = ACE_OS::atoi (get_opts.opt_arg ());
+ break;
case '?':
default:
ACE_ERROR_RETURN ((LM_ERROR,
"Usage: %s "
"-k <ior> "
+ "-i <iterations> "
+ "-d <datasize> "
"\n",
argv [0]),
-1);
@@ -64,39 +74,46 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
DataSeq data_input;
- const CORBA::ULong len = 3461724;
+ CORBA::ULong const len = data_size;
data_input.length (len);
// Fill in some useless data.
for (CORBA::ULong i = 0; i < len; ++i)
- data_input[i] = i % 9;
-
- ACE_DEBUG ((LM_DEBUG,
- "Sending octet sequence of length:\t%u\n",
- data_input.length ()));
-
- txObject->send (data_input);
-
- DataSeq_var data_output;
-
- txObject->recv (data_output.out ());
-
- ACE_DEBUG ((LM_DEBUG,
- "Received octet sequence of length:\t%u\n",
- data_output->length ()));
+ {
+ data_input[i] = i % 9;
+ }
+
+ for (int iteration = 0; iteration < number_iterations; ++iteration)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Sending octet sequence of length:\t%u\n",
+ data_input.length ()));
+
+ txObject->send (data_input);
+
+ DataSeq_var data_output;
+
+ txObject->recv (data_output.out ());
+
+ ACE_DEBUG ((LM_DEBUG,
+ "Received octet sequence of length:\t%u\n",
+ data_output->length ()));
+
+ // Sanity check
+ if (data_output->length () != len
+ || ACE_OS::memcmp (data_input.get_buffer (),
+ data_output->get_buffer (),
+ len) != 0)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "ERROR: Received octet sequence does not match "
+ "the one that was sent.\n"),
+ -1);
+ }
+ }
txObject->shutdown ();
-
- // Sanity check
- if (data_output->length () != len
- || ACE_OS::memcmp (data_input.get_buffer (),
- data_output->get_buffer (),
- len) != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "ERROR: Received octet sequence does not match "
- "the one that was sent.\n"),
- -1);
}
catch (const CORBA::Exception& ex)
{