Skip to content

Commit

Permalink
Fixed the "CertValidation" parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel.butuzov committed Sep 12, 2024
1 parent 1fe47c2 commit 08a9c8a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
12 changes: 8 additions & 4 deletions Tms.Adapter.Core/Client/TmsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@ public TmsClient(ILogger<TmsClient> logger, TmsSettings settings)
cfg.AddApiKey("Authorization", settings.PrivateToken);

var httpClientHandler = new HttpClientHandler();
httpClientHandler.ServerCertificateCustomValidationCallback = (_, _, _, _) => _settings.CertValidation;

_testRuns = new TestRunsApi(new HttpClient(), cfg, httpClientHandler);
_attachments = new AttachmentsApi(new HttpClient(), cfg, httpClientHandler);
_autoTests = new AutoTestsApi(new HttpClient(), cfg, httpClientHandler);
if (!_settings.CertValidation)
{
httpClientHandler.ServerCertificateCustomValidationCallback = (_, _, _, _) => true;
}

_testRuns = new TestRunsApi(new HttpClient(httpClientHandler), cfg);
_attachments = new AttachmentsApi(new HttpClient(httpClientHandler), cfg);
_autoTests = new AutoTestsApi(new HttpClient(httpClientHandler), cfg);
}

public async Task<bool> IsAutotestExist(string externalId)
Expand Down
2 changes: 1 addition & 1 deletion Tms.Adapter.Core/Tms.Adapter.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>1.6.3</Version>
<Version>1.6.4</Version>
<TargetFramework>netstandard2.1</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>1.6.3</Version>
<Version>1.6.4</Version>
<TargetFramework>netstandard2.1</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
Expand Down
2 changes: 1 addition & 1 deletion Tms.Adapter.XUnit/Tms.Adapter.XUnit.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>1.6.3</Version>
<Version>1.6.4</Version>
<TargetFramework>netstandard2.1</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
Expand Down
2 changes: 1 addition & 1 deletion Tms.Adapter/Tms.Adapter.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>1.6.3</Version>
<Version>1.6.4</Version>
<TargetFramework>netstandard2.1</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
Expand Down
2 changes: 1 addition & 1 deletion TmsRunner/TmsRunner.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>1.6.3</Version>
<Version>1.6.4</Version>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down

0 comments on commit 08a9c8a

Please sign in to comment.