diff options
author | Benoit Foucher <benoit@zeroc.com> | 2016-06-27 17:54:30 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2016-06-27 17:54:30 +0200 |
commit | c56f8ab6ca6ca0bdb9536fcce1ef24f1ef40ddc7 (patch) | |
tree | 5cb64dfe155e5d2349efb6c7dc4b0f5b5284d44a /cpp/src/IceGrid/RegistryI.cpp | |
parent | Fix Windows php build to restore nuget packages (diff) | |
download | ice-c56f8ab6ca6ca0bdb9536fcce1ef24f1ef40ddc7.tar.bz2 ice-c56f8ab6ca6ca0bdb9536fcce1ef24f1ef40ddc7.tar.xz ice-c56f8ab6ca6ca0bdb9536fcce1ef24f1ef40ddc7.zip |
Refactored SSL and iAP transports, support for running SSL on top
of TCP/iAP/Bluetooth.
Diffstat (limited to 'cpp/src/IceGrid/RegistryI.cpp')
-rw-r--r-- | cpp/src/IceGrid/RegistryI.cpp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/cpp/src/IceGrid/RegistryI.cpp b/cpp/src/IceGrid/RegistryI.cpp index fb31d8d588b..d246b26dd9c 100644 --- a/cpp/src/IceGrid/RegistryI.cpp +++ b/cpp/src/IceGrid/RegistryI.cpp @@ -118,6 +118,19 @@ private: ProcessPtr _origProcess; }; +Ice::IPConnectionInfoPtr +getIPConnectionInfo(const Ice::ConnectionInfoPtr& info) +{ + for(Ice::ConnectionInfoPtr p = info; p; p = p->underlying) + { + Ice::IPConnectionInfoPtr ipInfo = Ice::IPConnectionInfoPtr::dynamicCast(p); + if(ipInfo) + { + return ipInfo; + } + } + return ICE_NULLPTR; +} ProcessI::ProcessI(const RegistryIPtr& registry, const ProcessPtr& origProcess) : _registry(registry), @@ -1338,10 +1351,11 @@ RegistryI::getSSLInfo(const ConnectionPtr& connection, string& userDN) throw exc; } - sslinfo.remotePort = info->remotePort; - sslinfo.remoteHost = info->remoteAddress; - sslinfo.localPort = info->localPort; - sslinfo.localHost = info->localAddress; + Ice::IPConnectionInfoPtr ipInfo = getIPConnectionInfo(info); + sslinfo.remotePort = ipInfo->remotePort; + sslinfo.remoteHost = ipInfo->remoteAddress; + sslinfo.localPort = ipInfo->localPort; + sslinfo.localHost = ipInfo->localAddress; sslinfo.cipher = info->cipher; sslinfo.certs = info->certs; if(info->certs.size() > 0) |