mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-29 16:11:05 +01:00
Fixes missing bad certificate override in Control Panel
This commit is contained in:
+11
-12
@@ -97,17 +97,6 @@ namespace TGCommandLine
|
||||
|
||||
static void ReplaceInterface(Interface I)
|
||||
{
|
||||
|
||||
if (!interactive)
|
||||
I.SetBadCertificateHandler((message) =>
|
||||
{
|
||||
foreach (var J in Environment.GetCommandLineArgs())
|
||||
if (J.ToLower() == "--disable-ssl-verification") //im just not even going to document this because i hate it so much
|
||||
return true;
|
||||
return false;
|
||||
});
|
||||
else
|
||||
I.SetBadCertificateHandler(BadCertificateInteractive);
|
||||
currentInterface = I;
|
||||
ConsoleCommand.Interface = I;
|
||||
}
|
||||
@@ -161,10 +150,20 @@ namespace TGCommandLine
|
||||
ReplaceInterface(new Interface());
|
||||
Command.OutputProcVar.Value = Console.WriteLine;
|
||||
if (args.Length != 0)
|
||||
{
|
||||
Interface.SetBadCertificateHandler((message) =>
|
||||
{
|
||||
foreach (var J in args)
|
||||
if (J.ToLower() == "--disable-ssl-verification") //im just not even going to document this because i hate it so much
|
||||
return true;
|
||||
return false;
|
||||
});
|
||||
return (int)RunCommandLine(new List<string>(args));
|
||||
}
|
||||
|
||||
Console.WriteLine("Type 'remote' to connect to a remote service");
|
||||
//interactive mode
|
||||
Interface.SetBadCertificateHandler(BadCertificateInteractive);
|
||||
Console.WriteLine("Type 'remote' to connect to a remote service");
|
||||
while (true)
|
||||
{
|
||||
Console.Write("Enter command: ");
|
||||
|
||||
Reference in New Issue
Block a user