Chocolatey should warn the user when download fails for TLS1.2 / .NET 4
This is based on this Gitter conversation (start and relevant part).
When a package is being downloaded from GitHub (which requires TLS 1.2) Chocolatey will fail with this error message:
2019-03-07 20:42:53,886 4924 [ERROR] - ERROR: The remote file either doesn't exist, is unauthorized, or is forbidden for url 'https://github.com/cbucher/console/releases/download/1.18.3/ConsoleZ.x64.1.18.3.18143.zip'.
Exception calling "GetResponse" with "0" argument(s): "The underlying connection was closed: An unexpected error occurred on a send."
When Chocolatey fails to download a package it should check if it has the TLS ciphers (present in .NET 4.5) and if not warn the user that the download may have failed for that reason (and perhaps to check the logs as the information in there may give them more info to go on) and that they may need to upgrade to .NET 4.5.
Because Chocolatey's base requirement is .NET 4 it might not be apparent that download locations such as GitHub require a more modern .NET version.
Hi @pauby
are you referring to this file?
https://github.com/chocolatey/choco/blob/6ba4f47360cb0324e0d5af4023b46c72165a3a5b/src/chocolatey/infrastructure/registration/SecurityProtocol.cs
this is used in:
https://github.com/chocolatey/choco/blob/047cd5023f80ec47cf3e557f41a943da6c36726f/src/chocolatey/infrastructure.app/services/PowershellService.cs#L470
I believe that this is the class that executes the powershell commands where a warning is suppressed
@mkevenaar I'm not referring to a specific file or code. That's for somebody else to determine :)
Well, consider it determined then :-)
Thanks for logging that!