From 90481c8374ea41e5a1fde0a370fef7e898788192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksander=20Sja=CC=8Afjell?= Date: Wed, 25 Sep 2019 08:32:07 +0200 Subject: [PATCH] Fjerner setting av TLS 1.2 --- Digipost.Signature.Api.Client.Core.Tests/BaseClientTests.cs | 2 -- Digipost.Signature.Api.Client.Core/BaseClient.cs | 2 -- 2 files changed, 4 deletions(-) diff --git a/Digipost.Signature.Api.Client.Core.Tests/BaseClientTests.cs b/Digipost.Signature.Api.Client.Core.Tests/BaseClientTests.cs index b856ff66..00ebbb42 100644 --- a/Digipost.Signature.Api.Client.Core.Tests/BaseClientTests.cs +++ b/Digipost.Signature.Api.Client.Core.Tests/BaseClientTests.cs @@ -14,7 +14,6 @@ public class ConstructorMethod : BaseClientTests public void Initializes_with_properties() { //Arrange - var tlsSetup = SecurityProtocolType.Tls12; var clientConfiguration = new ClientConfiguration(Environment.DifiQa, GetBringCertificate()) { HttpClientTimeoutInMilliseconds = 1441 @@ -25,7 +24,6 @@ public void Initializes_with_properties() //Assert Assert.Equal(clientConfiguration, clientStub.ClientConfiguration); - Assert.Equal(tlsSetup, ServicePointManager.SecurityProtocol); Assert.NotNull(clientStub.RequestHelper); Assert.Equal(clientConfiguration.HttpClientTimeoutInMilliseconds, clientStub.HttpClient.Timeout.TotalMilliseconds); } diff --git a/Digipost.Signature.Api.Client.Core/BaseClient.cs b/Digipost.Signature.Api.Client.Core/BaseClient.cs index ccdc77dc..256d4070 100644 --- a/Digipost.Signature.Api.Client.Core/BaseClient.cs +++ b/Digipost.Signature.Api.Client.Core/BaseClient.cs @@ -26,8 +26,6 @@ protected BaseClient(ClientConfiguration clientConfiguration, ILoggerFactory log _logger = loggerFactory.CreateLogger(); _loggerFactory = loggerFactory; - ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; - ClientConfiguration = clientConfiguration; HttpClient = MutualTlsClient(); RequestHelper = new RequestHelper(HttpClient, _loggerFactory);