summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/Make.common.rules9
-rw-r--r--cpp/include/IceSSL/IceSSL.h17
-rw-r--r--cpp/src/Glacier2/SessionRouterI.cpp50
-rw-r--r--cpp/src/Ice/ConnectionI.cpp11
-rw-r--r--cpp/src/Ice/ConnectionI.h2
-rw-r--r--cpp/src/Ice/EndpointI.h2
-rw-r--r--cpp/src/Ice/Network.cpp64
-rw-r--r--cpp/src/Ice/Network.h2
-rw-r--r--cpp/src/Ice/OpaqueEndpointI.cpp43
-rw-r--r--cpp/src/Ice/OpaqueEndpointI.h18
-rw-r--r--cpp/src/Ice/TcpEndpointI.cpp46
-rw-r--r--cpp/src/Ice/TcpEndpointI.h18
-rw-r--r--cpp/src/Ice/TcpTransceiver.cpp10
-rw-r--r--cpp/src/Ice/TcpTransceiver.h1
-rw-r--r--cpp/src/Ice/Transceiver.h3
-rw-r--r--cpp/src/Ice/UdpEndpointI.cpp61
-rw-r--r--cpp/src/Ice/UdpEndpointI.h20
-rw-r--r--cpp/src/Ice/UdpTransceiver.cpp11
-rw-r--r--cpp/src/Ice/UdpTransceiver.h1
-rw-r--r--cpp/src/IceGrid/RegistryI.cpp62
-rw-r--r--cpp/src/IceSSL/.depend16
-rw-r--r--cpp/src/IceSSL/EndpointI.cpp46
-rw-r--r--cpp/src/IceSSL/EndpointI.h20
-rw-r--r--cpp/src/IceSSL/Makefile7
-rw-r--r--cpp/src/IceSSL/PluginI.cpp2
-rw-r--r--cpp/src/IceSSL/TransceiverI.cpp47
-rw-r--r--cpp/src/IceSSL/TransceiverI.h1
-rw-r--r--cpp/src/IceSSL/Util.cpp2
-rw-r--r--cpp/test/Ice/background/EndpointI.cpp6
-rw-r--r--cpp/test/Ice/background/EndpointI.h3
-rw-r--r--cpp/test/Ice/background/Test.ice4
-rw-r--r--cpp/test/Ice/background/Transceiver.cpp6
-rw-r--r--cpp/test/Ice/background/Transceiver.h1
-rw-r--r--cpp/test/Ice/proxy/AllTests.cpp28
-rw-r--r--cs/src/Ice/ConnectionI.cs13
-rw-r--r--cs/src/Ice/EndpointI.cs1
-rw-r--r--cs/src/Ice/OpaqueEndpointI.cs35
-rw-r--r--cs/src/Ice/Reference.cs2
-rw-r--r--cs/src/Ice/TcpEndpointI.cs48
-rw-r--r--cs/src/Ice/TcpTransceiver.cs22
-rw-r--r--cs/src/Ice/Transceiver.cs1
-rw-r--r--cs/src/Ice/UdpEndpointI.cs68
-rw-r--r--cs/src/Ice/UdpTransceiver.cs32
-rw-r--r--cs/src/IceSSL/EndpointI.cs48
-rw-r--r--cs/src/IceSSL/Makefile3
-rw-r--r--cs/src/IceSSL/Makefile.mak3
-rw-r--r--cs/src/IceSSL/TransceiverI.cs34
-rw-r--r--cs/test/Ice/background/EndpointI.cs7
-rw-r--r--cs/test/Ice/background/Test.ice6
-rw-r--r--cs/test/Ice/background/Transceiver.cs5
-rw-r--r--cs/test/Ice/proxy/AllTests.cs34
-rw-r--r--java/build.xml3
-rw-r--r--java/src/Ice/ConnectionI.java10
-rw-r--r--java/src/IceInternal/OpaqueEndpointI.java27
-rw-r--r--java/src/IceInternal/RoutableReference.java2
-rw-r--r--java/src/IceInternal/TcpEndpointI.java45
-rw-r--r--java/src/IceInternal/TcpTransceiver.java21
-rw-r--r--java/src/IceInternal/Transceiver.java1
-rw-r--r--java/src/IceInternal/UdpEndpointI.java65
-rw-r--r--java/src/IceInternal/UdpTransceiver.java32
-rw-r--r--java/src/IceSSL/EndpointI.java45
-rw-r--r--java/src/IceSSL/TransceiverI.java43
-rw-r--r--java/src/IceUtilInternal/Base64.java2
-rw-r--r--java/test/Ice/background/EndpointI.java13
-rw-r--r--java/test/Ice/background/Test.ice4
-rw-r--r--java/test/Ice/background/Transceiver.java6
-rw-r--r--java/test/Ice/proxy/AllTests.java34
-rw-r--r--slice/Ice/Connection.ice66
-rw-r--r--slice/Ice/ConnectionF.ice1
-rw-r--r--slice/Ice/Endpoint.ice138
-rw-r--r--slice/IceSSL/ConnectionInfo.ice48
-rw-r--r--slice/IceSSL/EndpointInfo.ice (renamed from slice/IceSSL/Endpoint.ice)21
72 files changed, 1141 insertions, 488 deletions
diff --git a/config/Make.common.rules b/config/Make.common.rules
index d64d80bcb39..d1b3b0269d9 100644
--- a/config/Make.common.rules
+++ b/config/Make.common.rules
@@ -278,11 +278,16 @@ endif
#
ifeq ($(mklibfilename),)
- mklibfilename = $(if $(2),lib$(1).so.$(2),lib$(1).so)
+ # These default platform-specific rules are needed for cs/config/Make.rules.cs
+ ifeq ($(UNAME),Darwin)
+ mklibfilename = $(if $(2),lib$(1).$(2).dylib,lib$(1).dylib)
+ else
+ mklibfilename = $(if $(2),lib$(1).so.$(2),lib$(1).so)
+ endif
endif
ifeq ($(mksoname),)
- mksoname = $(if $(2),lib$(1).so.$(2),lib$(1).so)
+ mksoname = $(if $(2),lib$(1).so.$(2),lib$(1).so)
endif
ifeq ($(mklibname),)
diff --git a/cpp/include/IceSSL/IceSSL.h b/cpp/include/IceSSL/IceSSL.h
new file mode 100644
index 00000000000..8f58c8aa4be
--- /dev/null
+++ b/cpp/include/IceSSL/IceSSL.h
@@ -0,0 +1,17 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef ICE_SSL_ICE_SSL_H
+#define ICE_SSL_ICE_SSL_H
+
+#include <IceSSL/Plugin.h>
+#include <IceSSL/EndpointInfo.h>
+#include <IceSSL/ConnectionInfo.h>
+
+#endif
diff --git a/cpp/src/Glacier2/SessionRouterI.cpp b/cpp/src/Glacier2/SessionRouterI.cpp
index 4f9c8ddc39a..3db5b4bf209 100644
--- a/cpp/src/Glacier2/SessionRouterI.cpp
+++ b/cpp/src/Glacier2/SessionRouterI.cpp
@@ -15,7 +15,7 @@
#include <IceUtil/UUID.h>
-#include <IceSSL/Plugin.h>
+#include <IceSSL/IceSSL.h>
#include <Ice/Network.h>
using namespace std;
@@ -819,33 +819,21 @@ Glacier2::SessionRouterI::createSessionFromSecureConnection_async(
//
try
{
- IceSSL::ConnectionInfo info = IceSSL::getConnectionInfo(current.con);
- if(info.remoteAddr.ss_family == AF_UNSPEC)
+ IceSSL::SSLConnectionInfoPtr info = IceSSL::SSLConnectionInfoPtr::dynamicCast(current.con->getInfo());
+ if(!info)
{
- //
- // The remote address may not be available on Windows XP SP2 when using IPv6.
- //
- sslinfo.remotePort = 0;
- sslinfo.remoteHost = "";
- }
- else
- {
- sslinfo.remotePort = IceInternal::getPort(info.remoteAddr);
- sslinfo.remoteHost = IceInternal::inetAddrToString(info.remoteAddr);
+ amdCB->ice_exception(PermissionDeniedException("not ssl connection"));
+ return;
}
- sslinfo.localPort = IceInternal::getPort(info.localAddr);
- sslinfo.localHost = IceInternal::inetAddrToString(info.localAddr);
-
- sslinfo.cipher = info.cipher;
-
- if(info.certs.size() > 0)
+ sslinfo.remotePort = info->remotePort;
+ sslinfo.remoteHost = info->remoteAddress;
+ sslinfo.localPort = info->localPort;
+ sslinfo.localHost = info->localAddress;
+ sslinfo.cipher = info->cipher;
+ sslinfo.certs = info->certs;
+ if(info->certs.size() > 0)
{
- sslinfo.certs.resize(info.certs.size());
- for(unsigned int i = 0; i < info.certs.size(); ++i)
- {
- sslinfo.certs[i] = info.certs[i]->encode();
- }
- userDN = info.certs[0]->getSubjectDN();
+ userDN = IceSSL::Certificate::decode(info->certs[0])->getSubjectDN();
}
if(_instance->properties()->getPropertyAsInt("Glacier2.AddSSLContext") > 0)
@@ -860,20 +848,20 @@ Glacier2::SessionRouterI::createSessionFromSecureConnection_async(
os << sslinfo.localPort;
sslCtx["_SSL.Local.Port"] = os.str();
sslCtx["_SSL.Local.Host"] = sslinfo.localHost;
- if(info.certs.size() > 0)
+ if(info->certs.size() > 0)
{
- sslCtx["_SSL.PeerCert"] = info.certs[0]->encode();
+ sslCtx["_SSL.PeerCert"] = info->certs[0];
}
}
}
- catch(const IceSSL::ConnectionInvalidException&)
+ catch(const IceSSL::CertificateEncodingException&)
{
- amdCB->ice_exception(PermissionDeniedException("not ssl connection"));
+ amdCB->ice_exception(PermissionDeniedException("certificate encoding exception"));
return;
}
- catch(const IceSSL::CertificateEncodingException&)
+ catch(const Ice::LocalException&)
{
- amdCB->ice_exception(PermissionDeniedException("certificate encoding exception"));
+ amdCB->ice_exception(PermissionDeniedException("connection exception"));
return;
}
diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp
index 96952c5bf3a..94303438497 100644
--- a/cpp/src/Ice/ConnectionI.cpp
+++ b/cpp/src/Ice/ConnectionI.cpp
@@ -1465,6 +1465,17 @@ Ice::ConnectionI::timeout() const
return _endpoint->timeout(); // No mutex lock, _endpoint is immutable.
}
+ConnectionInfoPtr
+Ice::ConnectionI::getInfo() const
+{
+ IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
+ if(_exception.get())
+ {
+ _exception->ice_throw();
+ }
+ return _transceiver->getInfo();
+}
+
//
// Only used by the SSL plug-in.
//
diff --git a/cpp/src/Ice/ConnectionI.h b/cpp/src/Ice/ConnectionI.h
index 3d2d857695d..c13ae288561 100644
--- a/cpp/src/Ice/ConnectionI.h
+++ b/cpp/src/Ice/ConnectionI.h
@@ -132,7 +132,7 @@ public:
virtual std::string type() const; // From Connection.
virtual Ice::Int timeout() const; // From Connection.
-
+ virtual ConnectionInfoPtr getInfo() const; // From Connection
// SSL plug-in needs to be able to get the transceiver.
IceInternal::TransceiverPtr getTransceiver() const;
diff --git a/cpp/src/Ice/EndpointI.h b/cpp/src/Ice/EndpointI.h
index a2e616ca176..2dc851f4f42 100644
--- a/cpp/src/Ice/EndpointI.h
+++ b/cpp/src/Ice/EndpointI.h
@@ -45,7 +45,7 @@ public:
};
typedef IceUtil::Handle<EndpointI_connectors> EndpointI_connectorsPtr;
-class ICE_API EndpointI : public virtual Ice::Endpoint
+class ICE_API EndpointI : public Ice::Endpoint
{
public:
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp
index fa16f33d4ea..80eb685b413 100644
--- a/cpp/src/Ice/Network.cpp
+++ b/cpp/src/Ice/Network.cpp
@@ -1743,6 +1743,41 @@ IceInternal::fdToString(SOCKET fd)
return addressesToString(localAddr, remoteAddr, peerConnected);
};
+void
+IceInternal::fdToAddressAndPort(SOCKET fd, string& localAddress, int& localPort, string& remoteAddress, int& remotePort)
+{
+ if(fd == INVALID_SOCKET)
+ {
+ localAddress.clear();
+ remoteAddress.clear();
+ localPort = -1;
+ remotePort = -1;
+ return;
+ }
+
+ struct sockaddr_storage localAddr;
+ fdToLocalAddress(fd, localAddr);
+ addrToAddressAndPort(localAddr, localAddress, localPort);
+
+ struct sockaddr_storage remoteAddr;
+ if(fdToRemoteAddress(fd, remoteAddr))
+ {
+ addrToAddressAndPort(remoteAddr, remoteAddress, remotePort);
+ }
+ else
+ {
+ remoteAddress.clear();
+ remotePort = -1;
+ }
+}
+
+void
+IceInternal::addrToAddressAndPort(const struct sockaddr_storage& addr, string& address, int& port)
+{
+ address = inetAddrToString(addr);
+ port = getPort(addr);
+}
+
std::string
IceInternal::addressesToString(const struct sockaddr_storage& localAddr, const struct sockaddr_storage& remoteAddr,
bool peerConnected)
@@ -1807,6 +1842,10 @@ IceInternal::inetAddrToString(const struct sockaddr_storage& ss)
{
size = sizeof(sockaddr_in6);
}
+ else
+ {
+ return "";
+ }
char namebuf[1024];
namebuf[0] = '\0';
@@ -1819,17 +1858,7 @@ IceInternal::addrToString(const struct sockaddr_storage& addr)
{
ostringstream s;
string port;
- s << inetAddrToString(addr) << ':';
- if(addr.ss_family == AF_INET)
- {
- const struct sockaddr_in* addrin = reinterpret_cast<const sockaddr_in*>(&addr);
- s << ntohs(addrin->sin_port);
- }
- else
- {
- const struct sockaddr_in6* addrin = reinterpret_cast<const sockaddr_in6*>(&addr);
- s << ntohs(addrin->sin6_port);
- }
+ s << inetAddrToString(addr) << ':' << getPort(addr);
return s.str();
}
@@ -1840,10 +1869,14 @@ IceInternal::isMulticast(const struct sockaddr_storage& addr)
{
return IN_MULTICAST(ntohl(reinterpret_cast<const struct sockaddr_in*>(&addr)->sin_addr.s_addr));
}
- else
+ else if(addr.ss_family == AF_INET6)
{
return IN6_IS_ADDR_MULTICAST(&reinterpret_cast<const struct sockaddr_in6*>(&addr)->sin6_addr);
}
+ else
+ {
+ return false;
+ }
}
int
@@ -1853,10 +1886,14 @@ IceInternal::getPort(const struct sockaddr_storage& addr)
{
return ntohs(reinterpret_cast<const sockaddr_in*>(&addr)->sin_port);
}
- else
+ else if(addr.ss_family == AF_INET6)
{
return ntohs(reinterpret_cast<const sockaddr_in6*>(&addr)->sin6_port);
}
+ else
+ {
+ return -1;
+ }
}
void
@@ -1868,6 +1905,7 @@ IceInternal::setPort(struct sockaddr_storage& addr, int port)
}
else
{
+ assert(addr.ss_family == AF_INET6);
reinterpret_cast<sockaddr_in6*>(&addr)->sin6_port = htons(port);
}
}
diff --git a/cpp/src/Ice/Network.h b/cpp/src/Ice/Network.h
index 7ad2de80828..376f6ecbd4e 100644
--- a/cpp/src/Ice/Network.h
+++ b/cpp/src/Ice/Network.h
@@ -181,6 +181,8 @@ ICE_API void createPipe(SOCKET fds[2]);
ICE_API std::string errorToStringDNS(int);
ICE_API std::string fdToString(SOCKET);
+ICE_API void fdToAddressAndPort(SOCKET, std::string&, int&, std::string&, int&);
+ICE_API void addrToAddressAndPort(const struct sockaddr_storage&, std::string&, int&);
ICE_API std::string addressesToString(const struct sockaddr_storage&, const struct sockaddr_storage&, bool);
ICE_API void fdToLocalAddress(SOCKET, struct sockaddr_storage&);
ICE_API bool fdToRemoteAddress(SOCKET, struct sockaddr_storage&);
diff --git a/cpp/src/Ice/OpaqueEndpointI.cpp b/cpp/src/Ice/OpaqueEndpointI.cpp
index fd5d489f80f..3fc6d7b913c 100644
--- a/cpp/src/Ice/OpaqueEndpointI.cpp
+++ b/cpp/src/Ice/OpaqueEndpointI.cpp
@@ -144,6 +144,43 @@ IceInternal::OpaqueEndpointI::toString() const
return s.str();
}
+Ice::EndpointInfoPtr
+IceInternal::OpaqueEndpointI::getInfo() const
+{
+ class InfoI : public Ice::OpaqueEndpointInfo
+ {
+ public:
+
+ InfoI(Ice::Short type, Ice::ByteSeq rawByes) : OpaqueEndpointInfo(-1, false, rawBytes), _type(type)
+ {
+ }
+
+ virtual Ice::Short
+ type() const
+ {
+ return _type;
+ }
+
+ virtual bool
+ datagram() const
+ {
+ return false;
+ }
+
+ virtual bool
+ secure() const
+ {
+ return false;
+ }
+
+ private:
+
+ Ice::Short _type;
+ };
+
+ return new InfoI(_type, _rawBytes);
+}
+
Short
IceInternal::OpaqueEndpointI::type() const
{
@@ -192,12 +229,6 @@ IceInternal::OpaqueEndpointI::secure() const
return false;
}
-Ice::ByteSeq
-IceInternal::OpaqueEndpointI::rawBytes() const
-{
- return _rawBytes;
-}
-
TransceiverPtr
IceInternal::OpaqueEndpointI::transceiver(EndpointIPtr& endp) const
{
diff --git a/cpp/src/Ice/OpaqueEndpointI.h b/cpp/src/Ice/OpaqueEndpointI.h
index d79b2433e02..b89905563b0 100644
--- a/cpp/src/Ice/OpaqueEndpointI.h
+++ b/cpp/src/Ice/OpaqueEndpointI.h
@@ -16,27 +16,24 @@
namespace IceInternal
{
-class OpaqueEndpointI : public EndpointI, public Ice::OpaqueEndpoint
+class OpaqueEndpointI : public EndpointI
{
public:
OpaqueEndpointI(const ::std::string&);
OpaqueEndpointI(Ice::Short, BasicStream*);
- // From OpaqueEndpoint
- virtual std::string toString() const;
- virtual Ice::Int timeout() const;
- virtual bool compress() const;
- virtual bool datagram() const;
- virtual bool secure() const;
- virtual Ice::ByteSeq rawBytes() const;
-
- // From EndpointI
virtual void streamWrite(BasicStream*) const;
+ virtual std::string toString() const;
+ virtual Ice::EndpointInfoPtr getInfo() const;
virtual Ice::Short type() const;
+ virtual Ice::Int timeout() const;
virtual EndpointIPtr timeout(Ice::Int) const;
virtual EndpointIPtr connectionId(const ::std::string&) const;
+ virtual bool compress() const;
virtual EndpointIPtr compress(bool) const;
+ virtual bool datagram() const;
+ virtual bool secure() const;
virtual TransceiverPtr transceiver(EndpointIPtr&) const;
virtual std::vector<ConnectorPtr> connectors() const;
virtual void connectors_async(const EndpointI_connectorsPtr&) const;
@@ -70,6 +67,7 @@ public:
#endif
protected:
+
using EndpointI::connectors;
private:
diff --git a/cpp/src/Ice/TcpEndpointI.cpp b/cpp/src/Ice/TcpEndpointI.cpp
index 95c666a0580..9d8c761231f 100644
--- a/cpp/src/Ice/TcpEndpointI.cpp
+++ b/cpp/src/Ice/TcpEndpointI.cpp
@@ -226,6 +226,40 @@ IceInternal::TcpEndpointI::toString() const
return s.str();
}
+EndpointInfoPtr
+IceInternal::TcpEndpointI::getInfo() const
+{
+ class InfoI : public Ice::TcpEndpointInfo
+ {
+ public:
+
+ InfoI(Ice::Int to, bool comp, const string& host, Ice::Int port) :
+ TcpEndpointInfo(to, comp, host, port)
+ {
+ }
+
+ virtual Ice::Short
+ type() const
+ {
+ return TcpEndpointType;
+ }
+
+ virtual bool
+ datagram() const
+ {
+ return false;
+ }
+
+ virtual bool
+ secure() const
+ {
+ return false;
+ }
+ };
+
+ return new InfoI(_timeout, _compress, _host, _port);
+}
+
Short
IceInternal::TcpEndpointI::type() const
{
@@ -295,18 +329,6 @@ IceInternal::TcpEndpointI::secure() const
return false;
}
-string
-IceInternal::TcpEndpointI::host() const
-{
- return _host;
-}
-
-Ice::Int
-IceInternal::TcpEndpointI::port() const
-{
- return _port;
-}
-
TransceiverPtr
IceInternal::TcpEndpointI::transceiver(EndpointIPtr& endp) const
{
diff --git a/cpp/src/Ice/TcpEndpointI.h b/cpp/src/Ice/TcpEndpointI.h
index a905d6a5ffa..1bf7829b397 100644
--- a/cpp/src/Ice/TcpEndpointI.h
+++ b/cpp/src/Ice/TcpEndpointI.h
@@ -18,7 +18,7 @@ namespace IceInternal
const Ice::Short TcpEndpointType = 1;
-class TcpEndpointI : public EndpointI, public Ice::TcpEndpoint
+class TcpEndpointI : public EndpointI
{
public:
@@ -26,21 +26,17 @@ public:
TcpEndpointI(const InstancePtr&, const std::string&, bool);
TcpEndpointI(BasicStream*);
- // From TcpEndpoint
- virtual std::string toString() const;
- virtual Ice::Int timeout() const;
- virtual bool compress() const;
- virtual bool datagram() const;
- virtual bool secure() const;
- virtual std::string host() const;
- virtual Ice::Int port() const;
-
- // From EndpointI
virtual void streamWrite(BasicStream*) const;
+ virtual std::string toString() const;
+ virtual Ice::EndpointInfoPtr getInfo() const;
virtual Ice::Short type() const;
+ virtual Ice::Int timeout() const;
virtual EndpointIPtr timeout(Ice::Int) const;
virtual EndpointIPtr connectionId(const ::std::string&) const;
+ virtual bool compress() const;
virtual EndpointIPtr compress(bool) const;
+ virtual bool datagram() const;
+ virtual bool secure() const;
virtual TransceiverPtr transceiver(EndpointIPtr&) const;
virtual std::vector<ConnectorPtr> connectors() const;
virtual void connectors_async(const EndpointI_connectorsPtr&) const;
diff --git a/cpp/src/Ice/TcpTransceiver.cpp b/cpp/src/Ice/TcpTransceiver.cpp
index 88efe8c0dc4..959c3ce6f87 100644
--- a/cpp/src/Ice/TcpTransceiver.cpp
+++ b/cpp/src/Ice/TcpTransceiver.cpp
@@ -8,6 +8,7 @@
// **********************************************************************
#include <Ice/TcpTransceiver.h>
+#include <Ice/Connection.h>
#include <Ice/Instance.h>
#include <Ice/TraceLevels.h>
#include <Ice/LoggerUtil.h>
@@ -453,6 +454,15 @@ IceInternal::TcpTransceiver::toString() const
return _desc;
}
+Ice::ConnectionInfoPtr
+IceInternal::TcpTransceiver::getInfo() const
+{
+ assert(_fd != INVALID_SOCKET);
+ Ice::TcpConnectionInfoPtr info = new Ice::TcpConnectionInfo();
+ fdToAddressAndPort(_fd, info->localAddress, info->localPort, info->remoteAddress, info->remotePort);
+ return info;
+}
+
void
IceInternal::TcpTransceiver::checkSendSize(const Buffer& buf, size_t messageSizeMax)
{
diff --git a/cpp/src/Ice/TcpTransceiver.h b/cpp/src/Ice/TcpTransceiver.h
index 7c1c80c94b7..2f131531d0a 100644
--- a/cpp/src/Ice/TcpTransceiver.h
+++ b/cpp/src/Ice/TcpTransceiver.h
@@ -50,6 +50,7 @@ public:
#endif
virtual std::string type() const;
virtual std::string toString() const;
+ virtual Ice::ConnectionInfoPtr getInfo() const;
virtual void checkSendSize(const Buffer&, size_t);
private:
diff --git a/cpp/src/Ice/Transceiver.h b/cpp/src/Ice/Transceiver.h
index 56b23a61bcf..2c6bad54e2a 100644
--- a/cpp/src/Ice/Transceiver.h
+++ b/cpp/src/Ice/Transceiver.h
@@ -12,6 +12,7 @@
#include <IceUtil/Shared.h>
#include <Ice/TransceiverF.h>
+#include <Ice/ConnectionF.h>
#include <Ice/Network.h>
namespace IceInternal
@@ -36,7 +37,7 @@ public:
#endif
virtual std::string type() const = 0;
virtual std::string toString() const = 0;
-
+ virtual Ice::ConnectionInfoPtr getInfo() const = 0;
virtual void checkSendSize(const Buffer&, size_t) = 0;
};
diff --git a/cpp/src/Ice/UdpEndpointI.cpp b/cpp/src/Ice/UdpEndpointI.cpp
index 041733e3b66..bbd273cfa54 100644
--- a/cpp/src/Ice/UdpEndpointI.cpp
+++ b/cpp/src/Ice/UdpEndpointI.cpp
@@ -432,6 +432,43 @@ IceInternal::UdpEndpointI::toString() const
return s.str();
}
+EndpointInfoPtr
+IceInternal::UdpEndpointI::getInfo() const
+{
+ class InfoI : public Ice::UdpEndpointInfo
+ {
+ public:
+
+ InfoI(bool comp, const string& host, Ice::Int port, Ice::Byte protocolMajor, Ice::Byte protocolMinor,
+ Ice::Byte encodingMajor, Ice::Byte encodingMinor, const std::string& mcastInterface, Ice::Int mcastTtl) :
+ UdpEndpointInfo(-1, comp, host, port, protocolMajor, protocolMinor, encodingMajor, encodingMinor,
+ mcastInterface, mcastTtl)
+ {
+ }
+
+ virtual Ice::Short
+ type() const
+ {
+ return UdpEndpointType;
+ }
+
+ virtual bool
+ datagram() const
+ {
+ return true;
+ }
+
+ virtual bool
+ secure() const
+ {
+ return false;
+ }
+ };
+
+ return new InfoI(_compress, _host, _port, _protocolMajor, _protocolMinor, _encodingMajor, _encodingMinor,
+ _mcastInterface, _mcastTtl);
+}
+
Short
IceInternal::UdpEndpointI::type() const
{
@@ -496,30 +533,6 @@ IceInternal::UdpEndpointI::secure() const
return false;
}
-string
-IceInternal::UdpEndpointI::host() const
-{
- return _host;
-}
-
-Ice::Int
-IceInternal::UdpEndpointI::port() const
-{
- return _port;
-}
-
-string
-IceInternal::UdpEndpointI::mcastInterface() const
-{
- return _mcastInterface;
-}
-
-Ice::Int
-IceInternal::UdpEndpointI::mcastTtl() const
-{
- return _mcastTtl;
-}
-
TransceiverPtr
IceInternal::UdpEndpointI::transceiver(EndpointIPtr& endp) const
{
diff --git a/cpp/src/Ice/UdpEndpointI.h b/cpp/src/Ice/UdpEndpointI.h
index eb924d955d3..1331d740085 100644
--- a/cpp/src/Ice/UdpEndpointI.h
+++ b/cpp/src/Ice/UdpEndpointI.h
@@ -18,7 +18,7 @@ namespace IceInternal
const Ice::Short UdpEndpointType = 3;
-class UdpEndpointI : public EndpointI, public Ice::UdpEndpoint
+class UdpEndpointI : public EndpointI
{
public:
@@ -27,23 +27,17 @@ public:
UdpEndpointI(const InstancePtr&, const std::string&, bool);
UdpEndpointI(BasicStream*);
- // From UdpEndpoint
- virtual std::string toString() const;
- virtual Ice::Int timeout() const;
- virtual bool compress() const;
- virtual bool datagram() const;
- virtual bool secure() const;
- virtual std::string host() const;
- virtual Ice::Int port() const;
- virtual std::string mcastInterface() const;
- virtual Ice::Int mcastTtl() const;
-
- // From EndpointI
virtual void streamWrite(BasicStream*) const;
+ virtual std::string toString() const;
+ virtual Ice::EndpointInfoPtr getInfo() const;
virtual Ice::Short type() const;
+ virtual Ice::Int timeout() const;
virtual EndpointIPtr timeout(Ice::Int) const;
virtual EndpointIPtr connectionId(const ::std::string&) const;
+ virtual bool compress() const;
virtual EndpointIPtr compress(bool) const;
+ virtual bool datagram() const;
+ virtual bool secure() const;
virtual TransceiverPtr transceiver(EndpointIPtr&) const;
virtual std::vector<ConnectorPtr> connectors() const;
virtual void connectors_async(const EndpointI_connectorsPtr&) const;
diff --git a/cpp/src/Ice/UdpTransceiver.cpp b/cpp/src/Ice/UdpTransceiver.cpp
index 8196391e00b..fbf00a1048a 100644
--- a/cpp/src/Ice/UdpTransceiver.cpp
+++ b/cpp/src/Ice/UdpTransceiver.cpp
@@ -16,6 +16,7 @@
#endif
#include <Ice/UdpTransceiver.h>
+#include <Ice/Connection.h>
#include <Ice/Instance.h>
#include <Ice/TraceLevels.h>
#include <Ice/LoggerUtil.h>
@@ -451,6 +452,16 @@ IceInternal::UdpTransceiver::toString() const
}
}
+Ice::ConnectionInfoPtr
+IceInternal::UdpTransceiver::getInfo() const
+{
+ assert(_fd != INVALID_SOCKET);
+ Ice::UdpConnectionInfoPtr info = new Ice::UdpConnectionInfo();
+ fdToAddressAndPort(_fd, info->localAddress, info->localPort, info->remoteAddress, info->remotePort);
+ addrToAddressAndPort(_mcastAddr, info->mcastAddress, info->mcastPort);
+ return info;
+}
+
void
IceInternal::UdpTransceiver::checkSendSize(const Buffer& buf, size_t messageSizeMax)
{
diff --git a/cpp/src/Ice/UdpTransceiver.h b/cpp/src/Ice/UdpTransceiver.h
index 4eb1a14bfbe..f7c918184a8 100644
--- a/cpp/src/Ice/UdpTransceiver.h
+++ b/cpp/src/Ice/UdpTransceiver.h
@@ -54,6 +54,7 @@ public:
#endif
virtual std::string type() const;
virtual std::string toString() const;
+ virtual Ice::ConnectionInfoPtr getInfo() const;
virtual void checkSendSize(const Buffer&, size_t);
int effectivePort() const;
diff --git a/cpp/src/IceGrid/RegistryI.cpp b/cpp/src/IceGrid/RegistryI.cpp
index 0b4b88740fc..d3caad319de 100644
--- a/cpp/src/IceGrid/RegistryI.cpp
+++ b/cpp/src/IceGrid/RegistryI.cpp
@@ -14,7 +14,7 @@
#include <Ice/ProtocolPluginFacade.h> // Just to get the hostname
#include <IceStorm/Service.h>
-#include <IceSSL/Plugin.h>
+#include <IceSSL/IceSSL.h>
#include <Glacier2/PermissionsVerifier.h>
#include <IceGrid/TraceLevels.h>
@@ -1239,61 +1239,35 @@ RegistryI::getSSLInfo(const ConnectionPtr& connection, string& userDN)
Glacier2::SSLInfo sslinfo;
try
{
- IceSSL::ConnectionInfo info = IceSSL::getConnectionInfo(connection);
-
- if(info.remoteAddr.ss_family == AF_UNSPEC)
- {
- //
- // The remote address may not be available on Windows XP SP2 when using IPv6.
- //
- sslinfo.remotePort = 0;
- sslinfo.remoteHost = "";
- }
- else
- {
- if(info.remoteAddr.ss_family == AF_INET)
- {
- sslinfo.remotePort = ntohs(reinterpret_cast<sockaddr_in*>(&info.remoteAddr)->sin_port);
- }
- else
- {
- sslinfo.remotePort = ntohs(reinterpret_cast<sockaddr_in6*>(&info.remoteAddr)->sin6_port);
- }
- sslinfo.remoteHost = IceInternal::inetAddrToString(info.remoteAddr);
- }
-
- if(info.localAddr.ss_family == AF_INET)
+ IceSSL::SSLConnectionInfoPtr info = IceSSL::SSLConnectionInfoPtr::dynamicCast(connection->getInfo());
+ if(!info)
{
- sslinfo.localPort = ntohs(reinterpret_cast<sockaddr_in*>(&info.localAddr)->sin_port);
- }
- else
- {
- sslinfo.localPort = ntohs(reinterpret_cast<sockaddr_in6*>(&info.localAddr)->sin6_port);
+ PermissionDeniedException exc;
+ exc.reason = "not ssl connection";
+ throw exc;
}
- sslinfo.localHost = IceInternal::inetAddrToString(info.localAddr);
-
- sslinfo.cipher = info.cipher;
- if(!info.certs.empty())
+ sslinfo.remotePort = info->remotePort;
+ sslinfo.remoteHost = info->remoteAddress;
+ sslinfo.localPort = info->localPort;
+ sslinfo.localHost = info->localAddress;
+ sslinfo.cipher = info->cipher;
+ sslinfo.certs = info->certs;
+ if(info->certs.size() > 0)
{
- sslinfo.certs.resize(info.certs.size());
- for(unsigned int i = 0; i < info.certs.size(); ++i)
- {
- sslinfo.certs[i] = info.certs[i]->encode();
- }
- userDN = info.certs[0]->getSubjectDN();
+ userDN = IceSSL::Certificate::decode(info->certs[0])->getSubjectDN();
}
}
- catch(const IceSSL::ConnectionInvalidException&)
+ catch(const IceSSL::CertificateEncodingException&)
{
PermissionDeniedException exc;
- exc.reason = "not ssl connection";
+ exc.reason = "certificate encoding exception";
throw exc;
}
- catch(const IceSSL::CertificateEncodingException&)
+ catch(const Ice::LocalException&)
{
PermissionDeniedException exc;
- exc.reason = "certificate encoding exception";
+ exc.reason = "connection exception";
throw exc;
}
diff --git a/cpp/src/IceSSL/.depend b/cpp/src/IceSSL/.depend
index 37023d70395..3c528651773 100644
--- a/cpp/src/IceSSL/.depend
+++ b/cpp/src/IceSSL/.depend
@@ -1,13 +1,13 @@
AcceptorI$(OBJEXT): AcceptorI.cpp ../IceSSL/AcceptorI.h $(includedir)/Ice/LoggerF.h $(includedir)/Ice/LocalObjectF.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/Ice/UndefSysMacros.h ../Ice/TransceiverF.h ../Ice/Acceptor.h ../Ice/AcceptorF.h ../Ice/Network.h $(includedir)/Ice/PropertiesF.h $(includedir)/Ice/Proxy.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/Object.h $(includedir)/Ice/IncomingAsyncF.h $(includedir)/Ice/Protocol.h ../IceSSL/InstanceF.h ../IceSSL/Instance.h ../IceSSL/UtilF.h $(includedir)/Ice/ProtocolPluginFacadeF.h $(includedir)/IceSSL/Plugin.h $(includedir)/Ice/Plugin.h $(includedir)/Ice/BuiltinSequences.h ../IceSSL/TrustManagerF.h ../IceSSL/TransceiverI.h $(includedir)/Ice/StatsF.h ../Ice/Transceiver.h ../IceSSL/Util.h $(includedir)/Ice/Communicator.h $(includedir)/Ice/ObjectFactoryF.h $(includedir)/Ice/RouterF.h $(includedir)/Ice/LocatorF.h $(includedir)/Ice/PluginF.h $(includedir)/Ice/ImplicitContextF.h $(includedir)/Ice/LocalException.h $(includedir)/Ice/LoggerUtil.h $(includedir)/Ice/Properties.h $(includedir)/Ice/Outgoing.h $(includedir)/IceUtil/Monitor.h $(includedir)/IceUtil/Cond.h $(includedir)/Ice/InstanceF.h $(includedir)/Ice/BasicStream.h $(includedir)/Ice/Buffer.h $(includedir)/Ice/StringConverter.h $(includedir)/IceUtil/Unicode.h $(includedir)/Ice/OutgoingAsync.h $(includedir)/IceUtil/Timer.h $(includedir)/IceUtil/Thread.h $(includedir)/Ice/Incoming.h $(includedir)/Ice/ServantLocatorF.h $(includedir)/Ice/ServantManagerF.h $(includedir)/Ice/Direct.h $(includedir)/IceUtil/StringUtil.h
Certificate$(OBJEXT): Certificate.cpp $(includedir)/IceUtil/DisableWarnings.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/IceUtil/MutexPtrLock.h $(includedir)/IceUtil/StringUtil.h $(includedir)/IceSSL/Plugin.h $(includedir)/Ice/Plugin.h $(includedir)/Ice/LocalObjectF.h $(includedir)/IceUtil/Shared.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/Ice/Proxy.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/LoggerF.h $(includedir)/Ice/BuiltinSequences.h ../IceSSL/Util.h ../IceSSL/UtilF.h ../Ice/Network.h $(includedir)/Ice/PropertiesF.h $(includedir)/Ice/Object.h $(includedir)/Ice/IncomingAsyncF.h $(includedir)/Ice/Protocol.h ../IceSSL/RFC2253.h
-ConnectorI$(OBJEXT): ConnectorI.cpp ../IceSSL/ConnectorI.h $(includedir)/Ice/LoggerF.h $(includedir)/Ice/LocalObjectF.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/Ice/UndefSysMacros.h ../Ice/TransceiverF.h ../Ice/Connector.h ../Ice/ConnectorF.h ../IceSSL/InstanceF.h ../IceSSL/Instance.h ../IceSSL/UtilF.h $(includedir)/Ice/CommunicatorF.h ../Ice/Network.h $(includedir)/Ice/PropertiesF.h $(includedir)/Ice/Proxy.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/Object.h $(includedir)/Ice/IncomingAsyncF.h $(includedir)/Ice/Protocol.h $(includedir)/Ice/ProtocolPluginFacadeF.h $(includedir)/IceSSL/Plugin.h $(includedir)/Ice/Plugin.h $(includedir)/Ice/BuiltinSequences.h ../IceSSL/TrustManagerF.h ../IceSSL/TransceiverI.h $(includedir)/Ice/StatsF.h ../Ice/Transceiver.h ../IceSSL/EndpointI.h ../Ice/EndpointI.h $(includedir)/IceUtil/Thread.h $(includedir)/IceUtil/Monitor.h $(includedir)/IceUtil/Cond.h $(includedir)/Ice/Endpoint.h $(includedir)/Ice/InstanceF.h ../Ice/AcceptorF.h $(includedir)/Ice/EndpointFactory.h $(includedir)/Ice/EndpointFactoryF.h $(includedir)/IceSSL/Endpoint.h ../IceSSL/Util.h $(includedir)/Ice/Communicator.h $(includedir)/Ice/ObjectFactoryF.h $(includedir)/Ice/RouterF.h $(includedir)/Ice/LocatorF.h $(includedir)/Ice/PluginF.h $(includedir)/Ice/ImplicitContextF.h $(includedir)/Ice/LocalException.h $(includedir)/Ice/LoggerUtil.h
-Endpoint$(OBJEXT): Endpoint.cpp $(includedir)/IceSSL/Endpoint.h $(includedir)/Ice/LocalObjectF.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/Ice/Proxy.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/Endpoint.h $(includedir)/Ice/BuiltinSequences.h $(includedir)/Ice/BasicStream.h $(includedir)/Ice/InstanceF.h $(includedir)/Ice/ObjectFactoryF.h $(includedir)/Ice/Buffer.h $(includedir)/Ice/Protocol.h $(includedir)/Ice/StringConverter.h $(includedir)/Ice/Plugin.h $(includedir)/Ice/LoggerF.h $(includedir)/IceUtil/Unicode.h $(includedir)/Ice/Object.h $(includedir)/Ice/IncomingAsyncF.h $(includedir)/IceUtil/Iterator.h $(includedir)/IceUtil/ScopedArray.h $(includedir)/IceUtil/DisableWarnings.h
-EndpointI$(OBJEXT): EndpointI.cpp ../IceSSL/EndpointI.h ../Ice/EndpointI.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/Thread.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/IceUtil/Monitor.h $(includedir)/IceUtil/Cond.h $(includedir)/Ice/Endpoint.h $(includedir)/Ice/LocalObjectF.h $(includedir)/Ice/Handle.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/Ice/Proxy.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/BuiltinSequences.h $(includedir)/Ice/InstanceF.h ../Ice/TransceiverF.h ../Ice/ConnectorF.h ../Ice/AcceptorF.h $(includedir)/Ice/Protocol.h $(includedir)/Ice/EndpointFactory.h $(includedir)/Ice/EndpointFactoryF.h $(includedir)/IceSSL/Endpoint.h ../IceSSL/InstanceF.h ../IceSSL/AcceptorI.h $(includedir)/Ice/LoggerF.h ../Ice/Acceptor.h ../Ice/Network.h $(includedir)/Ice/PropertiesF.h $(includedir)/Ice/Object.h $(includedir)/Ice/IncomingAsyncF.h ../IceSSL/ConnectorI.h ../Ice/Connector.h ../IceSSL/TransceiverI.h $(includedir)/IceSSL/Plugin.h $(includedir)/Ice/Plugin.h $(includedir)/Ice/StatsF.h ../Ice/Transceiver.h ../IceSSL/Instance.h ../IceSSL/UtilF.h $(includedir)/Ice/ProtocolPluginFacadeF.h ../IceSSL/TrustManagerF.h $(includedir)/Ice/BasicStream.h $(includedir)/Ice/ObjectFactoryF.h $(includedir)/Ice/Buffer.h $(includedir)/Ice/StringConverter.h $(includedir)/IceUtil/Unicode.h $(includedir)/Ice/LocalException.h ../Ice/DefaultsAndOverrides.h ../Ice/DefaultsAndOverridesF.h
-Instance$(OBJEXT): Instance.cpp ../IceSSL/Instance.h ../IceSSL/InstanceF.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h ../IceSSL/UtilF.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/LocalObjectF.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/LoggerF.h ../Ice/Network.h $(includedir)/Ice/PropertiesF.h $(includedir)/Ice/Proxy.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/Object.h $(includedir)/Ice/IncomingAsyncF.h $(includedir)/Ice/Protocol.h $(includedir)/Ice/ProtocolPluginFacadeF.h $(includedir)/IceSSL/Plugin.h $(includedir)/Ice/Plugin.h $(includedir)/Ice/BuiltinSequences.h ../IceSSL/TrustManagerF.h ../IceSSL/EndpointI.h ../Ice/EndpointI.h $(includedir)/IceUtil/Thread.h $(includedir)/IceUtil/Monitor.h $(includedir)/IceUtil/Cond.h $(includedir)/Ice/Endpoint.h $(includedir)/Ice/InstanceF.h ../Ice/TransceiverF.h ../Ice/ConnectorF.h ../Ice/AcceptorF.h $(includedir)/Ice/EndpointFactory.h $(includedir)/Ice/EndpointFactoryF.h $(includedir)/IceSSL/Endpoint.h ../IceSSL/Util.h ../IceSSL/TrustManager.h ../IceSSL/RFC2253.h $(includedir)/Ice/Communicator.h $(includedir)/Ice/StatsF.h $(includedir)/Ice/ObjectFactoryF.h $(includedir)/Ice/RouterF.h $(includedir)/Ice/LocatorF.h $(includedir)/Ice/PluginF.h $(includedir)/Ice/ImplicitContextF.h $(includedir)/Ice/LocalException.h $(includedir)/Ice/Logger.h $(includedir)/Ice/LoggerUtil.h $(includedir)/Ice/Properties.h $(includedir)/Ice/Outgoing.h $(includedir)/Ice/BasicStream.h $(includedir)/Ice/Buffer.h $(includedir)/Ice/StringConverter.h $(includedir)/IceUtil/Unicode.h $(includedir)/Ice/OutgoingAsync.h $(includedir)/IceUtil/Timer.h $(includedir)/Ice/Incoming.h $(includedir)/Ice/ServantLocatorF.h $(includedir)/Ice/ServantManagerF.h $(includedir)/Ice/Direct.h $(includedir)/Ice/ProtocolPluginFacade.h $(includedir)/IceUtil/MutexPtrLock.h $(includedir)/IceUtil/StringUtil.h $(includedir)/IceUtil/DisableWarnings.h
-PluginI$(OBJEXT): PluginI.cpp ../IceSSL/PluginI.h $(includedir)/IceSSL/Plugin.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/Plugin.h $(includedir)/Ice/LocalObjectF.h $(includedir)/IceUtil/Shared.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/Ice/Proxy.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/LoggerF.h $(includedir)/Ice/BuiltinSequences.h ../IceSSL/InstanceF.h ../IceSSL/Instance.h ../IceSSL/UtilF.h ../Ice/Network.h $(includedir)/Ice/PropertiesF.h $(includedir)/Ice/Object.h $(includedir)/Ice/IncomingAsyncF.h $(includedir)/Ice/Protocol.h $(includedir)/Ice/ProtocolPluginFacadeF.h ../IceSSL/TrustManagerF.h ../IceSSL/TransceiverI.h $(includedir)/Ice/StatsF.h ../Ice/Transceiver.h ../Ice/TransceiverF.h $(includedir)/Ice/LocalException.h ../Ice/ConnectionI.h $(includedir)/IceUtil/Monitor.h $(includedir)/IceUtil/Cond.h $(includedir)/IceUtil/Timer.h $(includedir)/IceUtil/Thread.h $(includedir)/Ice/Connection.h $(includedir)/Ice/ConnectionFactoryF.h $(includedir)/Ice/InstanceF.h $(includedir)/Ice/ServantManagerF.h ../Ice/ConnectorF.h ../Ice/TraceLevelsF.h ../Ice/EventHandler.h ../Ice/EventHandlerF.h ../Ice/ThreadPoolF.h $(includedir)/Ice/BasicStream.h $(includedir)/Ice/ObjectFactoryF.h $(includedir)/Ice/Buffer.h $(includedir)/Ice/StringConverter.h $(includedir)/IceUtil/Unicode.h
-TransceiverI$(OBJEXT): TransceiverI.cpp ../IceSSL/TransceiverI.h ../IceSSL/InstanceF.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h $(includedir)/IceSSL/Plugin.h $(includedir)/IceUtil/Time.h $(includedir)/Ice/Plugin.h $(includedir)/Ice/LocalObjectF.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/Ice/Proxy.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/LoggerF.h $(includedir)/Ice/BuiltinSequences.h $(includedir)/Ice/StatsF.h ../Ice/Transceiver.h ../Ice/TransceiverF.h ../Ice/Network.h $(includedir)/Ice/PropertiesF.h $(includedir)/Ice/Object.h $(includedir)/Ice/IncomingAsyncF.h $(includedir)/Ice/Protocol.h ../IceSSL/Instance.h ../IceSSL/UtilF.h $(includedir)/Ice/ProtocolPluginFacadeF.h ../IceSSL/TrustManagerF.h ../IceSSL/Util.h $(includedir)/Ice/Communicator.h $(includedir)/Ice/ObjectFactoryF.h $(includedir)/Ice/RouterF.h $(includedir)/Ice/LocatorF.h $(includedir)/Ice/PluginF.h $(includedir)/Ice/ImplicitContextF.h $(includedir)/Ice/LoggerUtil.h $(includedir)/Ice/Stats.h $(includedir)/Ice/Buffer.h $(includedir)/Ice/LocalException.h
+EndpointInfo$(OBJEXT): EndpointInfo.cpp $(includedir)/IceSSL/EndpointInfo.h $(includedir)/Ice/LocalObjectF.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/Ice/Proxy.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/Endpoint.h $(includedir)/Ice/BuiltinSequences.h $(includedir)/Ice/BasicStream.h $(includedir)/Ice/InstanceF.h $(includedir)/Ice/ObjectFactoryF.h $(includedir)/Ice/Buffer.h $(includedir)/Ice/Protocol.h $(includedir)/Ice/StringConverter.h $(includedir)/Ice/Plugin.h $(includedir)/Ice/LoggerF.h $(includedir)/IceUtil/Unicode.h $(includedir)/Ice/Object.h $(includedir)/Ice/IncomingAsyncF.h $(includedir)/IceUtil/Iterator.h $(includedir)/IceUtil/ScopedArray.h $(includedir)/IceUtil/DisableWarnings.h
+ConnectionInfo$(OBJEXT): ConnectionInfo.cpp $(includedir)/IceSSL/ConnectionInfo.h $(includedir)/Ice/LocalObjectF.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/Ice/Proxy.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/FactoryTableInit.h $(includedir)/Ice/FactoryTable.h $(includedir)/IceUtil/StaticMutex.h $(includedir)/Ice/UserExceptionFactoryF.h $(includedir)/Ice/ObjectFactoryF.h $(includedir)/Ice/Connection.h $(includedir)/Ice/Endpoint.h $(includedir)/Ice/BuiltinSequences.h $(includedir)/Ice/BasicStream.h $(includedir)/Ice/InstanceF.h $(includedir)/Ice/Buffer.h $(includedir)/Ice/Protocol.h $(includedir)/Ice/StringConverter.h $(includedir)/Ice/Plugin.h $(includedir)/Ice/LoggerF.h $(includedir)/IceUtil/Unicode.h $(includedir)/Ice/Object.h $(includedir)/Ice/IncomingAsyncF.h $(includedir)/IceUtil/Iterator.h $(includedir)/IceUtil/ScopedArray.h $(includedir)/IceUtil/DisableWarnings.h
+PluginI$(OBJEXT): PluginI.cpp ../IceSSL/PluginI.h $(includedir)/IceSSL/Plugin.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/Plugin.h $(includedir)/Ice/LocalObjectF.h $(includedir)/IceUtil/Shared.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/Ice/Proxy.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/LoggerF.h $(includedir)/Ice/BuiltinSequences.h ../IceSSL/InstanceF.h ../IceSSL/Instance.h ../IceSSL/UtilF.h ../Ice/Network.h $(includedir)/Ice/PropertiesF.h $(includedir)/Ice/Object.h $(includedir)/Ice/IncomingAsyncF.h $(includedir)/Ice/Protocol.h $(includedir)/Ice/ProtocolPluginFacadeF.h ../IceSSL/TrustManagerF.h ../IceSSL/TransceiverI.h $(includedir)/Ice/StatsF.h ../Ice/Transceiver.h ../Ice/TransceiverF.h $(includedir)/Ice/LocalException.h ../Ice/ConnectionI.h $(includedir)/IceUtil/Monitor.h $(includedir)/IceUtil/Cond.h $(includedir)/IceUtil/Timer.h $(includedir)/IceUtil/Thread.h $(includedir)/Ice/Connection.h $(includedir)/Ice/FactoryTableInit.h $(includedir)/Ice/FactoryTable.h $(includedir)/IceUtil/StaticMutex.h $(includedir)/Ice/UserExceptionFactoryF.h $(includedir)/Ice/ObjectFactoryF.h $(includedir)/Ice/Endpoint.h $(includedir)/Ice/ConnectionFactoryF.h $(includedir)/Ice/InstanceF.h $(includedir)/Ice/ServantManagerF.h ../Ice/ConnectorF.h ../Ice/TraceLevelsF.h ../Ice/EventHandler.h ../Ice/EventHandlerF.h ../Ice/ThreadPoolF.h $(includedir)/Ice/BasicStream.h $(includedir)/Ice/Buffer.h $(includedir)/Ice/StringConverter.h $(includedir)/IceUtil/Unicode.h
+TransceiverI$(OBJEXT): TransceiverI.cpp ../IceSSL/TransceiverI.h ../IceSSL/InstanceF.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h $(includedir)/IceSSL/Plugin.h $(includedir)/IceUtil/Time.h $(includedir)/Ice/Plugin.h $(includedir)/Ice/LocalObjectF.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/Ice/Proxy.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/LoggerF.h $(includedir)/Ice/BuiltinSequences.h $(includedir)/Ice/StatsF.h ../Ice/Transceiver.h ../Ice/TransceiverF.h ../Ice/Network.h $(includedir)/Ice/PropertiesF.h $(includedir)/Ice/Object.h $(includedir)/Ice/IncomingAsyncF.h $(includedir)/Ice/Protocol.h $(includedir)/IceSSL/Connection.h $(includedir)/Ice/FactoryTableInit.h $(includedir)/Ice/FactoryTable.h $(includedir)/IceUtil/StaticMutex.h $(includedir)/Ice/UserExceptionFactoryF.h $(includedir)/Ice/ObjectFactoryF.h $(includedir)/Ice/Connection.h $(includedir)/Ice/Endpoint.h ../IceSSL/Instance.h ../IceSSL/UtilF.h $(includedir)/Ice/ProtocolPluginFacadeF.h ../IceSSL/TrustManagerF.h ../IceSSL/Util.h $(includedir)/Ice/Communicator.h $(includedir)/Ice/RouterF.h $(includedir)/Ice/LocatorF.h $(includedir)/Ice/PluginF.h $(includedir)/Ice/ImplicitContextF.h $(includedir)/Ice/LoggerUtil.h $(includedir)/Ice/Stats.h $(includedir)/Ice/Buffer.h $(includedir)/Ice/LocalException.h
Util$(OBJEXT): Util.cpp ../IceSSL/Util.h ../IceSSL/UtilF.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h ../Ice/Network.h $(includedir)/Ice/PropertiesF.h $(includedir)/Ice/LocalObjectF.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/Ice/Proxy.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/Object.h $(includedir)/Ice/IncomingAsyncF.h $(includedir)/Ice/LoggerF.h $(includedir)/Ice/Protocol.h $(includedir)/IceSSL/Plugin.h $(includedir)/Ice/Plugin.h $(includedir)/Ice/BuiltinSequences.h $(includedir)/Ice/LocalException.h $(includedir)/IceUtil/DisableWarnings.h
RFC2253$(OBJEXT): RFC2253.cpp $(includedir)/IceSSL/Plugin.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/Plugin.h $(includedir)/Ice/LocalObjectF.h $(includedir)/IceUtil/Shared.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/Ice/Proxy.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/LoggerF.h $(includedir)/Ice/BuiltinSequences.h ../IceSSL/RFC2253.h
TrustManager$(OBJEXT): TrustManager.cpp ../IceSSL/TrustManager.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/LocalObjectF.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/Ice/UndefSysMacros.h ../IceSSL/TrustManagerF.h $(includedir)/IceSSL/Plugin.h $(includedir)/IceUtil/Time.h $(includedir)/Ice/Plugin.h $(includedir)/Ice/Proxy.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/LoggerF.h $(includedir)/Ice/BuiltinSequences.h ../IceSSL/RFC2253.h $(includedir)/Ice/Properties.h $(includedir)/Ice/Object.h $(includedir)/Ice/IncomingAsyncF.h $(includedir)/Ice/Outgoing.h $(includedir)/IceUtil/Monitor.h $(includedir)/IceUtil/Cond.h $(includedir)/Ice/InstanceF.h $(includedir)/Ice/BasicStream.h $(includedir)/Ice/ObjectFactoryF.h $(includedir)/Ice/Buffer.h $(includedir)/Ice/Protocol.h $(includedir)/Ice/StringConverter.h $(includedir)/IceUtil/Unicode.h $(includedir)/Ice/OutgoingAsync.h $(includedir)/IceUtil/Timer.h $(includedir)/IceUtil/Thread.h $(includedir)/Ice/Incoming.h $(includedir)/Ice/ServantLocatorF.h $(includedir)/Ice/ServantManagerF.h $(includedir)/Ice/Direct.h $(includedir)/Ice/Communicator.h $(includedir)/Ice/StatsF.h $(includedir)/Ice/PropertiesF.h $(includedir)/Ice/RouterF.h $(includedir)/Ice/LocatorF.h $(includedir)/Ice/PluginF.h $(includedir)/Ice/ImplicitContextF.h $(includedir)/Ice/LocalException.h $(includedir)/Ice/Logger.h $(includedir)/Ice/LoggerUtil.h ../Ice/Network.h
-Endpoint.cpp: $(slicedir)/IceSSL/Endpoint.ice $(slicedir)/Ice/Endpoint.ice $(slicedir)/Ice/BuiltinSequences.ice $(slicedir)/Ice/EndpointF.ice
-../../../slice/IceSSL/Endpoint.ice: $(SLICE2CPP) $(SLICEPARSERLIB)
+EndpointInfo.cpp: $(slicedir)/IceSSL/EndpointInfo.ice $(slicedir)/Ice/Endpoint.ice $(slicedir)/Ice/BuiltinSequences.ice $(slicedir)/Ice/EndpointF.ice
+ConnectionInfo.cpp: $(slicedir)/IceSSL/ConnectionInfo.ice $(slicedir)/Ice/Connection.ice $(slicedir)/Ice/ObjectAdapterF.ice $(slicedir)/Ice/Identity.ice $(slicedir)/Ice/Endpoint.ice $(slicedir)/Ice/BuiltinSequences.ice $(slicedir)/Ice/EndpointF.ice
+../../../slice/IceSSL/EndpointInfo.ice: $(SLICE2CPP) $(SLICEPARSERLIB)
+../../../slice/IceSSL/ConnectionInfo.ice: $(SLICE2CPP) $(SLICEPARSERLIB)
diff --git a/cpp/src/IceSSL/EndpointI.cpp b/cpp/src/IceSSL/EndpointI.cpp
index f8966c7e172..c21db89353c 100644
--- a/cpp/src/IceSSL/EndpointI.cpp
+++ b/cpp/src/IceSSL/EndpointI.cpp
@@ -226,6 +226,40 @@ IceSSL::EndpointI::toString() const
return s.str();
}
+Ice::EndpointInfoPtr
+IceSSL::EndpointI::getInfo() const
+{
+ class InfoI : public IceSSL::SSLEndpointInfo
+ {
+ public:
+
+ InfoI(Ice::Int to, bool comp, const string& host, Ice::Int port) :
+ SSLEndpointInfo(to, comp, host, port)
+ {
+ }
+
+ virtual Ice::Short
+ type() const
+ {
+ return EndpointType;
+ }
+
+ virtual bool
+ datagram() const
+ {
+ return false;
+ }
+
+ virtual bool
+ secure() const
+ {
+ return true;
+ }
+ };
+
+ return new InfoI(_timeout, _compress, _host, _port);
+}
+
Short
IceSSL::EndpointI::type() const
{
@@ -295,18 +329,6 @@ IceSSL::EndpointI::secure() const
return true;
}
-string
-IceSSL::EndpointI::host() const
-{
- return _host;
-}
-
-Ice::Int
-IceSSL::EndpointI::port() const
-{
- return _port;
-}
-
IceInternal::TransceiverPtr
IceSSL::EndpointI::transceiver(IceInternal::EndpointIPtr& endp) const
{
diff --git a/cpp/src/IceSSL/EndpointI.h b/cpp/src/IceSSL/EndpointI.h
index 82a0e5efce8..61f1751d48c 100644
--- a/cpp/src/IceSSL/EndpointI.h
+++ b/cpp/src/IceSSL/EndpointI.h
@@ -12,15 +12,15 @@
#include <Ice/EndpointI.h>
#include <Ice/EndpointFactory.h>
-#include <IceSSL/Endpoint.h>
#include <IceSSL/InstanceF.h>
+#include <IceSSL/EndpointInfo.h>
namespace IceSSL
{
const Ice::Short EndpointType = 2;
-class EndpointI : public IceInternal::EndpointI, public SslEndpoint
+class EndpointI : public IceInternal::EndpointI
{
public:
@@ -28,21 +28,17 @@ public:
EndpointI(const InstancePtr&, const std::string&, bool);
EndpointI(const InstancePtr&, IceInternal::BasicStream*);
- // From SslEndpoint
- virtual std::string toString() const;
- virtual Ice::Int timeout() const;
- virtual bool compress() const;
- virtual bool datagram() const;
- virtual bool secure() const;
- virtual std::string host() const;
- virtual Ice::Int port() const;
-
- // From IceInternal::EndpointI
virtual void streamWrite(IceInternal::BasicStream*) const;
+ virtual std::string toString() const;
+ virtual Ice::EndpointInfoPtr getInfo() const;
virtual Ice::Short type() const;
+ virtual Ice::Int timeout() const;
virtual IceInternal::EndpointIPtr timeout(Ice::Int) const;
virtual IceInternal::EndpointIPtr connectionId(const ::std::string&) const;
+ virtual bool compress() const;
virtual IceInternal::EndpointIPtr compress(bool) const;
+ virtual bool datagram() const;
+ virtual bool secure() const;
virtual IceInternal::TransceiverPtr transceiver(IceInternal::EndpointIPtr&) const;
virtual std::vector<IceInternal::ConnectorPtr> connectors() const;
virtual void connectors_async(const IceInternal::EndpointI_connectorsPtr&) const;
diff --git a/cpp/src/IceSSL/Makefile b/cpp/src/IceSSL/Makefile
index 3bce8cbc258..8f4972096cb 100644
--- a/cpp/src/IceSSL/Makefile
+++ b/cpp/src/IceSSL/Makefile
@@ -1,3 +1,4 @@
+
# **********************************************************************
#
# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
@@ -18,7 +19,8 @@ TARGETS = $(call mklibtargets,$(libdir)/$(LIBFILENAME),$(libdir)/$(SONAME),$(li
OBJS = AcceptorI.o \
Certificate.o \
ConnectorI.o \
- Endpoint.o \
+ EndpointInfo.o \
+ ConnectionInfo.o \
EndpointI.o \
Instance.o \
PluginI.o \
@@ -29,7 +31,8 @@ OBJS = AcceptorI.o \
SRCS = $(OBJS:.o=.cpp)
-SLICE_SRCS = $(SDIR)/Endpoint.ice
+SLICE_SRCS = $(SDIR)/EndpointInfo.ice \
+ $(SDIR)/ConnectionInfo.ice
HDIR = $(headerdir)/IceSSL
SDIR = $(slicedir)/IceSSL
diff --git a/cpp/src/IceSSL/PluginI.cpp b/cpp/src/IceSSL/PluginI.cpp
index e06cdb2eec9..67bf827d37e 100644
--- a/cpp/src/IceSSL/PluginI.cpp
+++ b/cpp/src/IceSSL/PluginI.cpp
@@ -108,7 +108,7 @@ ConnectionInvalidException::ice_throw() const
throw *this;
}
-ConnectionInfo
+IceSSL::ConnectionInfo
IceSSL::getConnectionInfo(const ConnectionPtr& connection)
{
Ice::ConnectionIPtr con = Ice::ConnectionIPtr::dynamicCast(connection);
diff --git a/cpp/src/IceSSL/TransceiverI.cpp b/cpp/src/IceSSL/TransceiverI.cpp
index f2fc567e1e8..28f59e93756 100644
--- a/cpp/src/IceSSL/TransceiverI.cpp
+++ b/cpp/src/IceSSL/TransceiverI.cpp
@@ -8,6 +8,7 @@
// **********************************************************************
#include <IceSSL/TransceiverI.h>
+#include <IceSSL/ConnectionInfo.h>
#include <IceSSL/Instance.h>
#include <IceSSL/Util.h>
#include <Ice/Communicator.h>
@@ -777,6 +778,50 @@ IceSSL::TransceiverI::toString() const
return _desc;
}
+Ice::ConnectionInfoPtr
+IceSSL::TransceiverI::getInfo() const
+{
+ assert(_fd != INVALID_SOCKET && _ssl != 0);
+
+ SSLConnectionInfoPtr info = new SSLConnectionInfo();
+ IceInternal::fdToAddressAndPort(_fd, info->localAddress, info->localPort, info->remoteAddress, info->remotePort);
+
+ //
+ // On the client side, SSL_get_peer_cert_chain returns the entire chain of certs.
+ // On the server side, the peer certificate must be obtained separately.
+ //
+ // Since we have no clear idea whether the connection is server or client side,
+ // the peer certificate is obtained separately and compared against the first
+ // certificate in the chain. If they are not the same, it is added to the chain.
+ //
+ X509* cert = SSL_get_peer_certificate(_ssl);
+ STACK_OF(X509)* chain = SSL_get_peer_cert_chain(_ssl);
+ if(cert != 0 && (chain == 0 || sk_X509_num(chain) == 0 || cert != sk_X509_value(chain, 0)))
+ {
+ CertificatePtr certificate = new Certificate(cert);
+ info->certs.push_back(certificate->encode());
+ }
+ else
+ {
+ X509_free(cert);
+ }
+
+ if(chain != 0)
+ {
+ for(int i = 0; i < sk_X509_num(chain); ++i)
+ {
+ //
+ // Duplicate the certificate since the stack comes straight from the SSL connection.
+ //
+ CertificatePtr certificate = new Certificate(X509_dup(sk_X509_value(chain, i)));
+ info->certs.push_back(certificate->encode());
+ }
+ }
+
+ info->cipher = SSL_get_cipher_name(_ssl); // Nothing needs to be free'd.
+ return info;
+}
+
void
IceSSL::TransceiverI::checkSendSize(const IceInternal::Buffer& buf, size_t messageSizeMax)
{
@@ -786,7 +831,7 @@ IceSSL::TransceiverI::checkSendSize(const IceInternal::Buffer& buf, size_t messa
}
}
-ConnectionInfo
+IceSSL::ConnectionInfo
IceSSL::TransceiverI::getConnectionInfo() const
{
//
diff --git a/cpp/src/IceSSL/TransceiverI.h b/cpp/src/IceSSL/TransceiverI.h
index f66a8b4ccb0..f852d7df7c6 100644
--- a/cpp/src/IceSSL/TransceiverI.h
+++ b/cpp/src/IceSSL/TransceiverI.h
@@ -55,6 +55,7 @@ public:
#endif
virtual std::string type() const;
virtual std::string toString() const;
+ virtual Ice::ConnectionInfoPtr getInfo() const;
virtual void checkSendSize(const IceInternal::Buffer&, size_t);
ConnectionInfo getConnectionInfo() const;
diff --git a/cpp/src/IceSSL/Util.cpp b/cpp/src/IceSSL/Util.cpp
index 9881cd3cb66..e472d1f2e4e 100644
--- a/cpp/src/IceSSL/Util.cpp
+++ b/cpp/src/IceSSL/Util.cpp
@@ -317,7 +317,7 @@ IceSSL::checkPath(string& path, const string& defaultDir, bool dir)
return false;
}
-ConnectionInfo
+IceSSL::ConnectionInfo
IceSSL::populateConnectionInfo(SSL* ssl, SOCKET fd, const string& adapterName, bool incoming)
{
ConnectionInfo info;
diff --git a/cpp/test/Ice/background/EndpointI.cpp b/cpp/test/Ice/background/EndpointI.cpp
index 78c9b704d4d..dace5979f6c 100644
--- a/cpp/test/Ice/background/EndpointI.cpp
+++ b/cpp/test/Ice/background/EndpointI.cpp
@@ -218,6 +218,12 @@ EndpointI::toString() const
return "test-" + _endpoint->toString();
}
+Ice::EndpointInfoPtr
+EndpointI::getInfo() const
+{
+ return _endpoint->getInfo();
+}
+
bool
EndpointI::operator==(const IceInternal::EndpointI& r) const
{
diff --git a/cpp/test/Ice/background/EndpointI.h b/cpp/test/Ice/background/EndpointI.h
index de5b2bfe5d9..0a75031e14f 100644
--- a/cpp/test/Ice/background/EndpointI.h
+++ b/cpp/test/Ice/background/EndpointI.h
@@ -14,7 +14,7 @@
#include <Test.h>
#include <Configuration.h>
-class EndpointI : public IceInternal::EndpointI, public Test::TestEndpoint
+class EndpointI : public IceInternal::EndpointI
{
public:
@@ -35,6 +35,7 @@ public:
// From TestEndpoint
virtual std::string toString() const;
+ virtual Ice::EndpointInfoPtr getInfo() const;
virtual Ice::Int timeout() const;
virtual bool compress() const;
virtual bool datagram() const;
diff --git a/cpp/test/Ice/background/Test.ice b/cpp/test/Ice/background/Test.ice
index 0e340a03696..8969c7e04dd 100644
--- a/cpp/test/Ice/background/Test.ice
+++ b/cpp/test/Ice/background/Test.ice
@@ -16,10 +16,6 @@
module Test
{
-local interface TestEndpoint extends Ice::Endpoint
-{
-};
-
interface Background
{
["ami"] void op();
diff --git a/cpp/test/Ice/background/Transceiver.cpp b/cpp/test/Ice/background/Transceiver.cpp
index 4581edafb20..3112d58c85a 100644
--- a/cpp/test/Ice/background/Transceiver.cpp
+++ b/cpp/test/Ice/background/Transceiver.cpp
@@ -141,6 +141,12 @@ Transceiver::toString() const
return _transceiver->toString();
}
+Ice::ConnectionInfoPtr
+Transceiver::getInfo() const
+{
+ return _transceiver->getInfo();
+}
+
void
Transceiver::checkSendSize(const IceInternal::Buffer& buf, size_t messageSizeMax)
{
diff --git a/cpp/test/Ice/background/Transceiver.h b/cpp/test/Ice/background/Transceiver.h
index e7cc1d307ce..a332b84b1e4 100644
--- a/cpp/test/Ice/background/Transceiver.h
+++ b/cpp/test/Ice/background/Transceiver.h
@@ -30,6 +30,7 @@ public:
#endif
virtual std::string type() const;
virtual std::string toString() const;
+ virtual Ice::ConnectionInfoPtr getInfo() const;
virtual IceInternal::SocketOperation initialize();
virtual void checkSendSize(const IceInternal::Buffer&, size_t);
diff --git a/cpp/test/Ice/proxy/AllTests.cpp b/cpp/test/Ice/proxy/AllTests.cpp
index d1281280afe..59b8ebcf246 100644
--- a/cpp/test/Ice/proxy/AllTests.cpp
+++ b/cpp/test/Ice/proxy/AllTests.cpp
@@ -717,23 +717,23 @@ allTests(const Ice::CommunicatorPtr& communicator)
p1 = communicator->stringToProxy("test -t:tcp -h tcphost -p 10000 -t 1200 -z:udp -h udphost -p 10001 --interface eth0 --ttl 5:opaque -t 100 -v ABCD");
Ice::EndpointSeq endps = p1->ice_getEndpoints();
- Ice::TcpEndpointPtr tcpEndpoint = dynamic_cast<Ice::TcpEndpoint*>(endps[0].get());
+ Ice::TcpEndpointInfoPtr tcpEndpoint = Ice::TcpEndpointInfoPtr::dynamicCast(endps[0]->getInfo());
test(tcpEndpoint);
- test(tcpEndpoint->host() == "tcphost");
- test(tcpEndpoint->port() == 10000);
- test(tcpEndpoint->timeout() == 1200);
- test(tcpEndpoint->compress());
+ test(tcpEndpoint->host == "tcphost");
+ test(tcpEndpoint->port == 10000);
+ test(tcpEndpoint->timeout == 1200);
+ test(tcpEndpoint->compress);
- Ice::UdpEndpointPtr udpEndpoint = dynamic_cast<Ice::UdpEndpoint*>(endps[1].get());
+ Ice::UdpEndpointInfoPtr udpEndpoint = Ice::UdpEndpointInfoPtr::dynamicCast(endps[1]->getInfo());
test(udpEndpoint);
- test(udpEndpoint->host() == "udphost");
- test(udpEndpoint->port() == 10001);
- test(udpEndpoint->mcastInterface() == "eth0");
- test(udpEndpoint->mcastTtl() == 5);
- test(udpEndpoint->timeout() == -1);
- test(!udpEndpoint->compress());
-
- Ice::OpaqueEndpointPtr opaqueEndpoint = dynamic_cast<Ice::OpaqueEndpoint*>(endps[2].get());
+ test(udpEndpoint->host == "udphost");
+ test(udpEndpoint->port == 10001);
+ test(udpEndpoint->mcastInterface == "eth0");
+ test(udpEndpoint->mcastTtl == 5);
+ test(udpEndpoint->timeout == -1);
+ test(!udpEndpoint->compress);
+
+ Ice::OpaqueEndpointInfoPtr opaqueEndpoint = Ice::OpaqueEndpointInfoPtr::dynamicCast(endps[2]->getInfo());
test(opaqueEndpoint);
cout << "ok" << endl;
diff --git a/cs/src/Ice/ConnectionI.cs b/cs/src/Ice/ConnectionI.cs
index f319ab1295d..1219bb28080 100644
--- a/cs/src/Ice/ConnectionI.cs
+++ b/cs/src/Ice/ConnectionI.cs
@@ -1371,6 +1371,19 @@ namespace Ice
return _endpoint.timeout(); // No mutex protection necessary, _endpoint is immutable.
}
+ public ConnectionInfo
+ getInfo()
+ {
+ lock(this)
+ {
+ if(_exception != null)
+ {
+ throw _exception;
+ }
+ return _transceiver.getInfo();
+ }
+ }
+
//
// Only used by the SSL plug-in.
//
diff --git a/cs/src/Ice/EndpointI.cs b/cs/src/Ice/EndpointI.cs
index 9a7c7eb7490..bfba1fee492 100644
--- a/cs/src/Ice/EndpointI.cs
+++ b/cs/src/Ice/EndpointI.cs
@@ -28,6 +28,7 @@ namespace IceInternal
}
public abstract string ice_toString_();
+ public abstract Ice.EndpointInfo getInfo();
public abstract int CompareTo(object obj);
//
diff --git a/cs/src/Ice/OpaqueEndpointI.cs b/cs/src/Ice/OpaqueEndpointI.cs
index 276367f15a0..b1cf9821492 100644
--- a/cs/src/Ice/OpaqueEndpointI.cs
+++ b/cs/src/Ice/OpaqueEndpointI.cs
@@ -13,7 +13,7 @@ namespace IceInternal
using System.Collections;
using System.Collections.Generic;
- sealed class OpaqueEndpointI : EndpointI, Ice.OpaqueEndpoint
+ sealed class OpaqueEndpointI : EndpointI
{
public OpaqueEndpointI(string str)
{
@@ -136,6 +136,39 @@ namespace IceInternal
return "opaque -t " + _type + " -v " + val;
}
+ private sealed class InfoI : Ice.OpaqueEndpointInfo
+ {
+ public InfoI(short type, byte[] rawBytes) : base(-1, false, rawBytes)
+ {
+ _type = type;
+ }
+
+ override public short type()
+ {
+ return _type;
+ }
+
+ override public bool datagram()
+ {
+ return false;
+ }
+
+ override public bool secure()
+ {
+ return false;
+ }
+
+ private readonly short _type;
+ };
+
+ //
+ // Return the endpoint information.
+ //
+ public override Ice.EndpointInfo getInfo()
+ {
+ return new InfoI(_type, _rawBytes);
+ }
+
//
// Return the endpoint type
//
diff --git a/cs/src/Ice/Reference.cs b/cs/src/Ice/Reference.cs
index 725f8b7faba..b4b44c69dac 100644
--- a/cs/src/Ice/Reference.cs
+++ b/cs/src/Ice/Reference.cs
@@ -1323,7 +1323,7 @@ namespace IceInternal
//
for(int i = 0; i < allEndpoints.Length; i++)
{
- if(!(allEndpoints[i] is Ice.OpaqueEndpoint))
+ if(!(allEndpoints[i] is IceInternal.OpaqueEndpointI))
{
endpoints.Add(allEndpoints[i]);
}
diff --git a/cs/src/Ice/TcpEndpointI.cs b/cs/src/Ice/TcpEndpointI.cs
index 2adf1bd2ba9..26e5fd1de8e 100644
--- a/cs/src/Ice/TcpEndpointI.cs
+++ b/cs/src/Ice/TcpEndpointI.cs
@@ -13,7 +13,7 @@ namespace IceInternal
using System.Collections.Generic;
using System.Net;
- sealed class TcpEndpointI : EndpointI, Ice.TcpEndpoint
+ sealed class TcpEndpointI : EndpointI
{
internal const short TYPE = 1;
@@ -247,6 +247,36 @@ namespace IceInternal
return s;
}
+ private sealed class InfoI : Ice.TcpEndpointInfo
+ {
+ public InfoI(int to, bool comp, string host, int port) : base(to, comp, host, port)
+ {
+ }
+
+ override public short type()
+ {
+ return TYPE;
+ }
+
+ override public bool datagram()
+ {
+ return false;
+ }
+
+ override public bool secure()
+ {
+ return false;
+ }
+ };
+
+ //
+ // Return the endpoint information.
+ //
+ public override Ice.EndpointInfo getInfo()
+ {
+ return new InfoI(_timeout, _compress, _host, _port);
+ }
+
//
// Return the endpoint type
//
@@ -339,22 +369,6 @@ namespace IceInternal
}
//
- // Get the host name.
- //
- public string host()
- {
- return _host;
- }
-
- //
- // Get the port number.
- //
- public int port()
- {
- return _port;
- }
-
- //
// Return a server side transceiver for this endpoint, or null if a
// transceiver can only be created by an acceptor. In case a
// transceiver is created, this operation also returns a new
diff --git a/cs/src/Ice/TcpTransceiver.cs b/cs/src/Ice/TcpTransceiver.cs
index 3ec30a7a579..64e3f91bae5 100644
--- a/cs/src/Ice/TcpTransceiver.cs
+++ b/cs/src/Ice/TcpTransceiver.cs
@@ -419,6 +419,28 @@ namespace IceInternal
return "tcp";
}
+ public Ice.ConnectionInfo
+ getInfo()
+ {
+ Debug.Assert(_fd != null);
+ Ice.TcpConnectionInfo info = new Ice.TcpConnectionInfo();
+ IPEndPoint localEndpoint = Network.getLocalAddress(_fd);
+ info.localAddress = localEndpoint.Address.ToString();
+ info.localPort = localEndpoint.Port;
+ IPEndPoint remoteEndpoint = Network.getLocalAddress(_fd);
+ if(remoteEndpoint != null)
+ {
+ info.remoteAddress = remoteEndpoint.Address.ToString();
+ info.remotePort = remoteEndpoint.Port;
+ }
+ else
+ {
+ info.remoteAddress = "";
+ info.remotePort = -1;
+ }
+ return info;
+ }
+
public void checkSendSize(Buffer buf, int messageSizeMax)
{
if(buf.size() > messageSizeMax)
diff --git a/cs/src/Ice/Transceiver.cs b/cs/src/Ice/Transceiver.cs
index 9697c46924e..6f1a50b3555 100644
--- a/cs/src/Ice/Transceiver.cs
+++ b/cs/src/Ice/Transceiver.cs
@@ -64,6 +64,7 @@ namespace IceInternal
void finishWrite(Buffer buf);
string type();
+ Ice.ConnectionInfo getInfo();
void checkSendSize(Buffer buf, int messageSizeMax);
}
diff --git a/cs/src/Ice/UdpEndpointI.cs b/cs/src/Ice/UdpEndpointI.cs
index e80c6853349..c584901ea25 100644
--- a/cs/src/Ice/UdpEndpointI.cs
+++ b/cs/src/Ice/UdpEndpointI.cs
@@ -15,7 +15,7 @@ namespace IceInternal
using System.Collections.Generic;
using System.Net;
- sealed class UdpEndpointI : EndpointI, Ice.UdpEndpoint
+ sealed class UdpEndpointI : EndpointI
{
internal const short TYPE = 3;
@@ -467,6 +467,40 @@ namespace IceInternal
return s;
}
+ private sealed class InfoI : Ice.UdpEndpointInfo
+ {
+ public InfoI(bool comp, string host, int port, byte protocolMajor, byte protocolMinor,
+ byte encodingMajor, byte encodingMinor, string mcastInterface, int mcastTtl) :
+ base(-1, comp, host, port, protocolMajor, protocolMinor, encodingMajor, encodingMinor, mcastInterface,
+ mcastTtl)
+ {
+ }
+
+ override public short type()
+ {
+ return TYPE;
+ }
+
+ override public bool datagram()
+ {
+ return true;
+ }
+
+ override public bool secure()
+ {
+ return false;
+ }
+ };
+
+ //
+ // Return the endpoint information.
+ //
+ public override Ice.EndpointInfo getInfo()
+ {
+ return new InfoI(_compress, _host, _port, _protocolMajor, _protocolMinor, _encodingMajor,
+ _encodingMinor, _mcastInterface, _mcastTtl);
+ }
+
//
// Return the endpoint type
//
@@ -556,38 +590,6 @@ namespace IceInternal
}
//
- // Get the host name.
- //
- public string host()
- {
- return _host;
- }
-
- //
- // Get the port number.
- //
- public int port()
- {
- return _port;
- }
-
- //
- // Get the multicast interface.
- //
- public string mcastInterface()
- {
- return _mcastInterface;
- }
-
- //
- // Get the multicast time-to-live.
- //
- public int mcastTtl()
- {
- return _mcastTtl;
- }
-
- //
// Return a server side transceiver for this endpoint, or null if a
// transceiver can only be created by an acceptor. In case a
// transceiver is created, this operation also returns a new
diff --git a/cs/src/Ice/UdpTransceiver.cs b/cs/src/Ice/UdpTransceiver.cs
index 808b7bf4f95..69ce6b9ed00 100644
--- a/cs/src/Ice/UdpTransceiver.cs
+++ b/cs/src/Ice/UdpTransceiver.cs
@@ -544,6 +544,38 @@ namespace IceInternal
return "udp";
}
+ public Ice.ConnectionInfo
+ getInfo()
+ {
+ Debug.Assert(_fd != null);
+ Ice.UdpConnectionInfo info = new Ice.UdpConnectionInfo();
+ IPEndPoint localEndpoint = Network.getLocalAddress(_fd);
+ info.localAddress = localEndpoint.Address.ToString();
+ info.localPort = localEndpoint.Port;
+ IPEndPoint remoteEndpoint = Network.getLocalAddress(_fd);
+ if(remoteEndpoint != null)
+ {
+ info.remoteAddress = remoteEndpoint.Address.ToString();
+ info.remotePort = remoteEndpoint.Port;
+ }
+ else
+ {
+ info.remoteAddress = "";
+ info.remotePort = -1;
+ }
+ if(_mcastAddr != null)
+ {
+ info.mcastAddress = _mcastAddr.Address.ToString();
+ info.mcastPort = _mcastAddr.Port;
+ }
+ else
+ {
+ info.mcastAddress = "";
+ info.mcastPort = -1;
+ }
+ return info;
+ }
+
public void checkSendSize(Buffer buf, int messageSizeMax)
{
if(buf.size() > messageSizeMax)
diff --git a/cs/src/IceSSL/EndpointI.cs b/cs/src/IceSSL/EndpointI.cs
index 2a3da0496e2..6b01a4ce357 100644
--- a/cs/src/IceSSL/EndpointI.cs
+++ b/cs/src/IceSSL/EndpointI.cs
@@ -13,7 +13,7 @@ namespace IceSSL
using System.Collections.Generic;
using System.Net;
- sealed class EndpointI : IceInternal.EndpointI, SslEndpoint
+ sealed class EndpointI : IceInternal.EndpointI
{
internal const short TYPE = 2;
@@ -245,6 +245,36 @@ namespace IceSSL
}
return s;
}
+
+ private sealed class InfoI : IceSSL.SSLEndpointInfo
+ {
+ public InfoI(int to, bool comp, string host, int port) : base(to, comp, host, port)
+ {
+ }
+
+ override public short type()
+ {
+ return TYPE;
+ }
+
+ override public bool datagram()
+ {
+ return false;
+ }
+
+ override public bool secure()
+ {
+ return true;
+ }
+ };
+
+ //
+ // Return the endpoint information.
+ //
+ public override Ice.EndpointInfo getInfo()
+ {
+ return new InfoI(_timeout, _compress, _host, _port);
+ }
//
// Return the endpoint type.
@@ -338,22 +368,6 @@ namespace IceSSL
}
//
- // Get the host name.
- //
- public string host()
- {
- return _host;
- }
-
- //
- // Get the port number.
- //
- public int port()
- {
- return _port;
- }
-
- //
// Return a server side transceiver for this endpoint, or null if a
// transceiver can only be created by an acceptor. In case a
// transceiver is created, this operation also returns a new
diff --git a/cs/src/IceSSL/Makefile b/cs/src/IceSSL/Makefile
index 81d6f486f33..ba70ce6b84a 100644
--- a/cs/src/IceSSL/Makefile
+++ b/cs/src/IceSSL/Makefile
@@ -26,7 +26,8 @@ SRCS = AcceptorI.cs \
TrustManager.cs \
Util.cs
-SLICE_SRCS = $(SDIR)/Endpoint.ice
+SLICE_SRCS = $(SDIR)/EndpointInfo.ice \
+ $(SDIR)/ConnectionInfo.ice
SDIR = $(slicedir)/IceSSL
GDIR = generated
diff --git a/cs/src/IceSSL/Makefile.mak b/cs/src/IceSSL/Makefile.mak
index a9d559831af..c36fd6cf093 100644
--- a/cs/src/IceSSL/Makefile.mak
+++ b/cs/src/IceSSL/Makefile.mak
@@ -26,7 +26,8 @@ SRCS = AcceptorI.cs \
TrustManager.cs \
Util.cs
-GEN_SRCS = $(GDIR)\Endpoint.cs
+GEN_SRCS = $(GDIR)\EndpointInfo.cs \
+ $(GDIR)\ConnectionInfo.cs
SDIR = $(slicedir)\IceSSL
GDIR = generated
diff --git a/cs/src/IceSSL/TransceiverI.cs b/cs/src/IceSSL/TransceiverI.cs
index a131b40358c..5a0435eff45 100644
--- a/cs/src/IceSSL/TransceiverI.cs
+++ b/cs/src/IceSSL/TransceiverI.cs
@@ -12,6 +12,7 @@ namespace IceSSL
using System;
using System.ComponentModel;
using System.Diagnostics;
+ using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Net.Security;
@@ -19,6 +20,7 @@ namespace IceSSL
using System.Security.Authentication;
using System.Security.Cryptography.X509Certificates;
using System.Threading;
+ using System.Text;
sealed class TransceiverI : IceInternal.Transceiver
{
@@ -348,6 +350,38 @@ namespace IceSSL
return "ssl";
}
+ public Ice.ConnectionInfo getInfo()
+ {
+ Debug.Assert(_fd != null && _stream != null);
+ IceSSL.SSLConnectionInfo info = new IceSSL.SSLConnectionInfo();
+ IPEndPoint localEndpoint = IceInternal.Network.getLocalAddress(_fd);
+ info.localAddress = localEndpoint.Address.ToString();
+ info.localPort = localEndpoint.Port;
+ IPEndPoint remoteEndpoint = IceInternal.Network.getLocalAddress(_fd);
+ if(remoteEndpoint != null)
+ {
+ info.remoteAddress = remoteEndpoint.Address.ToString();
+ info.remotePort = remoteEndpoint.Port;
+ }
+ else
+ {
+ info.remoteAddress = "";
+ info.remotePort = -1;
+ }
+ info.cipher = _stream.CipherAlgorithm.ToString();
+ List<string> certs = new List<string>();
+ foreach(X509Certificate2 cert in _chain)
+ {
+ StringBuilder s = new StringBuilder();
+ s.Append("-----BEGIN CERTIFICATE-----\n");
+ s.Append(Convert.ToBase64String(cert.Export(X509ContentType.Cert)));
+ s.Append("\n-----END CERTIFICATE-----");
+ certs.Add(s.ToString());
+ }
+ info.certs = certs.ToArray();
+ return info;
+ }
+
public void checkSendSize(IceInternal.Buffer buf, int messageSizeMax)
{
if(buf.size() > messageSizeMax)
diff --git a/cs/test/Ice/background/EndpointI.cs b/cs/test/Ice/background/EndpointI.cs
index f97c3f8d1cb..b097b0c1d81 100644
--- a/cs/test/Ice/background/EndpointI.cs
+++ b/cs/test/Ice/background/EndpointI.cs
@@ -10,7 +10,7 @@
using System.Collections.Generic;
using System.Diagnostics;
-internal class EndpointI : IceInternal.EndpointI, Test.TestEndpoint
+internal class EndpointI : IceInternal.EndpointI
{
internal static short TYPE_BASE = 100;
@@ -37,6 +37,11 @@ internal class EndpointI : IceInternal.EndpointI, Test.TestEndpoint
return "test-" + _endpoint.ToString();
}
+ public override Ice.EndpointInfo getInfo()
+ {
+ return _endpoint.getInfo();
+ }
+
//
// Return the endpoint type
//
diff --git a/cs/test/Ice/background/Test.ice b/cs/test/Ice/background/Test.ice
index c0f9fa296f8..93d42454edf 100644
--- a/cs/test/Ice/background/Test.ice
+++ b/cs/test/Ice/background/Test.ice
@@ -11,7 +11,6 @@
#define TEST_ICE
#include <Ice/BuiltinSequences.ice>
-#include <Ice/Endpoint.ice>
module Test
{
@@ -41,11 +40,6 @@ interface BackgroundController
void writeException(bool enable);
};
-local interface TestEndpoint extends Ice::Endpoint
-{
-};
-
-
};
#endif
diff --git a/cs/test/Ice/background/Transceiver.cs b/cs/test/Ice/background/Transceiver.cs
index 6277667039c..54e4f8b950d 100644
--- a/cs/test/Ice/background/Transceiver.cs
+++ b/cs/test/Ice/background/Transceiver.cs
@@ -96,6 +96,11 @@ internal class Transceiver : IceInternal.Transceiver
return "test-" + _transceiver.type();
}
+ public Ice.ConnectionInfo getInfo()
+ {
+ return _transceiver.getInfo();
+ }
+
public override string ToString()
{
return _transceiver.ToString();
diff --git a/cs/test/Ice/proxy/AllTests.cs b/cs/test/Ice/proxy/AllTests.cs
index 91001e2a6cd..8b2361114f7 100644
--- a/cs/test/Ice/proxy/AllTests.cs
+++ b/cs/test/Ice/proxy/AllTests.cs
@@ -638,23 +638,23 @@ public class AllTests
p1 = communicator.stringToProxy("test -t:tcp -h tcphost -p 10000 -t 1200 -z:udp -h udphost -p 10001 --interface eth0 --ttl 5:opaque -t 100 -v ABCD");
Ice.Endpoint[] endps = p1.ice_getEndpoints();
- test(endps[0] is Ice.TcpEndpoint);
- Ice.TcpEndpoint tcpEndpoint = (Ice.TcpEndpoint)endps[0];
- test(tcpEndpoint.host() == "tcphost");
- test(tcpEndpoint.port() == 10000);
- test(tcpEndpoint.timeout() == 1200);
- test(tcpEndpoint.compress());
-
- test(endps[1] is Ice.UdpEndpoint);
- Ice.UdpEndpoint udpEndpoint = (Ice.UdpEndpoint)endps[1];
- test(udpEndpoint.host() == "udphost");
- test(udpEndpoint.port() == 10001);
- test(udpEndpoint.mcastInterface() == "eth0");
- test(udpEndpoint.mcastTtl() == 5);
- test(udpEndpoint.timeout() == -1);
- test(!udpEndpoint.compress());
-
- test(endps[2] is Ice.OpaqueEndpoint);
+ test(endps[0].getInfo() is Ice.TcpEndpointInfo);
+ Ice.TcpEndpointInfo tcpEndpoint = (Ice.TcpEndpointInfo)endps[0].getInfo();
+ test(tcpEndpoint.host == "tcphost");
+ test(tcpEndpoint.port == 10000);
+ test(tcpEndpoint.timeout == 1200);
+ test(tcpEndpoint.compress);
+
+ test(endps[1].getInfo() is Ice.UdpEndpointInfo);
+ Ice.UdpEndpointInfo udpEndpoint = (Ice.UdpEndpointInfo)endps[1].getInfo();
+ test(udpEndpoint.host == "udphost");
+ test(udpEndpoint.port == 10001);
+ test(udpEndpoint.mcastInterface == "eth0");
+ test(udpEndpoint.mcastTtl == 5);
+ test(udpEndpoint.timeout == -1);
+ test(!udpEndpoint.compress);
+
+ test(endps[2].getInfo() is Ice.OpaqueEndpointInfo);
Console.Out.WriteLine("ok");
diff --git a/java/build.xml b/java/build.xml
index b8125bb6586..63baedf8144 100644
--- a/java/build.xml
+++ b/java/build.xml
@@ -115,7 +115,8 @@
<pathelement path="${slice.dir}" />
</includepath>
<fileset dir="${slice.dir}/IceSSL">
- <include name="Endpoint.ice" />
+ <include name="EndpointInfo.ice" />
+ <include name="ConnectionInfo.ice" />
</fileset>
</slice2java>
diff --git a/java/src/Ice/ConnectionI.java b/java/src/Ice/ConnectionI.java
index 87ae7165e24..88ff87fa40b 100644
--- a/java/src/Ice/ConnectionI.java
+++ b/java/src/Ice/ConnectionI.java
@@ -1239,6 +1239,16 @@ public final class ConnectionI extends IceInternal.EventHandler implements Conne
return _endpoint.timeout(); // No mutex protection necessary, _endpoint is immutable.
}
+ public synchronized ConnectionInfo
+ getInfo()
+ {
+ if(_exception != null)
+ {
+ throw (Ice.LocalException)_exception.fillInStackTrace();
+ }
+ return _transceiver.getInfo();
+ }
+
//
// Only used by the SSL plug-in.
//
diff --git a/java/src/IceInternal/OpaqueEndpointI.java b/java/src/IceInternal/OpaqueEndpointI.java
index 51006ba5f5c..f4c9a8e1f3a 100644
--- a/java/src/IceInternal/OpaqueEndpointI.java
+++ b/java/src/IceInternal/OpaqueEndpointI.java
@@ -9,7 +9,7 @@
package IceInternal;
-final class OpaqueEndpointI extends EndpointI implements Ice.OpaqueEndpoint
+final class OpaqueEndpointI extends EndpointI
{
public
OpaqueEndpointI(String str)
@@ -134,6 +134,31 @@ final class OpaqueEndpointI extends EndpointI implements Ice.OpaqueEndpoint
}
//
+ // Return the endpoint information.
+ //
+ public Ice.EndpointInfo
+ getInfo()
+ {
+ return new Ice.OpaqueEndpointInfo(-1, false, _rawBytes)
+ {
+ public short type()
+ {
+ return _type;
+ }
+
+ public boolean datagram()
+ {
+ return false;
+ }
+
+ public boolean secure()
+ {
+ return false;
+ }
+ };
+ }
+
+ //
// Return the endpoint type
//
public short
diff --git a/java/src/IceInternal/RoutableReference.java b/java/src/IceInternal/RoutableReference.java
index d5fc69633f1..eb087099655 100644
--- a/java/src/IceInternal/RoutableReference.java
+++ b/java/src/IceInternal/RoutableReference.java
@@ -657,7 +657,7 @@ public class RoutableReference extends Reference
//
for(EndpointI endpoint : allEndpoints)
{
- if(!(endpoint instanceof Ice.OpaqueEndpoint))
+ if(!(endpoint instanceof IceInternal.OpaqueEndpointI))
{
endpoints.add(endpoint);
}
diff --git a/java/src/IceInternal/TcpEndpointI.java b/java/src/IceInternal/TcpEndpointI.java
index 15689f61566..44fc624af8d 100644
--- a/java/src/IceInternal/TcpEndpointI.java
+++ b/java/src/IceInternal/TcpEndpointI.java
@@ -9,7 +9,7 @@
package IceInternal;
-final class TcpEndpointI extends EndpointI implements Ice.TcpEndpoint
+final class TcpEndpointI extends EndpointI
{
final static short TYPE = 1;
@@ -231,6 +231,31 @@ final class TcpEndpointI extends EndpointI implements Ice.TcpEndpoint
}
//
+ // Return the endpoint information.
+ //
+ public Ice.EndpointInfo
+ getInfo()
+ {
+ return new Ice.TcpEndpointInfo(_timeout, _compress, _host, _port)
+ {
+ public short type()
+ {
+ return TYPE;
+ }
+
+ public boolean datagram()
+ {
+ return false;
+ }
+
+ public boolean secure()
+ {
+ return false;
+ }
+ };
+ }
+
+ //
// Return the endpoint type
//
public short
@@ -330,24 +355,6 @@ final class TcpEndpointI extends EndpointI implements Ice.TcpEndpoint
}
//
- // Get the host name.
- //
- public String
- host()
- {
- return _host;
- }
-
- //
- // Get the port number.
- //
- public int
- port()
- {
- return _port;
- }
-
- //
// Return a server side transceiver for this endpoint, or null if a
// transceiver can only be created by an acceptor. In case a
// transceiver is created, this operation also returns a new
diff --git a/java/src/IceInternal/TcpTransceiver.java b/java/src/IceInternal/TcpTransceiver.java
index 6d4a2901f5e..fef0558e62c 100644
--- a/java/src/IceInternal/TcpTransceiver.java
+++ b/java/src/IceInternal/TcpTransceiver.java
@@ -221,6 +221,27 @@ final class TcpTransceiver implements Transceiver
return _desc;
}
+ public Ice.ConnectionInfo
+ getInfo()
+ {
+ assert(_fd != null);
+ Ice.TcpConnectionInfo info = new Ice.TcpConnectionInfo();
+ java.net.Socket socket = _fd.socket();
+ info.localAddress = socket.getLocalAddress().getHostAddress();
+ info.localPort = socket.getLocalPort();
+ if(socket.getInetAddress() != null)
+ {
+ info.remoteAddress = socket.getInetAddress().getHostAddress();
+ info.remotePort = socket.getPort();
+ }
+ else
+ {
+ info.remoteAddress = "";
+ info.remotePort = -1;
+ }
+ return info;
+ }
+
public void
checkSendSize(Buffer buf, int messageSizeMax)
{
diff --git a/java/src/IceInternal/Transceiver.java b/java/src/IceInternal/Transceiver.java
index 6cecdd4cab5..a57bac6590a 100644
--- a/java/src/IceInternal/Transceiver.java
+++ b/java/src/IceInternal/Transceiver.java
@@ -43,5 +43,6 @@ public interface Transceiver
String type();
String toString();
+ Ice.ConnectionInfo getInfo();
void checkSendSize(Buffer buf, int messageSizeMax);
}
diff --git a/java/src/IceInternal/UdpEndpointI.java b/java/src/IceInternal/UdpEndpointI.java
index c81838ab617..846b4f41c48 100644
--- a/java/src/IceInternal/UdpEndpointI.java
+++ b/java/src/IceInternal/UdpEndpointI.java
@@ -9,7 +9,7 @@
package IceInternal;
-final class UdpEndpointI extends EndpointI implements Ice.UdpEndpoint
+final class UdpEndpointI extends EndpointI
{
final static short TYPE = 3;
@@ -397,6 +397,32 @@ final class UdpEndpointI extends EndpointI implements Ice.UdpEndpoint
}
//
+ // Return the endpoint information.
+ //
+ public Ice.EndpointInfo
+ getInfo()
+ {
+ return new Ice.UdpEndpointInfo(-1, _compress, _host, _port, _protocolMajor, _protocolMinor, _encodingMajor,
+ _encodingMinor, _mcastInterface, _mcastTtl)
+ {
+ public short type()
+ {
+ return TYPE;
+ }
+
+ public boolean datagram()
+ {
+ return true;
+ }
+
+ public boolean secure()
+ {
+ return false;
+ }
+ };
+ }
+
+ //
// Return the endpoint type
//
public short
@@ -493,43 +519,6 @@ final class UdpEndpointI extends EndpointI implements Ice.UdpEndpoint
}
//
- // Get the host name.
- //
- public String
- host()
- {
- return _host;
- }
-
- //
- // Get the port number.
- //
- public int
- port()
- {
- return _port;
- }
-
- //
- // Get the multicast interface.
- //
- public String
- mcastInterface()
- {
- return _mcastInterface;
- }
-
- //
- // Get the multicast time-to-live.
- //
- public int
- mcastTtl()
- {
- return _mcastTtl;
- }
-
-
- //
// Return a server side transceiver for this endpoint, or null if a
// transceiver can only be created by an acceptor. In case a
// transceiver is created, this operation also returns a new
diff --git a/java/src/IceInternal/UdpTransceiver.java b/java/src/IceInternal/UdpTransceiver.java
index 70533314e95..10f4c531935 100644
--- a/java/src/IceInternal/UdpTransceiver.java
+++ b/java/src/IceInternal/UdpTransceiver.java
@@ -229,6 +229,38 @@ final class UdpTransceiver implements Transceiver
}
}
+ public Ice.ConnectionInfo
+ getInfo()
+ {
+ assert(_fd != null);
+
+ Ice.UdpConnectionInfo info = new Ice.UdpConnectionInfo();
+ java.net.DatagramSocket socket = _fd.socket();
+ info.localAddress = socket.getLocalAddress().getHostAddress();
+ info.localPort = socket.getLocalPort();
+ if(socket.getInetAddress() != null)
+ {
+ info.remoteAddress = socket.getInetAddress().getHostAddress();
+ info.remotePort = socket.getPort();
+ }
+ else
+ {
+ info.remoteAddress = "";
+ info.remotePort = -1;
+ }
+ if(_mcastAddr != null)
+ {
+ info.mcastAddress = _mcastAddr.getAddress().getHostAddress();
+ info.mcastPort = _mcastAddr.getPort();
+ }
+ else
+ {
+ info.mcastAddress = "";
+ info.mcastPort = -1;
+ }
+ return info;
+ }
+
public void
checkSendSize(Buffer buf, int messageSizeMax)
{
diff --git a/java/src/IceSSL/EndpointI.java b/java/src/IceSSL/EndpointI.java
index c3a3a4e05a5..77e70e0671d 100644
--- a/java/src/IceSSL/EndpointI.java
+++ b/java/src/IceSSL/EndpointI.java
@@ -9,7 +9,7 @@
package IceSSL;
-final class EndpointI extends IceInternal.EndpointI implements IceSSL.SslEndpoint
+final class EndpointI extends IceInternal.EndpointI
{
final static short TYPE = 2;
@@ -231,6 +231,31 @@ final class EndpointI extends IceInternal.EndpointI implements IceSSL.SslEndpoin
}
//
+ // Return the endpoint information.
+ //
+ public Ice.EndpointInfo
+ getInfo()
+ {
+ return new IceSSL.SSLEndpointInfo(_timeout, _compress, _host, _port)
+ {
+ public short type()
+ {
+ return TYPE;
+ }
+
+ public boolean datagram()
+ {
+ return false;
+ }
+
+ public boolean secure()
+ {
+ return true;
+ }
+ };
+ }
+
+ //
// Return the endpoint type
//
public short
@@ -330,24 +355,6 @@ final class EndpointI extends IceInternal.EndpointI implements IceSSL.SslEndpoin
}
//
- // Get the host name.
- //
- public String
- host()
- {
- return _host;
- }
-
- //
- // Get the port number.
- //
- public int
- port()
- {
- return _port;
- }
-
- //
// Return a server side transceiver for this endpoint, or null if a
// transceiver can only be created by an acceptor. In case a
// transceiver is created, this operation also returns a new
diff --git a/java/src/IceSSL/TransceiverI.java b/java/src/IceSSL/TransceiverI.java
index 60a434e7719..54687c5f052 100644
--- a/java/src/IceSSL/TransceiverI.java
+++ b/java/src/IceSSL/TransceiverI.java
@@ -274,6 +274,49 @@ final class TransceiverI implements IceInternal.Transceiver
return _desc;
}
+ public Ice.ConnectionInfo
+ getInfo()
+ {
+ assert(_fd != null);
+
+ IceSSL.SSLConnectionInfo info = new IceSSL.SSLConnectionInfo();
+ java.net.Socket socket = _fd.socket();
+ info.localAddress = socket.getLocalAddress().getHostAddress();
+ info.localPort = socket.getLocalPort();
+ if(socket.getInetAddress() != null)
+ {
+ info.remoteAddress = socket.getInetAddress().getHostAddress();
+ info.remotePort = socket.getPort();
+ }
+ else
+ {
+ info.remoteAddress = "";
+ info.remotePort = -1;
+ }
+ SSLSession session = _engine.getSession();
+ info.cipher = session.getCipherSuite();
+ try
+ {
+ java.util.ArrayList<String> certs = new java.util.ArrayList<String>();
+ for(java.security.cert.Certificate c : session.getPeerCertificates())
+ {
+ StringBuffer s = new StringBuffer("-----BEGIN CERTIFICATE-----\n");
+ s.append(IceUtilInternal.Base64.encode(c.getEncoded()));
+ s.append("\n-----END CERTIFICATE-----");
+ certs.add(s.toString());
+ }
+ info.certs = certs.toArray(new String[0]);
+ }
+ catch(java.security.cert.CertificateEncodingException ex)
+ {
+ }
+ catch(javax.net.ssl.SSLPeerUnverifiedException ex)
+ {
+ // No peer certificates.
+ }
+ return info;
+ }
+
public void
checkSendSize(IceInternal.Buffer buf, int messageSizeMax)
{
diff --git a/java/src/IceUtilInternal/Base64.java b/java/src/IceUtilInternal/Base64.java
index ae8211bafee..18ad4a83e6e 100644
--- a/java/src/IceUtilInternal/Base64.java
+++ b/java/src/IceUtilInternal/Base64.java
@@ -82,7 +82,7 @@ encode(byte[] plainSeq)
while((retval.length() - iter) > 76)
{
- outString.append(retval.substring(iter, 76));
+ outString.append(retval.substring(iter, iter + 76));
outString.append("\r\n");
iter += 76;
}
diff --git a/java/test/Ice/background/EndpointI.java b/java/test/Ice/background/EndpointI.java
index 07249955651..7ae4acaa674 100644
--- a/java/test/Ice/background/EndpointI.java
+++ b/java/test/Ice/background/EndpointI.java
@@ -8,9 +8,7 @@
// **********************************************************************
package test.Ice.background;
-import test.Ice.background.Test.TestEndpoint;
-
-final class EndpointI extends IceInternal.EndpointI implements TestEndpoint
+final class EndpointI extends IceInternal.EndpointI
{
final static short TYPE_BASE = 100;
@@ -41,6 +39,15 @@ final class EndpointI extends IceInternal.EndpointI implements TestEndpoint
}
//
+ // Return the endpoint information/
+ //
+ public Ice.EndpointInfo
+ getInfo()
+ {
+ return _endpoint.getInfo();
+ }
+
+ //
// Return the endpoint type
//
public short
diff --git a/java/test/Ice/background/Test.ice b/java/test/Ice/background/Test.ice
index caf9d9c995c..f438500460d 100644
--- a/java/test/Ice/background/Test.ice
+++ b/java/test/Ice/background/Test.ice
@@ -43,10 +43,6 @@ interface BackgroundController
void writeException(bool enable);
};
-local interface TestEndpoint extends Ice::Endpoint
-{
-};
-
};
#endif
diff --git a/java/test/Ice/background/Transceiver.java b/java/test/Ice/background/Transceiver.java
index 392b3227721..e5c247ae95e 100644
--- a/java/test/Ice/background/Transceiver.java
+++ b/java/test/Ice/background/Transceiver.java
@@ -103,6 +103,12 @@ final class Transceiver implements IceInternal.Transceiver
return _transceiver.toString();
}
+ public Ice.ConnectionInfo
+ getInfo()
+ {
+ return _transceiver.getInfo();
+ }
+
public void
checkSendSize(IceInternal.Buffer buf, int messageSizeMax)
{
diff --git a/java/test/Ice/proxy/AllTests.java b/java/test/Ice/proxy/AllTests.java
index af03b87fee6..4d1f804e9c6 100644
--- a/java/test/Ice/proxy/AllTests.java
+++ b/java/test/Ice/proxy/AllTests.java
@@ -652,23 +652,23 @@ public class AllTests
Ice.ObjectPrx p = communicator.stringToProxy("test -t:tcp -h tcphost -p 10000 -t 1200 -z:udp -h udphost -p 10001 --interface eth0 --ttl 5:opaque -t 100 -v ABCD");
Ice.Endpoint[] endps = p.ice_getEndpoints();
- test(endps[0] instanceof Ice.TcpEndpoint);
- Ice.TcpEndpoint tcpEndpoint = (Ice.TcpEndpoint)endps[0];
- test(tcpEndpoint.host().equals("tcphost"));
- test(tcpEndpoint.port() == 10000);
- test(tcpEndpoint.timeout() == 1200);
- test(tcpEndpoint.compress());
-
- test(endps[1] instanceof Ice.UdpEndpoint);
- Ice.UdpEndpoint udpEndpoint = (Ice.UdpEndpoint)endps[1];
- test(udpEndpoint.host().equals("udphost"));
- test(udpEndpoint.port() == 10001);
- test(udpEndpoint.mcastInterface().equals("eth0"));
- test(udpEndpoint.mcastTtl() == 5);
- test(udpEndpoint.timeout() == -1);
- test(!udpEndpoint.compress());
-
- test(endps[2] instanceof Ice.OpaqueEndpoint);
+ test(endps[0].getInfo() instanceof Ice.TcpEndpointInfo);
+ Ice.TcpEndpointInfo tcpEndpoint = (Ice.TcpEndpointInfo)endps[0].getInfo();
+ test(tcpEndpoint.host.equals("tcphost"));
+ test(tcpEndpoint.port == 10000);
+ test(tcpEndpoint.timeout == 1200);
+ test(tcpEndpoint.compress);
+
+ test(endps[1].getInfo() instanceof Ice.UdpEndpointInfo);
+ Ice.UdpEndpointInfo udpEndpoint = (Ice.UdpEndpointInfo)endps[1].getInfo();
+ test(udpEndpoint.host.equals("udphost"));
+ test(udpEndpoint.port == 10001);
+ test(udpEndpoint.mcastInterface.equals("eth0"));
+ test(udpEndpoint.mcastTtl == 5);
+ test(udpEndpoint.timeout == -1);
+ test(!udpEndpoint.compress);
+
+ test(endps[2].getInfo() instanceof Ice.OpaqueEndpointInfo);
out.println("ok");
diff --git a/slice/Ice/Connection.ice b/slice/Ice/Connection.ice
index dca94455eca..468fefbae7f 100644
--- a/slice/Ice/Connection.ice
+++ b/slice/Ice/Connection.ice
@@ -14,10 +14,21 @@
#include <Ice/ObjectAdapterF.ice>
#include <Ice/Identity.ice>
+#include <Ice/Endpoint.ice>
module Ice
{
+local class ConnectionInfo
+{
+ /**
+ *
+ * The endpoint used to establish the connection.
+ *
+ **/
+ EndpointInfo endpoint;
+};
+
/**
*
* The user-level interface to a connection.
@@ -130,6 +141,61 @@ local interface Connection
*
**/
["cpp:const"] string toString();
+
+ /**
+ *
+ * Returns the connection information.
+ *
+ * @return The connection information.
+ *
+ **/
+ ["cpp:const"] ConnectionInfo getInfo();
+};
+
+/**
+ *
+ * Provides access to the connection details of a TCP connection
+ *
+ **/
+local class TcpConnectionInfo extends ConnectionInfo
+{
+ /** The local address. */
+ string localAddress;
+
+ /** The local port. */
+ int localPort;
+
+ /** The remote address. */
+ string remoteAddress;
+
+ /** The remote port. */
+ int remotePort;
+};
+
+/**
+ *
+ * Provides access to the connection details of a UDP connection
+ *
+ **/
+local class UdpConnectionInfo extends ConnectionInfo
+{
+ /** The local address. */
+ string localAddress;
+
+ /** The local port. */
+ int localPort;
+
+ /** The remote address. */
+ string remoteAddress;
+
+ /** The remote port. */
+ int remotePort;
+
+ /** The multicast address. */
+ string mcastAddress;
+
+ /** The multicast port. */
+ int mcastPort;
};
};
diff --git a/slice/Ice/ConnectionF.ice b/slice/Ice/ConnectionF.ice
index b7c982d7537..c54e8a29060 100644
--- a/slice/Ice/ConnectionF.ice
+++ b/slice/Ice/ConnectionF.ice
@@ -15,6 +15,7 @@
module Ice
{
+local class ConnectionInfo;
local interface Connection;
};
diff --git a/slice/Ice/Endpoint.ice b/slice/Ice/Endpoint.ice
index d953ee0ad59..bf377abc023 100644
--- a/slice/Ice/Endpoint.ice
+++ b/slice/Ice/Endpoint.ice
@@ -23,131 +23,165 @@ module Ice
* The user-level interface to an endpoint.
*
**/
-local interface Endpoint
+local class EndpointInfo
{
/**
*
- * Return a string representation of the endpoint.
+ * The timeout for the endpoint in milliseconds. 0 means
+ * non-blocking, -1 means no timeout.
*
- * @return The string representation of the endpoint.
+ **/
+ int timeout;
+
+ /**
+ *
+ * Specifies whether or not compression should be used if
+ * available when using this endpoint.
+ *
+ */
+ bool compress;
+
+ /**
+ *
+ * Returns the type of the endpoint.
*
**/
- ["cpp:const"] string toString();
+ ["cpp:const"] short type();
+
+ /**
+ *
+ * Returns true if this endpoint is a datagram endpoint.
+ *
+ **/
+ ["cpp:const"] bool datagram();
+
+ /**
+ *
+ * Returns true if this endpoint is a secure endpoint.
+ *
+ **/
+ ["cpp:const"] bool secure();
+};
+/**
+ *
+ * The user-level interface to an endpoint.
+ *
+ **/
+local interface Endpoint
+{
/**
*
- * Return the timeout for the endpoint in milliseconds.
- * 0 means non-blocking, -1 means no timeout.
+ * Return a string representation of the endpoint.
*
- * @return The timeout.
+ * @return The string representation of the endpoint.
*
**/
- ["cpp:const"] int timeout();
+ ["cpp:const"] string toString();
/**
*
- * Check whether endpoint supports bzip2 compress,
- * or false otherwise.
+ * Returns the endpoint information.
*
- * @return Whether compression is enabled.
+ * @return The endpoint information class.
*
- */
- ["cpp:const"] bool compress();
+ **/
+ ["cpp:const"] EndpointInfo getInfo();
};
/**
*
- * A TCP endpoint.
+ * Provides access to the address details of a TCP endpoint.
*
* @see Endpoint
*
**/
-local interface TcpEndpoint extends Endpoint
+local class TcpEndpointInfo extends EndpointInfo
{
/**
*
- * Get the host or address configured with
- * the endpoint.
- *
- * @return The host or address.
+ * The host or address configured with the endpoint.
*
**/
- ["cpp:const"] string host();
+ string host;
/**
*
- * Get the TCP port number.
- *
- * @return The port number.
+ * The TCP port number.
*
**/
- ["cpp:const"] int port();
+ int port;
};
/**
- *
- * A UDP endpoint.
+ *
+ * Provides access to the address details of a UDP endpoint.
*
* @see Endpoint
*
**/
-local interface UdpEndpoint extends Endpoint
+local class UdpEndpointInfo extends EndpointInfo
{
/**
*
- * Get the host or address configured with
- * the endpoint.
- *
- * @return The host or address.
+ * The host or address configured with the endpoint.
*
**/
- ["cpp:const"] string host();
+ string host;
/**
*
- * Get the TCP port number.
+ * The TCP port number.
*
- * @return The port number.
- *
**/
- ["cpp:const"] int port();
-
+ int port;
+
+ /**
+ *
+ * The protocol version supported by the endpoint.
+ *
+ **/
+ byte protocolMajor;
+ byte protocolMinor;
+
+ /**
+ *
+ * The encoding version supported by the endpoint.
+ *
+ **/
+ byte encodingMajor;
+ byte encodingMinor;
+
/**
*
- * Get the multicast interface.
- *
- * @return The multicast interface.
+ * The multicast interface.
*
**/
- ["cpp:const"] string mcastInterface();
+ string mcastInterface;
/**
*
- * Get the multicast time-to-live (or hops).
+ * The multicast time-to-live (or hops).
*
- * @return The time-to-live.
- *
**/
- ["cpp:const"] int mcastTtl();
+ int mcastTtl;
};
/**
- *
- * An opaque endpoint.
+ *
+ * Provides access to the details of an opaque endpoint.
*
* @see Endpoint
*
**/
-local interface OpaqueEndpoint extends Endpoint
+local class OpaqueEndpointInfo extends EndpointInfo
{
/**
*
- * Return the raw encoding of the opaque endpoint.
- *
- * @return The raw encoding.
+ * The raw encoding of the opaque endpoint.
*
**/
- ["cpp:const"] Ice::ByteSeq rawBytes();
+ Ice::ByteSeq rawBytes;
};
};
diff --git a/slice/IceSSL/ConnectionInfo.ice b/slice/IceSSL/ConnectionInfo.ice
new file mode 100644
index 00000000000..3d258315f4b
--- /dev/null
+++ b/slice/IceSSL/ConnectionInfo.ice
@@ -0,0 +1,48 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef ICE_SSL_CONNECTION_INFO_ICE
+#define ICE_SSL_CONNECTION_INFO_ICE
+
+[["cpp:header-ext:h"]]
+
+#include <Ice/Connection.ice>
+
+module IceSSL
+{
+
+/**
+ *
+ * Provides access to the connection details of an SSL connection
+ *
+ **/
+local class SSLConnectionInfo extends Ice::ConnectionInfo
+{
+ /** The local address. */
+ string localAddress;
+
+ /** The local port. */
+ int localPort;
+
+ /** The remote address. */
+ string remoteAddress;
+
+ /** The remote port. */
+ int remotePort;
+
+ /** The negotiated cipher suite. */
+ string cipher;
+
+ /** The certificate chain. */
+ Ice::StringSeq certs;
+};
+
+};
+
+#endif
diff --git a/slice/IceSSL/Endpoint.ice b/slice/IceSSL/EndpointInfo.ice
index 9ae20e00d00..7408105ea98 100644
--- a/slice/IceSSL/Endpoint.ice
+++ b/slice/IceSSL/EndpointInfo.ice
@@ -7,8 +7,8 @@
//
// **********************************************************************
-#ifndef ICE_SSL_ENDPOINT_ICE
-#define ICE_SSL_ENDPOINT_ICE
+#ifndef ICE_SSL_ENDPOINT_INFO_ICE
+#define ICE_SSL_ENDPOINT_INFO_ICE
[["cpp:header-ext:h"]]
@@ -21,28 +21,25 @@ module IceSSL
{
/**
+ *
* Provides access to the address details of an SSL endpoint.
+ *
**/
-local interface SslEndpoint extends Ice::Endpoint
+["cpp:virtual"] local class SSLEndpointInfo extends Ice::EndpointInfo
{
/**
*
- * Get the host or address configured with
- * the endpoint.
- *
- * @return The host or address.
+ * The host or address configured with the endpoint.
*
**/
- ["cpp:const"] string host();
+ string host;
/**
*
- * Get the TCP port number.
- *
- * @return The port number.
+ * The TCP port number.
*
**/
- ["cpp:const"] int port();
+ int port;
};
};