diff options
author | Anthony Neal <aneal@zeroc.com> | 2001-11-17 20:06:01 +0000 |
---|---|---|
committer | Anthony Neal <aneal@zeroc.com> | 2001-11-17 20:06:01 +0000 |
commit | 3bfcb9e80be20d74a6f1e2a104dbb7892949b212 (patch) | |
tree | 1436c83a5bdf16c54051e2fc0601e94eb6a59441 /cpp/src/Ice/ObjectAdapterI.cpp | |
parent | fixes (diff) | |
download | ice-3bfcb9e80be20d74a6f1e2a104dbb7892949b212.tar.bz2 ice-3bfcb9e80be20d74a6f1e2a104dbb7892949b212.tar.xz ice-3bfcb9e80be20d74a6f1e2a104dbb7892949b212.zip |
SSL Update:
Security Excpetions re-done, expressed in Slice.
Trace has been cut down to a more reasonable level.
Cleaned up macros.
Diffstat (limited to 'cpp/src/Ice/ObjectAdapterI.cpp')
-rw-r--r-- | cpp/src/Ice/ObjectAdapterI.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp index 86dbf9bfea4..a6ebb4a2ffd 100644 --- a/cpp/src/Ice/ObjectAdapterI.cpp +++ b/cpp/src/Ice/ObjectAdapterI.cpp @@ -361,8 +361,17 @@ Ice::ObjectAdapterI::newProxy(const string& ident) transform(_collectorFactories.begin(), _collectorFactories.end(), back_inserter(endpoints), Ice::constMemFun(&CollectorFactory::endpoint)); - ReferencePtr reference = new Reference(_instance, ident, "", Reference::ModeTwoway, false, endpoints, endpoints); - return _instance->proxyFactory()->referenceToProxy(reference); + // TODO: This is a bandaid, and should be replaced by a better approach.
+ bool makeSecure = false;
+ size_t numSecureEndpoints = count_if(endpoints.begin(), endpoints.end(), Ice::constMemFun(&Endpoint::secure));
+
+ if (numSecureEndpoints >= endpoints.size())
+ {
+ makeSecure = true;
+ }
+
+ ReferencePtr reference = new Reference(_instance, ident, "", Reference::ModeTwoway, makeSecure /* false */, endpoints, endpoints);
+ return _instance->proxyFactory()->referenceToProxy(reference);
} bool |