summaryrefslogtreecommitdiff
path: root/cpp/src/IceSSL/Instance.cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2008-02-14 16:22:39 +0800
committerMatthew Newhook <matthew@zeroc.com>2008-02-14 16:22:39 +0800
commit294ec25fda6e3785c54970d274b860b1ca837955 (patch)
tree26e5d1987ffdfde7bbacb87fdfb7b96bbef998e9 /cpp/src/IceSSL/Instance.cpp
parentMerge branch 'bug2435' (diff)
downloadice-294ec25fda6e3785c54970d274b860b1ca837955.tar.bz2
ice-294ec25fda6e3785c54970d274b860b1ca837955.tar.xz
ice-294ec25fda6e3785c54970d274b860b1ca837955.zip
merged bug2615
Diffstat (limited to 'cpp/src/IceSSL/Instance.cpp')
-rw-r--r--cpp/src/IceSSL/Instance.cpp26
1 files changed, 4 insertions, 22 deletions
diff --git a/cpp/src/IceSSL/Instance.cpp b/cpp/src/IceSSL/Instance.cpp
index 50ae4a9f516..b0109240528 100644
--- a/cpp/src/IceSSL/Instance.cpp
+++ b/cpp/src/IceSSL/Instance.cpp
@@ -146,7 +146,7 @@ IceSSL::Instance::initialize()
// Select protocols.
//
{
- string protocols = properties->getProperty(propPrefix + "Protocols");
+ StringSeq protocols = properties->getPropertyAsList(propPrefix + "Protocols");
if(!protocols.empty())
{
parseProtocols(protocols);
@@ -841,30 +841,12 @@ IceSSL::Instance::traceConnection(SSL* ssl, bool incoming)
}
void
-IceSSL::Instance::parseProtocols(const string& val)
+IceSSL::Instance::parseProtocols(const StringSeq& protocols)
{
- const string delim = ", ";
bool sslv3 = false, tlsv1 = false;
- string::size_type pos = 0;
- while(pos != string::npos)
+ for(Ice::StringSeq::const_iterator p = protocols.begin(); p != protocols.end(); ++p)
{
- pos = val.find_first_not_of(delim, pos);
- if(pos == string::npos)
- {
- break;
- }
-
- string prot;
- string::size_type end = val.find_first_of(delim, pos);
- if(end == string::npos)
- {
- prot = val.substr(pos);
- }
- else
- {
- prot = val.substr(pos, end - pos);
- }
- pos = end;
+ string prot = *p;
if(prot == "ssl3" || prot == "sslv3")
{