THRIFT-3639 C# Thrift library forces TLS 1.0, thwarting TLS 1.2 usage
Client: C#
Patch: Nobuaki Sukegawa
This closes #871
diff --git a/lib/csharp/test/ThriftTest/TestClient.cs b/lib/csharp/test/ThriftTest/TestClient.cs
index 4c42ef7..cb73597 100644
--- a/lib/csharp/test/ThriftTest/TestClient.cs
+++ b/lib/csharp/test/ThriftTest/TestClient.cs
@@ -27,6 +27,7 @@
using Thrift.Protocol;
using Thrift.Transport;
using Thrift.Test;
+using System.Security.Authentication;
namespace Test
{
@@ -60,7 +61,7 @@
{
string certPath = "../../../../test/keys/client.p12";
X509Certificate cert = new X509Certificate2(certPath, "thrift");
- trans = new TTLSSocket(host, port, cert, (o, c, chain, errors) => true);
+ trans = new TTLSSocket(host, port, 0, cert, (o, c, chain, errors) => true, null, SslProtocols.Tls);
}
else
{
diff --git a/lib/csharp/test/ThriftTest/TestServer.cs b/lib/csharp/test/ThriftTest/TestServer.cs
index 4c8fc3b..e51ae92 100644
--- a/lib/csharp/test/ThriftTest/TestServer.cs
+++ b/lib/csharp/test/ThriftTest/TestServer.cs
@@ -32,6 +32,7 @@
using Thrift;
using System.Threading;
using System.Text;
+using System.Security.Authentication;
namespace Test
{
@@ -468,7 +469,7 @@
if (useEncryption)
{
string certPath = "../../../../test/keys/server.p12";
- trans = new TTLSServerSocket(port, 0, useBufferedSockets, new X509Certificate2(certPath, "thrift"));
+ trans = new TTLSServerSocket(port, 0, useBufferedSockets, new X509Certificate2(certPath, "thrift"), null, null, SslProtocols.Tls);
}
else
{