-
Notifications
You must be signed in to change notification settings - Fork 383
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
Restore security protocol and use better version using -bor without breaking HTTPS #1076
Restore security protocol and use better version using -bor without breaking HTTPS #1076
Conversation
…Analyzer into RestoreSecurityProtocol # Conflicts: # tools/appveyor.psm1
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 # https://github.com/dotnet/announcements/issues/77 | ||
Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile dotnet-install.ps1 | ||
try { | ||
$originalSecurityProtocol = [Net.ServicePointManager]::SecurityProtocol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could add an if condition that only changes if [Net.SecurityProtocolType]::Tls12
is not currently added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this what the bitwise operator -bor
already does implicitly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my point is you could detect that no change is needed... not set $originalSecurityProtocol
and not restore it if it is not set.
…nalyzer into RestoreSecurityProtocol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No blocking issues
Closing since this behaviour has been already implemented by PR #1107 that got merged first |
PR Summary
See title and discussion in PowerShell/PowerShell#6236
PR Checklist
Note: Tick the boxes below that apply to this pull request by putting an
x
between the square brackets. Please mark anything not applicable to this PRNA
.WIP:
to the beginning of the title and remove the prefix when the PR is ready