Skip to content

Commit c5983ad

Browse files
ManniManfrednmklotas
authored andcommitted
Explicit allow tls 1.1 and 1.2 (#30)
* support net45 * explicit allow tls 1.1 and 1.2
1 parent e732ece commit c5983ad

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/GitLabApiClient/Internal/Http/GitLabHttpFacade.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Net;
34
using System.Net.Http;
45
using System.Threading.Tasks;
56
using GitLabApiClient.Internal.Http.Serialization;
@@ -20,6 +21,8 @@ internal sealed class GitLabHttpFacade
2021

2122
public GitLabHttpFacade(string hostUrl, RequestsJsonSerializer jsonSerializer, string authenticationToken = "")
2223
{
24+
// allow tls 1.1 and 1.2
25+
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
2326
_httpClient = new HttpClient
2427
{
2528
BaseAddress = new Uri(hostUrl)

0 commit comments

Comments
 (0)