GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Building PowerShell in Windows results in a mismatch in security certificates · Issue #6233 · PowerShell/PowerShell

Building PowerShell in Windows results in a mismatch in security certificates #6233

New issue
Copy link
New issue
Copy link
Closed
#6235
Closed
Building PowerShell in Windows results in a mismatch in security certificates#6233
#6235
Copy link
Labels
HacktoberfestPotential candidate to participate in HacktoberfestPotential candidate to participate in HacktoberfestOS-WindowsResolution-FixedThe issue is fixed.The issue is fixed.WG-Maintainers-Buildspecific to affecting the buildspecific to affecting the build

Description

@CallmeJoeBob
Joel Joseprabu (CallmeJoeBob)
opened on Feb 24, 2018
Issue body actions

Description

This issue is caused by a mismatch in TLS certification. Windows Powershell ships with version 1 of TLS, while Github requires version 1.2.

Steps to reproduce

When building PowerShell, run the Start-PSBootstrap script

PS C:> Start-PSBootstrap
Installing PowerShell build dependencies
dotnet is already installed.  Skipping installation.
pwsh.exe not found. Install latest PowerShell Core release and add it to Path
VERBOSE: Destination: C:\Users\joelj\AppData\Local\Microsoft\powershell
VERBOSE: About to download package from
'https://github.com/PowerShell/PowerShell/releases/download/v6.0.1/PowerShell-6.0.1-win-x64.zip'
Invoke-WebRequest : The request was aborted: Could not create SSL/TLS secure channel.
At D:\HackIllinois2018\Powershell\PowerShell\tools\install-powershell.ps1:139 char:9
+         Invoke-WebRequest -Uri $downloadURL -OutFile $packagePath
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
   eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

Expected behavior

Script is able to establish a secure channel that matches default Windows certificates

Actual behavior

Error is returned: The request was aborted: could not create SSL/TLS secure channel.

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      5.1.16299.248
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.16299.248
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Activity

  1. vors commented on Feb 24, 2018

    @vors
    sergei (vors)
    on Feb 24, 2018
    Collaborator
    More actions

    Our first issue filled as part of Hackillinois2018! 🎉

  2. sergei (vors)
    added
    OS-Windows
    WG-Maintainers-Buildspecific to affecting the buildspecific to affecting the build
    on Feb 24, 2018
  3. vors commented on Feb 24, 2018

    @vors
    sergei (vors)
    on Feb 24, 2018
    Collaborator
    More actions

    workaround:

    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
    
    Reacted by Ofer Zelig
  4. sergei (vors)
    added
    HacktoberfestPotential candidate to participate in HacktoberfestPotential candidate to participate in Hacktoberfest
    on Feb 24, 2018
  5. iSazonov commented on Feb 24, 2018

    @iSazonov
    Ilya (iSazonov)
    on Feb 24, 2018
    Collaborator
    More actions

    In Powershell Core we already have Invoke-WebRequest -SslProtocol Tls12. I don't remember - maybe it is default. /cc Mark Kraus (@markekraus)
    I don't see the problem if pwsh was installed - we require install pwsh to build.
    So I believe we can close the Issue.

  6. vors commented on Feb 24, 2018

    @vors
    sergei (vors)
    on Feb 24, 2018
    Collaborator
    More actions

    I don't see the problem if pwsh was installed - we require install pwsh to build.

    it should work on windows powershell - this is what used for bootstrapping. There is no requirement to have pwsh for bootstrapping. Fix is on the way.

  7. sergei (vors)
    closed this as completedin #6235on Feb 24, 2018
  8. markekraus commented on Feb 24, 2018

    @markekraus
    Mark Kraus (markekraus)
    on Feb 24, 2018
    Contributor
    More actions

    bad workaround, rushed PR. Please don't do this kind of thing.

    [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 -bor [Net.SecurityProtocolType]::Tls11

    Better workaround, but still rubs me the wrong way.

  9. Ilya (iSazonov)
    added
    Resolution-FixedThe issue is fixed.The issue is fixed.
    on Mar 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    HacktoberfestPotential candidate to participate in HacktoberfestPotential candidate to participate in HacktoberfestOS-WindowsResolution-FixedThe issue is fixed.The issue is fixed.WG-Maintainers-Buildspecific to affecting the buildspecific to affecting the build

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.