summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2019-07-09 18:05:17 +0200
committerBenoit Foucher <benoit@zeroc.com>2019-07-09 18:05:17 +0200
commit3196b6cc018e30605c7dc9b9d384c5e14b5ee46a (patch)
tree9b23d25e300c79fd0ad11c387698d25397547940
parentFixed dispatcher test failure, fixes #167 (diff)
downloadice-3196b6cc018e30605c7dc9b9d384c5e14b5ee46a.tar.bz2
ice-3196b6cc018e30605c7dc9b9d384c5e14b5ee46a.tar.xz
ice-3196b6cc018e30605c7dc9b9d384c5e14b5ee46a.zip
IceSSL fixes for RHEL8
-rw-r--r--cpp/test/IceSSL/configuration/AllTests.cpp4
-rw-r--r--csharp/test/IceSSL/configuration/AllTests.cs41
-rw-r--r--java-compat/test/src/main/java/test/IceSSL/configuration/AllTests.java8
-rw-r--r--java/test/src/main/java/test/IceSSL/configuration/AllTests.java8
4 files changed, 41 insertions, 20 deletions
diff --git a/cpp/test/IceSSL/configuration/AllTests.cpp b/cpp/test/IceSSL/configuration/AllTests.cpp
index 2fcba33ecb1..bd3d2ea6d8d 100644
--- a/cpp/test/IceSSL/configuration/AllTests.cpp
+++ b/cpp/test/IceSSL/configuration/AllTests.cpp
@@ -4235,7 +4235,7 @@ allTests(Test::TestHelper* helper, const string& /*testDir*/, bool p12)
initData.properties->setProperty("IceSSL.Protocols", "TLS1_0,TLS1_1");
# endif
CommunicatorPtr comm = initialize(initData);
- Ice::ObjectPrxPtr p = comm->stringToProxy("Glacier2/router:wss -h demo.zeroc.com -p 5064");
+ Ice::ObjectPrxPtr p = comm->stringToProxy("Glacier2/router:wss -p 443 -h zeroc.com -r /demo-proxy/chat/glacier2");
while(true)
{
try
@@ -4285,7 +4285,7 @@ allTests(Test::TestHelper* helper, const string& /*testDir*/, bool p12)
initData.properties->setProperty("IceSSL.Protocols", "TLS1_0,TLS1_1");
# endif
CommunicatorPtr comm = initialize(initData);
- Ice::ObjectPrxPtr p = comm->stringToProxy("Glacier2/router:wss -h demo.zeroc.com -p 5064");
+ Ice::ObjectPrxPtr p = comm->stringToProxy("Glacier2/router:wss -p 443 -h zeroc.com -r /demo-proxy/chat/glacier2");
while(true)
{
try
diff --git a/csharp/test/IceSSL/configuration/AllTests.cs b/csharp/test/IceSSL/configuration/AllTests.cs
index 71e5954d952..f8d66796217 100644
--- a/csharp/test/IceSSL/configuration/AllTests.cs
+++ b/csharp/test/IceSSL/configuration/AllTests.cs
@@ -1199,6 +1199,10 @@ public class AllTests
server.ice_ping();
//test(false);
}
+ catch(Ice.SecurityException)
+ {
+ // Expected.
+ }
catch(Ice.ConnectionLostException)
{
// Expected.
@@ -1227,8 +1231,11 @@ public class AllTests
}
catch(Ice.LocalException ex)
{
- Console.WriteLine(ex.ToString());
- test(false);
+ if(ex.ToString().IndexOf("no protocols available") < 0) // Expected if TLS1.1 is disabled (RHEL8)
+ {
+ Console.WriteLine(ex.ToString());
+ test(false);
+ }
}
fact.destroyServer(server);
comm.destroy();
@@ -2390,13 +2397,16 @@ public class AllTests
initData.properties.setProperty("IceSSL.DefaultDir", "");
initData.properties.setProperty("IceSSL.VerifyDepthMax", "4");
initData.properties.setProperty("Ice.Override.Timeout", "5000"); // 5s timeout
- //
- // BUGFIX: SChannel TLS 1.2 bug that affects Windows versions prior to Windows 10
- // can cause SSL handshake errors when connecting to the remote zeroc server.
- //
- initData.properties.setProperty("IceSSL.Protocols", "TLS1_0,TLS1_1");
+ if(IceInternal.AssemblyUtil.isWindows)
+ {
+ //
+ // BUGFIX: SChannel TLS 1.2 bug that affects Windows versions prior to Windows 10
+ // can cause SSL handshake errors when connecting to the remote zeroc server.
+ //
+ initData.properties.setProperty("IceSSL.Protocols", "TLS1_0,TLS1_1");
+ }
Ice.Communicator comm = Ice.Util.initialize(initData);
- Ice.ObjectPrx p = comm.stringToProxy("dummy:wss -h demo.zeroc.com -p 5064");
+ Ice.ObjectPrx p = comm.stringToProxy("dummy:wss -p 443 -h zeroc.com -r /demo-proxy/chat/glacier2");
while(true)
{
try
@@ -2437,13 +2447,16 @@ public class AllTests
initData.properties.setProperty("IceSSL.VerifyDepthMax", "4");
initData.properties.setProperty("Ice.Override.Timeout", "5000"); // 5s timeout
initData.properties.setProperty("IceSSL.UsePlatformCAs", "1");
- //
- // BUGFIX: SChannel TLS 1.2 bug that affects Windows versions prior to Windows 10
- // can cause SSL handshake errors when connecting to the remote zeroc server.
- //
- initData.properties.setProperty("IceSSL.Protocols", "TLS1_0,TLS1_1");
+ if(IceInternal.AssemblyUtil.isWindows)
+ {
+ //
+ // BUGFIX: SChannel TLS 1.2 bug that affects Windows versions prior to Windows 10
+ // can cause SSL handshake errors when connecting to the remote zeroc server.
+ //
+ initData.properties.setProperty("IceSSL.Protocols", "TLS1_0,TLS1_1");
+ }
comm = Ice.Util.initialize(initData);
- p = comm.stringToProxy("dummy:wss -h demo.zeroc.com -p 5064");
+ p = comm.stringToProxy("dummy:wss -p 443 -h zeroc.com -r /demo-proxy/chat/glacier2");
while(true)
{
try
diff --git a/java-compat/test/src/main/java/test/IceSSL/configuration/AllTests.java b/java-compat/test/src/main/java/test/IceSSL/configuration/AllTests.java
index 1538ab3d901..e4a57497ee6 100644
--- a/java-compat/test/src/main/java/test/IceSSL/configuration/AllTests.java
+++ b/java-compat/test/src/main/java/test/IceSSL/configuration/AllTests.java
@@ -1509,6 +1509,10 @@ public class AllTests
IceSSL.ConnectionInfo info = (IceSSL.ConnectionInfo)server.ice_getConnection().getInfo();
test(info.cipher.toLowerCase().contains("dss"));
}
+ catch(Ice.ConnectionLostException ex)
+ {
+ // Expected on systems that disable DSA
+ }
catch(Ice.LocalException ex)
{
ex.printStackTrace();
@@ -2250,7 +2254,7 @@ public class AllTests
initData.properties.setProperty("IceSSL.VerifyDepthMax", "4");
initData.properties.setProperty("Ice.Override.Timeout", "5000"); // 5s timeout
Ice.Communicator comm = Ice.Util.initialize(initData);
- Ice.ObjectPrx p = comm.stringToProxy("dummy:wss -h demo.zeroc.com -p 5064");
+ Ice.ObjectPrx p = comm.stringToProxy("dummy:wss -p 443 -h zeroc.com -r /demo-proxy/chat/glacier2");
while(true)
{
try
@@ -2297,7 +2301,7 @@ public class AllTests
initData.properties.setProperty("Ice.Override.Timeout", "5000"); // 5s timeout
initData.properties.setProperty("IceSSL.UsePlatformCAs", "1");
comm = Ice.Util.initialize(initData);
- p = comm.stringToProxy("dummy:wss -h demo.zeroc.com -p 5064");
+ p = comm.stringToProxy("dummy:wss -p 443 -h zeroc.com -r /demo-proxy/chat/glacier2");
while(true)
{
try
diff --git a/java/test/src/main/java/test/IceSSL/configuration/AllTests.java b/java/test/src/main/java/test/IceSSL/configuration/AllTests.java
index 95cb082b04c..1f978a03e7d 100644
--- a/java/test/src/main/java/test/IceSSL/configuration/AllTests.java
+++ b/java/test/src/main/java/test/IceSSL/configuration/AllTests.java
@@ -1509,6 +1509,10 @@ public class AllTests
(com.zeroc.IceSSL.ConnectionInfo)server.ice_getConnection().getInfo();
test(info.cipher.toLowerCase().contains("dss"));
}
+ catch(com.zeroc.Ice.ConnectionLostException ex)
+ {
+ // Expected on systems that disable DSA
+ }
catch(com.zeroc.Ice.LocalException ex)
{
ex.printStackTrace();
@@ -2250,7 +2254,7 @@ public class AllTests
initData.properties.setProperty("IceSSL.VerifyDepthMax", "4");
initData.properties.setProperty("Ice.Override.Timeout", "5000"); // 5s timeout
com.zeroc.Ice.Communicator comm = Util.initialize(initData);
- com.zeroc.Ice.ObjectPrx p = comm.stringToProxy("dummy:wss -h demo.zeroc.com -p 5064");
+ com.zeroc.Ice.ObjectPrx p = comm.stringToProxy("dummy:wss -p 443 -h zeroc.com -r /demo-proxy/chat/glacier2");
while(true)
{
try
@@ -2298,7 +2302,7 @@ public class AllTests
initData.properties.setProperty("Ice.Override.Timeout", "5000"); // 5s timeout
initData.properties.setProperty("IceSSL.UsePlatformCAs", "1");
comm = Util.initialize(initData);
- p = comm.stringToProxy("dummy:wss -h demo.zeroc.com -p 5064");
+ p = comm.stringToProxy("dummy:wss -p 443 -h zeroc.com -r /demo-proxy/chat/glacier2");
while(true)
{
try