Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

[Net.SecurityProtocolType]::Tls13 Throws Error on Unsupported Systems #1

Closed
thigley986 opened this issue Feb 23, 2021 · 3 comments
Closed
Assignees
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@thigley986
Copy link

The line [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12, [Net.SecurityProtocolType]::Tls13 throws an error on systems that do not support TLS 1.3.

I suggest checking first to see if the system supports TLS 1.3 and, if not, only invoking:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

@rhymeswithmogul
Copy link
Owner

Which version of PowerShell are you using? It works for me on PS7, but I'm going to correct this anyway.

@thigley986
Copy link
Author

Powershell 5.1, Build 17763, Rev 1490 on Server 2019.

@rhymeswithmogul rhymeswithmogul added this to the v1.0.2 milestone Mar 2, 2021
@rhymeswithmogul rhymeswithmogul added bug Something isn't working good first issue Good for newcomers labels Mar 2, 2021
@rhymeswithmogul rhymeswithmogul self-assigned this Mar 2, 2021
@rhymeswithmogul
Copy link
Owner

Thank you for the bug report. I've fixed this by enabling TLS 1.2, then checking to see if TLS 1.3 is available before attempting to enable that. I should have the new version up on the PowerShell Gallery soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants