profile
viewpoint

Ask questionsTLS 1.0 support

https://deno.land/x/install/install.ps1 redirects to https://raw.githubusercontent.com/denoland/deno_install/master/install.ps1:

$ curl -I https://deno.land/x/install/install.ps1 | grep Location:
Location: https://raw.githubusercontent.com/denoland/deno_install/master/install.ps1

deno.land does not work with TLS 1.0.

$ curl --tls-max 1.2 https://deno.land/x/install/install.ps1
$ curl --tls-max 1.0 https://deno.land/x/install/install.ps1
-curl: (35) error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure

However, raw.githubusercontent.com works fine with TLS 1.0.

$ curl --tls-max 1.2 https://raw.githubusercontent.com/denoland/deno_install/master/install.ps1
$ curl --tls-max 1.0 https://raw.githubusercontent.com/denoland/deno_install/master/install.ps1

There have been a number of issues because PowerShell <v6 uses TLS 1.0 by default.

For example:

  • https://github.com/denoland/deno_install/issues/51
  • https://github.com/denoland/deno_install/issues/16
  • https://github.com/denoland/deno/issues/1729

The default PowerShell version for Windows 8 is v4, for Windows 10 it is v5. So this impacts nearly all PowerShell users.

The following fixes are possible:

  • (1) Changing the one-line install command to use TLS 1.2
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iwr https://deno.land/x/install/install.ps1 | iex
  • (2) Changing the one-line install command to point directly to GitHub
iwr https://raw.githubusercontent.com/denoland/deno_install/master/install.ps1 | iex
  • (3) Enabling TLS 1.0 for deno.land

cc @ry

denoland/deno_install

Answer questions MarkTiedemann

@ry I don't think this is fixed yet, or maybe it's a weird Windows issue...

C:\>curl --version
curl 7.55.1 (Windows) libcurl/7.55.1 WinSSL
Release-Date: [unreleased]
Protocols: dict file ftp ftps http https imap imaps pop3 pop3s smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL

C:\>curl --tlsv1.0 https://deno.land/x/install/install.ps1
curl: (35) schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE (0x80090326) - This error usually occurs when a fatal SSL/TLS alert is received (e.g. handshake failed). More detail may be available in the Windows System event log.

C:\>powershell -c "$PSVersionTable"

Name                           Value
----                           -----
PSVersion                      5.1.17134.765
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17134.765
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

C:\>powershell -c "iwr https://deno.land/x/install/install.ps1"
iwr : The request was aborted: Could not create SSL/TLS secure channel.
At line:1 char:1
+ iwr https://deno.land/x/install/install.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
   eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

useful!

Related questions

No questions were found.
source:https://uonfu.com/
Github User Rank List