Skip to content

Work around TLS 1.2 requirement #6689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 31, 2018
Merged

Work around TLS 1.2 requirement #6689

merged 3 commits into from
Jul 31, 2018

Conversation

MattGal
Copy link
Member

@MattGal MattGal commented Jul 26, 2018

The changed line broke some time this morning; most Windows Powershell instances default to TLS 1.1 and will thus fail with wget : The underlying connection was closed: An unexpected error occurred on a send. trying to run the previous command.

Summary

https://dot.net has been moved to TLS 1.2 only, some docs don't account for this.

Fixes Problem bootstrapping .NET

The changed line broke some time this morning;  most Windows Powershell instances default to TLS 1.1 and will thus fail with `wget : The underlying connection was closed: An unexpected error occurred on a send.` trying to run the previous command.
@MattGal MattGal requested a review from mairaw as a code owner July 26, 2018 21:15
MattGal added 2 commits July 26, 2018 14:21
Deleted  additional install-script args when testing my change
Copy link

@bergmeister bergmeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A simpler solution would be:

-`@powershell -NoProfile -ExecutionPolicy unrestricted -Command "&([scriptblock]::Create(([Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) <additional install-script args>"`

I do not see the need of creating and invoking the scriptblock

@mairaw
Copy link
Contributor

mairaw commented Jul 30, 2018

@johnbeisner can you take a look at this please?

@johnbeisner
Copy link
Contributor

Tested successfully:
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) -Version 2.1.301"

@MattGal
Copy link
Member Author

MattGal commented Jul 31, 2018

@mairaw can't be merged until I think you approve?

@mairaw
Copy link
Contributor

mairaw commented Jul 31, 2018

Done @MattGal. Yes, one of the writers has to approve. 😉

@mairaw mairaw merged commit e32d0f7 into dotnet:master Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants