summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2002-11-13 22:19:12 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2002-11-13 22:19:12 +0000
commit97ced6db620820c3282b2ad4dc63052d8feec6a2 (patch)
tree6ec3d0090562c450d8c92403336e360680973a16 /TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp
parent7460e356862af8b3dbafe9c01287767ba4c26e14 (diff)
downloadATCD-97ced6db620820c3282b2ad4dc63052d8feec6a2.tar.gz
ChangeLogTag:Wed Nov 13 14:15:33 2002 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp')
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp34
1 files changed, 30 insertions, 4 deletions
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp
index 76870c5a576..6378d722502 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp
@@ -18,11 +18,16 @@ ACE_RCSID (TAO_SSLIOP,
static const char prefix_[] = "iiop";
+static const long TAO_SSLIOP_ACCEPT_TIMEOUT = 10; // Default accept
+ // timeout in
+ // seconds.
+
TAO_SSLIOP_Protocol_Factory::TAO_SSLIOP_Protocol_Factory (void)
: TAO_Protocol_Factory (IOP::TAG_INTERNET_IOP),
major_ (TAO_DEF_GIOP_MAJOR),
minor_ (TAO_DEF_GIOP_MINOR),
- qop_ (Security::SecQOPIntegrityAndConfidentiality)
+ qop_ (Security::SecQOPIntegrityAndConfidentiality),
+ timeout_ (TAO_SSLIOP_ACCEPT_TIMEOUT)
{
}
@@ -55,7 +60,8 @@ TAO_SSLIOP_Protocol_Factory::make_acceptor (void)
TAO_Acceptor *acceptor = 0;
ACE_NEW_RETURN (acceptor,
- TAO_SSLIOP_Acceptor (this->qop_),
+ TAO_SSLIOP_Acceptor (this->qop_,
+ this->timeout_),
0);
return acceptor;
@@ -199,6 +205,26 @@ TAO_SSLIOP_Protocol_Factory::init (int argc,
}
else if (ACE_OS::strcasecmp (argv[curarg],
+ "-SSLAcceptTimeout") == 0)
+ {
+ curarg++;
+ if (curarg < argc)
+ {
+ float timeout = 0;
+
+ if (sscanf (argv[curarg], "%f", &timeout) != 1
+ || timeout < 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "ERROR: Invalid -SSLAcceptTimeout "
+ "value: %s.\n",
+ argv[curarg]),
+ -1);
+ else
+ this->timeout_.set (timeout);
+ }
+ }
+
+ else if (ACE_OS::strcasecmp (argv[curarg],
"-SSLDHparams") == 0)
{
curarg++;
@@ -249,7 +275,7 @@ TAO_SSLIOP_Protocol_Factory::init (int argc,
ACE_DEBUG ((LM_ERROR,
ACE_TEXT ("(%P|%t) SSLIOP_Factory: ")
ACE_TEXT ("unable to set ")
- ACE_TEXT ("DH parameters <%s>"),
+ ACE_TEXT ("DH parameters <%s>\n"),
dhparams_path));
return -1;
}
@@ -260,7 +286,7 @@ TAO_SSLIOP_Protocol_Factory::init (int argc,
ACE_TEXT ("(%P|%t) SSLIOP_Factory: ")
ACE_TEXT ("No DH parameters found in ")
ACE_TEXT ("certificate <%s>; either none ")
- ACE_TEXT ("are needed (RSA) or \"badness\"")
+ ACE_TEXT ("are needed (RSA) or problems ")
ACE_TEXT ("will ensue later.\n"),
dhparams_path));
}