diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/Collector.cpp | 16 | ||||
-rw-r--r-- | cpp/src/Ice/Makefile | 23 | ||||
-rw-r--r-- | cpp/src/Ice/ObjectAdapterI.cpp | 17 | ||||
-rw-r--r-- | cpp/src/Ice/ObjectAdapterI.h | 1 | ||||
-rw-r--r-- | cpp/src/Ice/Reference.cpp | 13 | ||||
-rw-r--r-- | cpp/src/Ice/Reference.h | 2 | ||||
-rw-r--r-- | cpp/src/Ice/SslAcceptor.cpp | 77 | ||||
-rw-r--r-- | cpp/src/Ice/SslConnector.cpp | 77 | ||||
-rw-r--r-- | cpp/src/Ice/SslTransceiver.cpp | 106 | ||||
-rw-r--r-- | cpp/src/Ice/SslTransceiver.h | 22 | ||||
-rw-r--r-- | cpp/src/Ice/ThreadPool.cpp | 2 | ||||
-rw-r--r-- | cpp/src/Ice/TraceLevels.cpp | 10 | ||||
-rw-r--r-- | cpp/src/Ice/TraceLevels.h | 2 | ||||
-rw-r--r-- | cpp/src/Ice/ice.dsp | 140 | ||||
-rw-r--r-- | cpp/src/IcePack/Client.cpp | 11 |
15 files changed, 475 insertions, 44 deletions
diff --git a/cpp/src/Ice/Collector.cpp b/cpp/src/Ice/Collector.cpp index e5a44fd86fa..8de7adff572 100644 --- a/cpp/src/Ice/Collector.cpp +++ b/cpp/src/Ice/Collector.cpp @@ -21,11 +21,13 @@ #include <Ice/Incoming.h> #include <Ice/Exception.h> #include <Ice/Protocol.h> -#include <Ice/Functional.h> +#include <Ice/Functional.h>
+#include <Ice/SslException.h> using namespace std; using namespace Ice; -using namespace IceInternal; +using namespace IceInternal;
+using IceSecurity::SecurityException; void IceInternal::incRef(Collector* p) { p->__incRef(); } void IceInternal::decRef(Collector* p) { p->__decRef(); } @@ -564,7 +566,17 @@ IceInternal::CollectorFactory::message(BasicStream&) CollectorPtr collector = new Collector(_instance, _adapter, transceiver, _endpoint); collector->activate(); _collectors.push_back(collector); + }
+ catch (const SecurityException&)
+ {
+ // TODO: bandaid. Takes care of SSL Handshake problems during creation of a Transceiver
+ // Ignore, nothing we can do here
} + catch (const SocketException&)
+ {
+ // TODO: bandaid. Takes care of SSL Handshake problems during creation of a Transceiver
+ // Ignore, nothing we can do here
+ }
catch (const TimeoutException&) { // Ignore timeouts diff --git a/cpp/src/Ice/Makefile b/cpp/src/Ice/Makefile index 03d0a899e65..8e82d0aa1c7 100644 --- a/cpp/src/Ice/Makefile +++ b/cpp/src/Ice/Makefile @@ -1,4 +1,4 @@ -# ********************************************************************** +#********************************************************************** # # Copyright (c) 2001 # MutableRealms, Inc. @@ -62,11 +62,26 @@ OBJS = Application.o \ TcpConnector.o \ TcpAcceptor.o \ TcpTransceiver.o \ - SslConnector.o \ - SslAcceptor.o \ + SslConnector.o \ + SslAcceptor.o \ SslTransceiver.o \ + SslBaseCerts.o \ + SslCertificateAuthority.o \ + SslCertificateDesc.o \ + SslConfig.o \ + SslConfigErrorReporter.o \ + SslConnectionOpenSSLClient.o \ + SslConnectionOpenSSL.o \ + SslConnectionOpenSSLServer.o \ + SslException.o \ + SslFactory.o \ + SslGeneralConfig.o \ + SslSystem.o \ + SslSystemOpenSSL.o \ + SslTempCerts.o \ UdpTransceiver.o + SRCS = $(OBJS:.o=.cpp) HDIR = $(includedir)/Ice @@ -79,7 +94,7 @@ CPPFLAGS := -I.. $(CPPFLAGS) $(VERSIONED_NAME): $(OBJS) rm -f $@ - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $(OBJS) + $(CXX) $(CXXFLAGS) -DUSE_SOCKETS -DSSL_EXTENSION $(LDFLAGS) -lxerces-c1_5_1 -lcrypto -lssl -shared -o $@ $(OBJS) $(NAME): $(VERSIONED_NAME) rm -f $@ diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp index 63c783b7164..415c25d7249 100644 --- a/cpp/src/Ice/ObjectAdapterI.cpp +++ b/cpp/src/Ice/ObjectAdapterI.cpp @@ -19,7 +19,7 @@ #include <Ice/Exception.h> #include <Ice/Properties.h> #include <Ice/Functional.h> - +
#ifdef WIN32 # include <sys/timeb.h> #else @@ -353,15 +353,24 @@ Ice::ObjectAdapterI::~ObjectAdapterI() deactivate(); } } - +
ObjectPrx Ice::ObjectAdapterI::newProxy(const string& ident) { vector<EndpointPtr> endpoints; transform(_collectorFactories.begin(), _collectorFactories.end(), back_inserter(endpoints), Ice::constMemFun(&CollectorFactory::endpoint)); - - ReferencePtr reference = new Reference(_instance, ident, "", Reference::ModeTwoway, false, endpoints, endpoints); +
+ // ASN: This is a bandaid
+ bool makeSecure = false;
+ size_t numSecureEndpoints = count_if(endpoints.begin(), endpoints.end(), Ice::constMemFun(&Endpoint::secure));
+
+ if (numSecureEndpoints >= endpoints.size())
+ {
+ makeSecure = true;
+ }
+ + ReferencePtr reference = new Reference(_instance, ident, "", Reference::ModeTwoway, makeSecure /* false */, endpoints, endpoints); return _instance->proxyFactory()->referenceToProxy(reference); } diff --git a/cpp/src/Ice/ObjectAdapterI.h b/cpp/src/Ice/ObjectAdapterI.h index 04e21adf5ef..a049bf50b7b 100644 --- a/cpp/src/Ice/ObjectAdapterI.h +++ b/cpp/src/Ice/ObjectAdapterI.h @@ -20,6 +20,7 @@ #include <Ice/ProxyF.h> #include <Ice/ObjectF.h> #include <Ice/Exception.h> +#include <Ice/EndpointF.h>
namespace Ice { diff --git a/cpp/src/Ice/Reference.cpp b/cpp/src/Ice/Reference.cpp index 8cc024bb607..6b4db8e1b6d 100644 --- a/cpp/src/Ice/Reference.cpp +++ b/cpp/src/Ice/Reference.cpp @@ -17,8 +17,8 @@ using namespace std; using namespace Ice; using namespace IceInternal; -void IceInternal::incRef(Reference* p) { p->__incRef(); } -void IceInternal::decRef(Reference* p) { p->__decRef(); } +void IceInternal::incRef(::IceInternal::Reference* p) { p->__incRef(); } +void IceInternal::decRef(::IceInternal::Reference* p) { p->__decRef(); } IceInternal::Reference::Reference(const InstancePtr& inst, const string& ident, const string& fac, Mode md, bool sec, const vector<EndpointPtr>& origEndpts, const vector<EndpointPtr>& endpts) : @@ -72,7 +72,12 @@ IceInternal::Reference::Reference(const InstancePtr& inst, const string& str) : { break; } - +
+ if (s[beg] == ':')
+ {
+ break;
+ }
+ end = s.find_first_of(delim + ":", beg); if (end == string::npos) { @@ -95,7 +100,7 @@ IceInternal::Reference::Reference(const InstancePtr& inst, const string& str) : if (argumentBeg != string::npos && str[argumentBeg] != '-') { beg = argumentBeg; - end = str.find_first_of(delim, beg); + end = str.find_first_of(delim + ":", beg); if (end == string::npos) { end = str.length(); diff --git a/cpp/src/Ice/Reference.h b/cpp/src/Ice/Reference.h index f60ae3171b5..4e159e4dc77 100644 --- a/cpp/src/Ice/Reference.h +++ b/cpp/src/Ice/Reference.h @@ -80,7 +80,7 @@ private: void calcHashValue(); }; - +
} #endif diff --git a/cpp/src/Ice/SslAcceptor.cpp b/cpp/src/Ice/SslAcceptor.cpp index 9e0a3d2041a..e704e86334b 100644 --- a/cpp/src/Ice/SslAcceptor.cpp +++ b/cpp/src/Ice/SslAcceptor.cpp @@ -7,7 +7,16 @@ // All Rights Reserved // // ********************************************************************** - +#ifdef WIN32
+#pragma warning(disable:4786)
+#endif
+ +#ifdef SSL_EXTENSION
+#include <Ice/SslFactory.h>
+#include <Ice/SslSystem.h>
+#include <Ice/Properties.h>
+#endif
+
#include <Ice/SslAcceptor.h> #include <Ice/SslTransceiver.h> #include <Ice/Instance.h> @@ -15,11 +24,27 @@ #include <Ice/Logger.h> #include <Ice/Network.h> #include <Ice/Exception.h> +
+#ifdef SSL_EXTENSION
+#include <Ice/SslException.h>
+#endif
+
+#include <sstream>
using namespace std; using namespace Ice; using namespace IceInternal; +using std::string;
+using std::ostringstream;
+
+#ifdef SSL_EXTENSION
+using IceSecurity::Ssl::Connection;
+using IceSecurity::Ssl::Factory;
+using IceSecurity::Ssl::System;
+using IceSecurity::Ssl::ShutdownException;
+#endif
+
int IceInternal::SslAcceptor::fd() { @@ -87,7 +112,55 @@ IceInternal::SslAcceptor::accept(int timeout) _logger->trace(_traceLevels->networkCat, s.str()); } - return new SslTransceiver(_instance, fd); +#ifdef SSL_EXTENSION
+ // This is the Ice SSL Configuration File on which we will base
+ // all connections in this communicator.
+ string configFile = _instance->properties()->getProperty("Ice.Ssl.Config");
+
+ // Get an instance of the SslSystem singleton.
+ System* sslSystem = Factory::getSystem(configFile);
+
+ if (!sslSystem->isTraceSet())
+ {
+ sslSystem->setTrace(_traceLevels);
+ }
+
+ if (!sslSystem->isLoggerSet())
+ {
+ sslSystem->setLogger(_logger);
+ }
+
+ // Initialize the server (if needed)
+ if (!sslSystem->isConfigLoaded())
+ {
+ sslSystem->loadConfig();
+ }
+
+ Connection* sslConnection = 0;
+
+ try
+ { + sslConnection = sslSystem->createServerConnection(fd);
+ }
+ catch (...)
+ {
+ Factory::releaseSystem(sslSystem);
+ sslSystem = 0;
+
+ // Shutdown the connection.
+ throw;
+ }
+
+ TransceiverPtr transPtr = new SslTransceiver(_instance, fd, sslConnection);
+
+ Factory::releaseSystem(sslSystem);
+ sslSystem = 0;
+ +#else
+ TransceiverPtr transPtr = new SslTransceiver(_instance, fd);
+#endif
+
+ return transPtr;
} string diff --git a/cpp/src/Ice/SslConnector.cpp b/cpp/src/Ice/SslConnector.cpp index 7ffb7f0c797..dc819faa798 100644 --- a/cpp/src/Ice/SslConnector.cpp +++ b/cpp/src/Ice/SslConnector.cpp @@ -6,20 +6,45 @@ // // All Rights Reserved // -// ********************************************************************** +// **********************************************************************
+#ifdef WIN32
+#pragma warning(disable:4786)
+#endif
+#ifdef SSL_EXTENSION
+#include <Ice/SslFactory.h>
+#include <Ice/SslSystem.h>
+#endif
+
#include <Ice/SslConnector.h> #include <Ice/SslTransceiver.h> #include <Ice/Instance.h> #include <Ice/TraceLevels.h> #include <Ice/Logger.h> #include <Ice/Network.h> +#include <Ice/Properties.h>
#include <Ice/Exception.h> +
+#ifdef SSL_EXTENSION
+#include <Ice/SslException.h>
+#endif
+
+#include <sstream>
using namespace std; using namespace Ice; using namespace IceInternal; +using std::ostringstream;
+using std::string;
+
+#ifdef SSL_EXTENSION
+using IceSecurity::Ssl::Connection;
+using IceSecurity::Ssl::Factory;
+using IceSecurity::Ssl::System;
+using IceSecurity::Ssl::ShutdownException; +#endif
+
TransceiverPtr IceInternal::SslConnector::connect(int timeout) { @@ -40,7 +65,55 @@ IceInternal::SslConnector::connect(int timeout) _logger->trace(_traceLevels->networkCat, s.str()); } - return new SslTransceiver(_instance, fd); +#ifdef SSL_EXTENSION
+ // This is the Ice SSL Configuration File on which we will base
+ // all connections in this communicator.
+ string configFile = _instance->properties()->getProperty("Ice.Ssl.Config");
+
+ // Get an instance of the SslOpenSSL singleton.
+ System* sslSystem = Factory::getSystem(configFile);
+
+ if (!sslSystem->isTraceSet())
+ {
+ sslSystem->setTrace(_traceLevels);
+ }
+
+ if (!sslSystem->isLoggerSet())
+ {
+ sslSystem->setLogger(_logger);
+ }
+
+ // Initialize the server (if needed)
+ if (!sslSystem->isConfigLoaded())
+ {
+ sslSystem->loadConfig();
+ }
+ + Connection* sslConnection = 0;
+
+ try
+ {
+ sslConnection = sslSystem->createClientConnection(fd);
+ }
+ catch (...)
+ {
+ Factory::releaseSystem(sslSystem);
+ sslSystem = 0;
+
+ // Shutdown the connection.
+ throw;
+ }
+
+ TransceiverPtr transPtr = new SslTransceiver(_instance, fd, sslConnection);
+
+ Factory::releaseSystem(sslSystem);
+ sslSystem = 0;
+ +#else
+ TransceiverPtr transPtr = new SslTransceiver(_instance, fd);
+#endif
+
+ return transPtr;
} string diff --git a/cpp/src/Ice/SslTransceiver.cpp b/cpp/src/Ice/SslTransceiver.cpp index 60e931084c0..76af7b5daf7 100644 --- a/cpp/src/Ice/SslTransceiver.cpp +++ b/cpp/src/Ice/SslTransceiver.cpp @@ -7,19 +7,36 @@ // All Rights Reserved // // ********************************************************************** - -#include <Ice/SslTransceiver.h> +
+#ifdef SSL_EXTENSION
+#include <Ice/SslConnection.h>
+#endif +
+#include <Ice/SslTransceiver.h>
#include <Ice/Instance.h> #include <Ice/TraceLevels.h> #include <Ice/Logger.h> #include <Ice/Buffer.h> #include <Ice/Network.h> #include <Ice/Exception.h> +
+#ifdef SSL_EXTENSION
+#include <Ice/Security.h>
+#include <Ice/SslException.h>
+#include <sstream>
+#endif
using namespace std; using namespace Ice; using namespace IceInternal; +#ifdef SSL_EXTENSION
+using IceSecurity::SecurityException;
+using IceSecurity::Ssl::InitException;
+using IceSecurity::Ssl::ReInitException;
+using IceSecurity::Ssl::ShutdownException;
+#endif
+
int IceInternal::SslTransceiver::fd() { @@ -29,6 +46,10 @@ IceInternal::SslTransceiver::fd() void IceInternal::SslTransceiver::close() { +#ifndef SSL_EXTENSION
+ METHOD_INV("SslTransceiver::close()");
+#endif
+
if (_traceLevels->network >= 1) { ostringstream s; @@ -37,14 +58,23 @@ IceInternal::SslTransceiver::close() } int fd = _fd; + cleanUpSSL();
_fd = INVALID_SOCKET; ::shutdown(fd, SHUT_RDWR); // helps to unblock threads in recv() closeSocket(fd); +
+#ifndef SSL_EXTENSION
+ METHOD_RET("SslTransceiver::close()");
+#endif
} void IceInternal::SslTransceiver::shutdown() { +#ifndef SSL_EXTENSION
+ METHOD_INV("SslTransceiver::shutdown()");
+#endif
+
if (_traceLevels->network >= 2) { ostringstream s; @@ -53,11 +83,17 @@ IceInternal::SslTransceiver::shutdown() } ::shutdown(_fd, SHUT_WR); // Shutdown socket for writing +
+#ifndef SSL_EXTENSION
+ METHOD_RET("SslTransceiver::shutdown()");
+#endif
} void IceInternal::SslTransceiver::write(Buffer& buf, int timeout) -{ +{
+#ifndef SSL_EXTENSION
+ METHOD_INV("SslTransceiver::write()")
int packetSize = buf.b.end() - buf.i; #ifdef WIN32 @@ -162,12 +198,22 @@ IceInternal::SslTransceiver::write(Buffer& buf, int timeout) { packetSize = buf.b.end() - buf.i; } - } + }
+
+ METHOD_INV("SslTransceiver::write()");
+#else
+
+ _sslConnection->write(buf, timeout);
+
+#endif
} void IceInternal::SslTransceiver::read(Buffer& buf, int timeout) { +#ifndef SSL_EXTENSION
+ METHOD_INV("SslTransceiver::read()");
+
int packetSize = buf.b.end() - buf.i; while (buf.i != buf.b.end()) @@ -263,6 +309,18 @@ IceInternal::SslTransceiver::read(Buffer& buf, int timeout) packetSize = buf.b.end() - buf.i; } } +
+ METHOD_INV("SslTransceiver::read()");
+#else
+
+ if (!_sslConnection->read(buf, timeout))
+ {
+ ConnectionLostException clEx(__FILE__, __LINE__);
+ clEx.error = 0;
+ throw clEx;
+ }
+
+#endif
} string @@ -271,12 +329,25 @@ IceInternal::SslTransceiver::toString() const return fdToString(_fd); } -IceInternal::SslTransceiver::SslTransceiver(const InstancePtr& instance, int fd) : - _instance(instance), - _fd(fd), - _traceLevels(instance->traceLevels()), - _logger(instance->logger()) +#ifndef SSL_EXTENSION
+IceInternal::SslTransceiver::SslTransceiver(const InstancePtr& instance, int fd) :
+ _instance(instance),
+ _fd(fd),
+ _traceLevels(instance->traceLevels()),
+ _logger(instance->logger())
+#else
+IceInternal::SslTransceiver::SslTransceiver(const InstancePtr& instance, int fd, Connection* sslConnection) :
+ _instance(instance),
+ _fd(fd),
+ _traceLevels(instance->traceLevels()),
+ _logger(instance->logger()),
+ _sslConnection(sslConnection)
+#endif { +#ifdef SSL_EXTENSION
+ assert(sslConnection != 0);
+#endif
+
FD_ZERO(&_rFdSet); FD_ZERO(&_wFdSet); } @@ -284,4 +355,21 @@ IceInternal::SslTransceiver::SslTransceiver(const InstancePtr& instance, int fd) IceInternal::SslTransceiver::~SslTransceiver() { assert(_fd == INVALID_SOCKET); +
+#ifdef SSL_EXTENSION
+ cleanUpSSL();
+#endif
} +
+void
+IceInternal::SslTransceiver::cleanUpSSL()
+{
+#ifdef SSL_EXTENSION
+ if (_sslConnection != 0)
+ {
+ _sslConnection->shutdown();
+ delete _sslConnection;
+ _sslConnection = 0;
+ }
+#endif
+}
diff --git a/cpp/src/Ice/SslTransceiver.h b/cpp/src/Ice/SslTransceiver.h index d6eb7484524..ad2fce1e167 100644 --- a/cpp/src/Ice/SslTransceiver.h +++ b/cpp/src/Ice/SslTransceiver.h @@ -11,6 +11,10 @@ #ifndef ICE_SSL_TRANSCEIVER_H #define ICE_SSL_TRANSCEIVER_H +#ifdef SSL_EXTENSION
+#include <Ice/SslConnection.h>
+#endif
+
#include <Ice/InstanceF.h> #include <Ice/TraceLevelsF.h> #include <Ice/LoggerF.h> @@ -19,6 +23,10 @@ namespace IceInternal { +#ifdef SSL_EXTENSION
+using IceSecurity::Ssl::Connection;
+#endif
+
class SslConnector; class SslAcceptor; @@ -35,8 +43,14 @@ public: private: - SslTransceiver(const InstancePtr&, int); - virtual ~SslTransceiver(); +#ifdef SSL_EXTENSION
+ SslTransceiver(const InstancePtr&, int, Connection*);
+#else
+ SslTransceiver(const InstancePtr&, int);
+#endif
+
+ virtual ~SslTransceiver();
+ void cleanUpSSL();
friend class SslConnector; friend class SslAcceptor; @@ -46,6 +60,10 @@ private: ::Ice::LoggerPtr _logger; fd_set _rFdSet; fd_set _wFdSet; +
+#ifdef SSL_EXTENSION
+ Connection* _sslConnection;
+#endif
}; } diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp index 533a7e8e61b..880ee685a66 100644 --- a/cpp/src/Ice/ThreadPool.cpp +++ b/cpp/src/Ice/ThreadPool.cpp @@ -477,7 +477,7 @@ IceInternal::ThreadPool::run() { try { - read(handler); + read(handler); } catch (const TimeoutException&) // Expected. { diff --git a/cpp/src/Ice/TraceLevels.cpp b/cpp/src/Ice/TraceLevels.cpp index 05eaecbfa9d..f397356b32a 100644 --- a/cpp/src/Ice/TraceLevels.cpp +++ b/cpp/src/Ice/TraceLevels.cpp @@ -24,7 +24,9 @@ IceInternal::TraceLevels::TraceLevels(const PropertiesPtr& properties) : protocol(0), protocolCat("Protocol"), retry(0), - retryCat("Retry") + retryCat("Retry"),
+ security(0),
+ securityCat("Security") { string value; const string keyBase = "Ice.Trace."; @@ -46,6 +48,12 @@ IceInternal::TraceLevels::TraceLevels(const PropertiesPtr& properties) : { const_cast<int&>(retry) = atoi(value.c_str()); } +
+ value = properties->getProperty(keyBase + securityCat);
+ if (!value.empty())
+ {
+ const_cast<int&>(security) = atoi(value.c_str());
+ }
} IceInternal::TraceLevels::~TraceLevels() diff --git a/cpp/src/Ice/TraceLevels.h b/cpp/src/Ice/TraceLevels.h index 8ce474af601..b17b42cfb1f 100644 --- a/cpp/src/Ice/TraceLevels.h +++ b/cpp/src/Ice/TraceLevels.h @@ -31,6 +31,8 @@ public: const char* protocolCat; const int retry; const char* retryCat; + const int security;
+ const char* securityCat;
}; } diff --git a/cpp/src/Ice/ice.dsp b/cpp/src/Ice/ice.dsp index 90473d3bb51..16b8efc11ef 100644 --- a/cpp/src/Ice/ice.dsp +++ b/cpp/src/Ice/ice.dsp @@ -43,8 +43,8 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBRARY_EXPORTS" /Yu"stdafx.h" /FD /c
-# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I ".." /I "../../include" /D "NDEBUG" /D "_USRDLL" /D "ICE_API_EXPORTS" /D "WIN32" /D "_CONSOLE" /D "_UNICODE" /YX /FD /c
-# SUBTRACT CPP /WX /Fr
+# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I ".." /I "../../include" /D "WIN32" /D "_UNICODE" /D "NDEBUG" /D "_CONSOLE" /D "_USRDLL" /D "ICE_API_EXPORTS" /D "SSL_EXTENSION" /YX /FD /c
+# SUBTRACT CPP /Fr
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
@@ -54,7 +54,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 ws2_32.lib jtc.lib /nologo /dll /machine:I386 /out:"Release/ice001.dll"
+# ADD LINK32 ws2_32.lib jtc.lib libeay32.lib ssleay32.lib xerces-c_1.lib /nologo /dll /machine:I386 /out:"Release/ice001.dll"
# SUBTRACT LINK32 /pdb:none
# Begin Special Build Tool
SOURCE="$(InputPath)"
@@ -75,7 +75,7 @@ PostBuild_Cmds=copy Release\ice001.* ..\..\lib # PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBRARY_EXPORTS" /Yu"stdafx.h" /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I ".." /I "../../include" /D "_DEBUG" /D "_USRDLL" /D "ICE_API_EXPORTS" /D "WIN32" /D "_CONSOLE" /D "_UNICODE" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /Zi /Od /I ".." /I "../../include" /D "WIN32" /D "_UNICODE" /D "_DEBUG" /D "_CONSOLE" /D "_USRDLL" /D "ICE_API_EXPORTS" /D "SSL_EXTENSION" /YX /FD /GZ /c
# SUBTRACT CPP /WX /Fr
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
@@ -86,7 +86,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 ws2_32.lib jtcd.lib /nologo /dll /debug /machine:I386 /out:"Debug/ice001d.dll" /pdbtype:sept
+# ADD LINK32 ws2_32.lib jtcd.lib libeay32.lib ssleay32.lib xerces-c_1D.lib /nologo /dll /debug /machine:I386 /out:"Debug/ice001d.dll" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
# Begin Special Build Tool
SOURCE="$(InputPath)"
@@ -236,10 +236,66 @@ SOURCE=.\SslAcceptor.cpp # End Source File
# Begin Source File
+SOURCE=.\SslBaseCerts.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslCertificateAuthority.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslCertificateDesc.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslConfig.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslConfigErrorReporter.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslConnectionOpenSSL.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslConnectionOpenSSLClient.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslConnectionOpenSSLServer.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\SslConnector.cpp
# End Source File
# Begin Source File
+SOURCE=.\SslException.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslFactory.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslGeneralConfig.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslSystem.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslSystemOpenSSL.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslTempCerts.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\SslTransceiver.cpp
# End Source File
# Begin Source File
@@ -532,6 +588,10 @@ SOURCE=..\..\include\Ice\ReferenceF.h # End Source File
# Begin Source File
+SOURCE=.\Security.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\include\Ice\ServantLocator.h
# End Source File
# Begin Source File
@@ -540,15 +600,75 @@ SOURCE=..\..\include\Ice\ServantLocatorF.h # End Source File
# Begin Source File
-SOURCE=.\Ice\SslAcceptor.h
+SOURCE=.\SslAcceptor.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslBaseCerts.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslCertificateAuthority.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslCertificateDesc.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslConfig.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslConfigErrorReporter.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslConnection.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslConnectionOpenSSL.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslConnectionOpenSSLClient.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslConnectionOpenSSLServer.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslConnector.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslException.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslFactory.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslGeneralConfig.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslSystem.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\SslSystemOpenSSL.h
# End Source File
# Begin Source File
-SOURCE=.\Ice\SslConnector.h
+SOURCE=.\SslTempCerts.h
# End Source File
# Begin Source File
-SOURCE=.\Ice\SslTransceiver.h
+SOURCE=.\SslTransceiver.h
# End Source File
# Begin Source File
@@ -584,11 +704,11 @@ SOURCE=.\Ice\ThreadPoolF.h # End Source File
# Begin Source File
-SOURCE=.\Ice\TraceLevels.h
+SOURCE=.\TraceLevels.h
# End Source File
# Begin Source File
-SOURCE=.\Ice\TraceLevelsF.h
+SOURCE=.\TraceLevelsF.h
# End Source File
# Begin Source File
diff --git a/cpp/src/IcePack/Client.cpp b/cpp/src/IcePack/Client.cpp index 8e997e54c0a..797316f0ada 100644 --- a/cpp/src/IcePack/Client.cpp +++ b/cpp/src/IcePack/Client.cpp @@ -129,8 +129,15 @@ run(int argc, char* argv[], const CommunicatorPtr& communicator) cerr << argv[0] << ": property `" << adminEndpointsProperty << "' is not set" << endl; return EXIT_FAILURE; } - - Ice::ObjectPrx base = communicator->stringToProxy("admin:" + adminEndpoints); +
+ string protocol = properties->getProperty("Ice.Protocol");
+ string secureFlag;
+ if (!protocol.compare("ssl"))
+ {
+ secureFlag = " -s ";
+ }
+ + Ice::ObjectPrx base = communicator->stringToProxy("admin" + secureFlag + ":" + adminEndpoints); AdminPrx admin = AdminPrx::checkedCast(base); if (!admin) { |