From 91d00f6e2697559bac441ddcf961e1692c0bea82 Mon Sep 17 00:00:00 2001 From: Erik Darling <2136037+erikdarlingdata@users.noreply.github.com> Date: Fri, 3 Apr 2026 17:53:39 -0400 Subject: [PATCH] Add trust-cert and encryption prompts to CLI installer interactive mode Interactive mode defaulted to Mandatory encryption with no cert trust, causing connection failures on servers with self-signed certificates. The retired GUI installer defaulted to Optional/trust-cert which worked. Now interactive mode prompts for both settings with sensible defaults (trust cert = Y, encryption = Optional) matching the old GUI behavior. Fixes #784 Co-Authored-By: Claude Opus 4.6 (1M context) --- Installer/Program.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Installer/Program.cs b/Installer/Program.cs index daa4cb9d..9c7cb652 100644 --- a/Installer/Program.cs +++ b/Installer/Program.cs @@ -231,6 +231,24 @@ Automated mode with command-line arguments return (int)InstallationResultCode.InvalidArguments; } + Console.Write("Trust server certificate? (Y/N, default Y): "); + string? trustResponse = Console.ReadLine()?.Trim(); + trustCert = string.IsNullOrWhiteSpace(trustResponse) + || trustResponse.Equals("Y", StringComparison.OrdinalIgnoreCase); + + Console.WriteLine("Encryption level:"); + Console.WriteLine(" [O] Optional (default)"); + Console.WriteLine(" [M] Mandatory"); + Console.WriteLine(" [S] Strict"); + Console.Write("Choice (O/M/S, default O): "); + string? encryptResponse = Console.ReadLine()?.Trim(); + encryptionLevel = encryptResponse?.ToUpperInvariant() switch + { + "M" => "Mandatory", + "S" => "Strict", + _ => "Optional" + }; + Console.WriteLine("Authentication type:"); Console.WriteLine(" [W] Windows Authentication (default)"); Console.WriteLine(" [S] SQL Server Authentication");