Skip to content

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

Merged
r15ch13 merged 2 commits intoScoopInstaller:masterfrom
milang:fix-tls12setter
Mar 4, 2018
Merged

Fix "enable-encryptionscheme" for OSes before Windows 10#2084
r15ch13 merged 2 commits intoScoopInstaller:masterfrom
milang:fix-tls12setter

Conversation

@milang
Copy link
Copy Markdown
Contributor

@milang milang commented Mar 4, 2018

- Tested on Windows 8.1 and Windows 10
- Also fixes indentation + clarifying comment
Comment thread 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
Copy Markdown
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
Copy Markdown
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