diff options
author | Jose <jose@zeroc.com> | 2016-07-06 12:43:24 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2016-07-06 12:43:24 +0200 |
commit | 313197e14eaed6395f99c6a75467814f2465b8f2 (patch) | |
tree | 5c8b58e874020e948d4f12189d150fe2cac575b7 /cpp/test | |
parent | OpenSSL-1.1.0-pre5 support (diff) | |
parent | Remove IceSSL.SecurityLevel property (diff) | |
download | ice-313197e14eaed6395f99c6a75467814f2465b8f2.tar.bz2 ice-313197e14eaed6395f99c6a75467814f2465b8f2.tar.xz ice-313197e14eaed6395f99c6a75467814f2465b8f2.zip |
Merge remote-tracking branch 'origin/3.6-stretch' into 3.6
Conflicts:
cpp/src/Ice/PropertyNames.cpp
cpp/src/Ice/PropertyNames.h
cpp/test/IceSSL/configuration/AllTests.cpp
csharp/src/Ice/PropertyNames.cs
java/src/Ice/src/main/java/IceInternal/PropertyNames.java
js/src/Ice/PropertyNames.js
Diffstat (limited to 'cpp/test')
-rw-r--r-- | cpp/test/IceSSL/configuration/AllTests.cpp | 43 | ||||
-rw-r--r-- | cpp/test/IceSSL/configuration/Makefile | 2 |
2 files changed, 22 insertions, 23 deletions
diff --git a/cpp/test/IceSSL/configuration/AllTests.cpp b/cpp/test/IceSSL/configuration/AllTests.cpp index 458aded1cbb..12608b4164d 100644 --- a/cpp/test/IceSSL/configuration/AllTests.cpp +++ b/cpp/test/IceSSL/configuration/AllTests.cpp @@ -9,6 +9,9 @@ #include <Ice/Ice.h> #include <IceSSL/Plugin.h> +#if ICE_USE_OPENSSL +# include <openssl/ssl.h> // Required for OPENSSL_VERSION_NUMBER +#endif #include <TestCommon.h> #include <Test.h> #include <fstream> @@ -20,6 +23,17 @@ using namespace std; using namespace Ice; +#ifdef ICE_USE_OPENSSL +// +// With OpenSSL 1.1.0 we need to set SECLEVEL=0 to allow ADH ciphers +// +# if OPENSSL_VERSION_NUMBER >= 0x10100000L +const string anonCiphers = "ADH:@SECLEVEL=0"; +# else +const string anonCiphers = "ADH"; +# endif +#endif + void readFile(const string& file, vector<char>& buffer) { @@ -476,11 +490,7 @@ allTests(const CommunicatorPtr& communicator, const string& testDir, bool p12, b initData.properties = createClientProps(defaultProps, defaultDir, defaultHost, p12); initData.properties->setProperty("Ice.InitPlugins", "0"); # ifdef ICE_USE_OPENSSL - // - // With OpenSSL 1.1.0 we need to set SECLEVEL=0 to allow ADH ciphers - // - initData.properties->setProperty("IceSSL.SecurityLevel", "0"); - initData.properties->setProperty("IceSSL.Ciphers", "ADH"); + initData.properties->setProperty("IceSSL.Ciphers", anonCiphers); # else initData.properties->setProperty("IceSSL.Ciphers", "DH_anon_WITH_AES_256_CBC_SHA"); # endif @@ -493,11 +503,7 @@ allTests(const CommunicatorPtr& communicator, const string& testDir, bool p12, b Test::ServerFactoryPrx fact = Test::ServerFactoryPrx::checkedCast(obj); Test::Properties d = createServerProps(defaultProps, defaultDir, defaultHost, p12); # ifdef ICE_USE_OPENSSL - // - // With OpenSSL 1.1.0 we need to set SECLEVEL=0 to allow ADH ciphers - // - d["IceSSL.SecurityLevel"] = "0"; - d["IceSSL.Ciphers"] = "ADH"; + d["IceSSL.Ciphers"] = anonCiphers; # else d["IceSSL.Ciphers"] = "DH_anon_WITH_AES_256_CBC_SHA"; # endif @@ -1205,11 +1211,7 @@ allTests(const CommunicatorPtr& communicator, const string& testDir, bool p12, b InitializationData initData; initData.properties = createClientProps(defaultProps, defaultDir, defaultHost, p12); # ifdef ICE_USE_OPENSSL - // - // With OpenSSL 1.1.0 we need to set SECLEVEL=0 to allow ADH ciphers - // - initData.properties->setProperty("IceSSL.SecurityLevel", "0"); - initData.properties->setProperty("IceSSL.Ciphers", "ADH"); + initData.properties->setProperty("IceSSL.Ciphers", anonCiphers); # else initData.properties->setProperty("IceSSL.Ciphers", "(DH_anon*)"); # endif @@ -1228,8 +1230,7 @@ allTests(const CommunicatorPtr& communicator, const string& testDir, bool p12, b // With OpenSSL 1.1.0 we need to set SECLEVEL=0 to allow ADH ciphers // string cipherSub = "ADH-"; - d["IceSSL.SecurityLevel"] = "0"; - d["IceSSL.Ciphers"] = "ADH"; + d["IceSSL.Ciphers"] = anonCiphers; # else string cipherSub = "DH_anon"; d["IceSSL.Ciphers"] = "(DH_anon*)"; @@ -1816,11 +1817,7 @@ allTests(const CommunicatorPtr& communicator, const string& testDir, bool p12, b InitializationData initData; initData.properties = createClientProps(defaultProps, defaultDir, defaultHost, p12); # ifdef ICE_USE_OPENSSL - // - // With OpenSSL 1.1.0 we need to set SECLEVEL=0 to allow ADH ciphers - // - initData.properties->setProperty("IceSSL.SecurityLevel", "0"); - initData.properties->setProperty("IceSSL.Ciphers", "ADH"); + initData.properties->setProperty("IceSSL.Ciphers", anonCiphers); # else initData.properties->setProperty("IceSSL.Ciphers", "(DH_anon*)"); # endif @@ -1834,7 +1831,7 @@ allTests(const CommunicatorPtr& communicator, const string& testDir, bool p12, b // d["IceSSL.SecurityLevel"] = "0"; string cipherSub = "ADH-"; - d["IceSSL.Ciphers"] = "RSA:ADH"; + d["IceSSL.Ciphers"] = "RSA:" + anonCiphers; # else string cipherSub = "DH_"; d["IceSSL.Ciphers"] = "(RSA_*) (DH_anon*)"; diff --git a/cpp/test/IceSSL/configuration/Makefile b/cpp/test/IceSSL/configuration/Makefile index 1c5d24f1cdf..489dcb2b4fe 100644 --- a/cpp/test/IceSSL/configuration/Makefile +++ b/cpp/test/IceSSL/configuration/Makefile @@ -35,6 +35,8 @@ CPPFLAGS := -I. -I../../include $(CPPFLAGS) ifeq ($(UNAME),Darwin) LINK_WITH = -framework Security -framework CoreFoundation +else +CPPFLAGS += $(OPENSSL_FLAGS) endif ifeq ($(UNAME),MINGW) |