Skip to content
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

Fix "enable-encryptionscheme" for OSes before Windows 10 #2084

Merged
merged 2 commits into from
Mar 4, 2018

Conversation

milang
Copy link
Contributor

@milang milang commented Mar 4, 2018

- Tested on Windows 8.1 and Windows 10
- Also fixes indentation + clarifying comment
lib/core.ps1 Outdated
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor $scheme
# Net.SecurityProtocolType is a [Flags] enum, binary-OR sets
# the specified scheme in addition to whatever scheme is already active
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor ([Net.SecurityProtocolType]$scheme)
Copy link
Member

Choose a reason for hiding this comment

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

[Net.SecurityProtocolType]$scheme will become [Net.SecurityProtocolType]"Tls12", does it work? Why not [Net.SecurityProtocolType]::Tls12

Copy link
Contributor Author

@milang milang Mar 4, 2018

Choose a reason for hiding this comment

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

Because it is a function that accepts $scheme. The function can be called with other parameters in the future.

... does it work?

Yes I tested in Windows 8.1 and 10.

@r15ch13 r15ch13 merged commit 63b325c into ScoopInstaller:master Mar 4, 2018
@r15ch13 r15ch13 mentioned this pull request Mar 5, 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.

iex cannot convert Tls12 to type System.Int32
3 participants