Merge pull request #519 from Cyberboss/MemesOnCloneNow

Moves the TLS 1.2 meme to global startup
This commit is contained in:
Jordan Brown
2018-06-04 15:18:29 -04:00
committed by GitHub
2 changed files with 4 additions and 2 deletions
-2
View File
@@ -1016,8 +1016,6 @@ namespace TGS.Server
prAPI = prAPI.Replace("github.com", "api.github.com/repos");
prAPI += "/pulls/" + PRNumberString + ".json";
string json;
//tls1.2 meme
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;
using (var wc = new WebClient())
{
wc.Headers.Add("user-agent", "TGS.Server");
+4
View File
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Reflection;
using System.Security.Principal;
using System.ServiceModel;
@@ -89,6 +90,9 @@ namespace TGS.Server
/// <param name="logger">The <see cref="ILogger"/> to use</param>
public Server(string[] args, ILogger logger)
{
//tls1.2 meme
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;
Logger = logger;
Environment.CurrentDirectory = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), Assembly.GetExecutingAssembly().GetName().Name)).FullName; //MOVE THIS POINTER BECAUSE ONE TIME I ALMOST ACCIDENTALLY NUKED MYSELF BY REFACTORING! http://imgur.com/zvGEpJD.png