Skip to content

Commit

Permalink
Fix System CAs tests (#1553)
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone authored Oct 12, 2023
1 parent fbc2d6f commit 147719f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 38 deletions.
18 changes: 2 additions & 16 deletions cpp/test/IceSSL/configuration/AllTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4043,15 +4043,8 @@ allTests(Test::TestHelper* helper, const string& /*testDir*/, bool p12)
InitializationData initData;
initData.properties = createClientProps(defaultProps, false);
initData.properties->setProperty("IceSSL.DefaultDir", "");
initData.properties->setProperty("IceSSL.VerifyDepthMax", "4");
initData.properties->setProperty("IceSSL.VerifyDepthMax", "5");
initData.properties->setProperty("Ice.Override.Timeout", "5000"); // 5s timeout
# ifdef _WIN32
//
// 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");
# endif
CommunicatorPtr comm = initialize(initData);
Ice::ObjectPrxPtr p = comm->stringToProxy("Glacier2/router:wss -p 443 -h zeroc.com -r /demo-proxy/chat/glacier2");
while(true)
Expand Down Expand Up @@ -4092,16 +4085,9 @@ allTests(Test::TestHelper* helper, const string& /*testDir*/, bool p12)
InitializationData initData;
initData.properties = createClientProps(defaultProps, false);
initData.properties->setProperty("IceSSL.DefaultDir", "");
initData.properties->setProperty("IceSSL.VerifyDepthMax", "4");
initData.properties->setProperty("IceSSL.VerifyDepthMax", "5");
initData.properties->setProperty("Ice.Override.Timeout", "5000"); // 5s timeout
initData.properties->setProperty("IceSSL.UsePlatformCAs", "1");
# ifdef _WIN32
//
// 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");
# endif
CommunicatorPtr comm = initialize(initData);
Ice::ObjectPrxPtr p = comm->stringToProxy("Glacier2/router:wss -p 443 -h zeroc.com -r /demo-proxy/chat/glacier2");
while(true)
Expand Down
20 changes: 2 additions & 18 deletions csharp/test/IceSSL/configuration/AllTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2443,16 +2443,8 @@ public static Test.ServerFactoryPrx allTests(Test.TestHelper helper, string test

initData = createClientProps(defaultProperties);
initData.properties.setProperty("IceSSL.DefaultDir", "");
initData.properties.setProperty("IceSSL.VerifyDepthMax", "4");
initData.properties.setProperty("IceSSL.VerifyDepthMax", "5");
initData.properties.setProperty("Ice.Override.Timeout", "5000"); // 5s timeout
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 -p 443 -h zeroc.com -r /demo-proxy/chat/glacier2");
while(true)
Expand Down Expand Up @@ -2492,17 +2484,9 @@ public static Test.ServerFactoryPrx allTests(Test.TestHelper helper, string test
retryCount = 0;
initData = createClientProps(defaultProperties);
initData.properties.setProperty("IceSSL.DefaultDir", "");
initData.properties.setProperty("IceSSL.VerifyDepthMax", "4");
initData.properties.setProperty("IceSSL.VerifyDepthMax", "5");
initData.properties.setProperty("Ice.Override.Timeout", "5000"); // 5s timeout
initData.properties.setProperty("IceSSL.UsePlatformCAs", "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 -p 443 -h zeroc.com -r /demo-proxy/chat/glacier2");
while(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2097,7 +2097,7 @@ public class AllTests
int retryCount = 0;

initData = createClientProps(defaultProperties, defaultDir, defaultHost);
initData.properties.setProperty("IceSSL.VerifyDepthMax", "4");
initData.properties.setProperty("IceSSL.VerifyDepthMax", "5");
initData.properties.setProperty("Ice.Override.Timeout", "5000"); // 5s timeout
Ice.Communicator comm = Ice.Util.initialize(initData);
Ice.ObjectPrx p = comm.stringToProxy("dummy:wss -p 443 -h zeroc.com -r /demo-proxy/chat/glacier2");
Expand Down Expand Up @@ -2143,7 +2143,7 @@ public class AllTests
comm.destroy();

initData = createClientProps(defaultProperties, defaultDir, defaultHost);
initData.properties.setProperty("IceSSL.VerifyDepthMax", "4");
initData.properties.setProperty("IceSSL.VerifyDepthMax", "5");
initData.properties.setProperty("Ice.Override.Timeout", "5000"); // 5s timeout
initData.properties.setProperty("IceSSL.UsePlatformCAs", "1");
comm = Ice.Util.initialize(initData);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2097,7 +2097,7 @@ public static ServerFactoryPrx allTests(test.TestHelper helper, String testDir)
int retryCount = 0;

initData = createClientProps(defaultProperties);
initData.properties.setProperty("IceSSL.VerifyDepthMax", "4");
initData.properties.setProperty("IceSSL.VerifyDepthMax", "5");
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 -p 443 -h zeroc.com -r /demo-proxy/chat/glacier2");
Expand Down Expand Up @@ -2144,7 +2144,7 @@ public static ServerFactoryPrx allTests(test.TestHelper helper, String testDir)

retryCount = 0;
initData = createClientProps(defaultProperties);
initData.properties.setProperty("IceSSL.VerifyDepthMax", "4");
initData.properties.setProperty("IceSSL.VerifyDepthMax", "5");
initData.properties.setProperty("Ice.Override.Timeout", "5000"); // 5s timeout
initData.properties.setProperty("IceSSL.UsePlatformCAs", "1");
comm = Util.initialize(initData);
Expand Down

0 comments on commit 147719f

Please sign in to comment.