Skip to content

Commit 984c49c

Browse files
committed
Fix net-v14.1.1.0-core github build failures (net-main -> v14.1.1.0-core @111754)
[git-p4: depot-paths = "//dev/release.net/coherence-net-v14.1.1.0-core/": change = 112081]
1 parent 75442b3 commit 984c49c

File tree

6 files changed

+384
-21
lines changed

6 files changed

+384
-21
lines changed

tests/Coherence.Core.Tests/Net/Impl/SSLOneWayRemoteNamedCacheTests.cs

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
/*
2-
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
2+
* Copyright (c) 2000, 2024, Oracle and/or its affiliates.
33
*
44
* Licensed under the Universal Permissive License v 1.0 as shown at
5-
* http://oss.oracle.com/licenses/upl.
5+
* https://oss.oracle.com/licenses/upl.
66
*/
77
using System;
8-
using System.IO;
8+
using System.Runtime.InteropServices;
99

1010
using NUnit.Framework;
11-
using Tangosol.Net.Cache;
12-
using Tangosol.Net.Messaging.Impl.NamedCache;
13-
using Tangosol.Util;
1411

1512
namespace Tangosol.Net.Impl
1613
{
@@ -22,6 +19,25 @@ protected override String TestCacheName
2219
get { return "sslOneWayCacheName"; }
2320
}
2421

22+
[SetUp]
23+
public void SetUp()
24+
{
25+
var configFileName = "assembly://Coherence.Tests/Tangosol.Resources/s4hc-cache-config-ssl.xml";
26+
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
27+
{
28+
configFileName = "assembly://Coherence.Tests/Tangosol.Resources/s4hc-cache-config-ssl-non-win.xml";
29+
}
30+
31+
var ccf = new DefaultConfigurableCacheFactory(configFileName);
32+
CacheFactory.ConfigurableCacheFactory = ccf;
33+
}
34+
35+
[TearDown]
36+
public void TearDown()
37+
{
38+
CacheFactory.Shutdown();
39+
}
40+
2541
[Test]
2642
public virtual void TestNamedCache()
2743
{

tests/Coherence.Core.Tests/Net/Impl/SSLRemoteNamedCacheTests.cs

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
/*
2-
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
2+
* Copyright (c) 2000, 2024, Oracle and/or its affiliates.
33
*
44
* Licensed under the Universal Permissive License v 1.0 as shown at
5-
* http://oss.oracle.com/licenses/upl.
5+
* https://oss.oracle.com/licenses/upl.
66
*/
77
using System;
88
using System.IO;
99
using System.Collections;
1010
using System.Collections.Specialized;
11+
using System.Runtime.InteropServices;
1112
using System.Threading;
1213

1314
using NUnit.Framework;
14-
using Tangosol.Net.Cache;
15-
using Tangosol.Net.Messaging.Impl.NamedCache;
16-
using Tangosol.Util;
1715

1816
namespace Tangosol.Net.Impl {
1917

@@ -35,6 +33,25 @@ protected String TwoWayCacheName
3533
set { m_cacheName = value; }
3634
}
3735

36+
[SetUp]
37+
public void SetUp()
38+
{
39+
var configFileName = "assembly://Coherence.Tests/Tangosol.Resources/s4hc-cache-config-ssl.xml";
40+
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
41+
{
42+
configFileName = "assembly://Coherence.Tests/Tangosol.Resources/s4hc-cache-config-ssl-non-win.xml";
43+
}
44+
45+
var ccf = new DefaultConfigurableCacheFactory(configFileName);
46+
CacheFactory.ConfigurableCacheFactory = ccf;
47+
}
48+
49+
[TearDown]
50+
public void TearDown()
51+
{
52+
CacheFactory.Shutdown();
53+
}
54+
3855
[Test]
3956
public virtual void TestOneWayNamedCache()
4057
{

tests/Coherence.Core.Tests/Net/Impl/SSLTwoWayRemoteNamedCacheTests.cs

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
/*
2-
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
2+
* Copyright (c) 2000, 2024, Oracle and/or its affiliates.
33
*
44
* Licensed under the Universal Permissive License v 1.0 as shown at
5-
* http://oss.oracle.com/licenses/upl.
5+
* https://oss.oracle.com/licenses/upl.
66
*/
77
using System;
8+
using System.Runtime.InteropServices;
89
using System.IO;
910

1011
using NUnit.Framework;
11-
using Tangosol.Net.Cache;
12-
using Tangosol.Net.Messaging.Impl.NamedCache;
13-
using Tangosol.Util;
1412

1513
namespace Tangosol.Net.Impl
1614
{
@@ -22,6 +20,25 @@ protected override String TestCacheName
2220
get { return "sslTwoWayCacheName"; }
2321
}
2422

23+
[SetUp]
24+
public void SetUp()
25+
{
26+
var configFileName = "assembly://Coherence.Tests/Tangosol.Resources/s4hc-cache-config-ssl.xml";
27+
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
28+
{
29+
configFileName = "assembly://Coherence.Tests/Tangosol.Resources/s4hc-cache-config-ssl-non-win.xml";
30+
}
31+
32+
var ccf = new DefaultConfigurableCacheFactory(configFileName);
33+
CacheFactory.ConfigurableCacheFactory = ccf;
34+
}
35+
36+
[TearDown]
37+
public void TearDown()
38+
{
39+
CacheFactory.Shutdown();
40+
}
41+
2542
[Test]
2643
public virtual void TestNamedCache()
2744
{

tests/Coherence.Core.Tests/Net/Impl/TLS12OneWayRemoteNamedCacheTests.cs

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
/*
2-
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
2+
* Copyright (c) 2000, 2024, Oracle and/or its affiliates.
33
*
44
* Licensed under the Universal Permissive License v 1.0 as shown at
5-
* http://oss.oracle.com/licenses/upl.
5+
* https://oss.oracle.com/licenses/upl.
66
*/
77
using System;
8+
using System.Runtime.InteropServices;
89
using System.IO;
910

1011
using NUnit.Framework;
11-
using Tangosol.Net.Cache;
12-
using Tangosol.Net.Messaging.Impl.NamedCache;
13-
using Tangosol.Util;
1412

1513
namespace Tangosol.Net.Impl
1614
{
@@ -22,6 +20,25 @@ protected override String TestCacheName
2220
get { return "tls12CacheName"; }
2321
}
2422

23+
[SetUp]
24+
public void SetUp()
25+
{
26+
var configFileName = "assembly://Coherence.Tests/Tangosol.Resources/s4hc-cache-config-ssl.xml";
27+
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
28+
{
29+
configFileName = "assembly://Coherence.Tests/Tangosol.Resources/s4hc-cache-config-ssl-non-win.xml";
30+
}
31+
32+
var ccf = new DefaultConfigurableCacheFactory(configFileName);
33+
CacheFactory.ConfigurableCacheFactory = ccf;
34+
}
35+
36+
[TearDown]
37+
public void TearDown()
38+
{
39+
CacheFactory.Shutdown();
40+
}
41+
2542
[Test]
2643
public virtual void TestNamedCache()
2744
{
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright (c) 2024, Oracle and/or its affiliates.
3+
*
4+
* Licensed under the Universal Permissive License v 1.0 as shown at
5+
* https://oss.oracle.com/licenses/upl.
6+
*/
7+
using System;
8+
using System.Net.Security;
9+
using System.Security.Cryptography.X509Certificates;
10+
using System.Text;
11+
12+
namespace Tangosol.Net.Ssl
13+
{
14+
public sealed class CertificateValidatorNonWindows
15+
{
16+
public CertificateValidatorNonWindows()
17+
{
18+
}
19+
20+
/// <summary>
21+
/// Verifies the remote Secure Sockets Layer (SSL) certificate used for authentication. This callback
22+
/// ignores the content of the Common Name for the certificate during the validation.
23+
/// </summary>
24+
/// <param name="sender">An object that contains state information for this validation.</param>
25+
/// <param name="certificate">The certificate used to authenticate the remote party.</param>
26+
/// <param name="chain">The chain of certificate authorities associated with the remote certificate.</param>
27+
/// <param name="errors">One or more errors associated with the remote certificate.</param>
28+
/// <returns>A Boolean value that determines whether the specified certificate is accepted for authentication.</returns>
29+
public static bool IgnoreCommonNameCertificateValidation(object sender, X509Certificate certificate,
30+
X509Chain chain, SslPolicyErrors errors)
31+
{
32+
return true;
33+
34+
}
35+
}
36+
}

0 commit comments

Comments
 (0)