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

Consider remove SSL 3.0 form SecurityProtocol in Update-Package #206

Closed
xa0082249956 opened this issue Feb 15, 2020 · 9 comments
Closed

Comments

@xa0082249956
Copy link

From PowerShell/PowerShell#7474, SSL 3.0 was deprecated and won't be supported by PowerShell Core.

So we should consider remove SSL 3.0 from [System.Net.ServicePointManager]::SecurityProtocol in Update-Package.ps1:

[System.Net.ServicePointManager]::SecurityProtocol = 'Ssl3,Tls,Tls11,Tls12' #https://github.com/chocolatey/chocolatey-coreteampackages/issues/366

Releated issue: #158

kai2nenobu added a commit to kai2nenobu/my-chocolatey-packages that referenced this issue Aug 7, 2020
powershell7で動作するようにパッチを当ててあります。

https://<i></i>github.com/majkinetor/au/issues/206

のissueが解決してくれれば良さそうなんだけど、手がつけられて
なさそうだったので、自分でやった。
@jetersen
Copy link
Contributor

jetersen commented Aug 18, 2020

The proper fix is https://gist.github.com/jetersen/0ac37e3f684947889d53cccb7391a9c5 based om https://docs.microsoft.com/en-us/dotnet/framework/network-programming/tls#if-your-app-targets-a-net-framework-version-earlier-than-47

Should be mentioned this only applies to Windows Powershell v5 and below.

@majkinetor majkinetor reopened this Aug 18, 2020
majkinetor added a commit that referenced this issue Aug 18, 2020
Set back the tls support and solve Issues #206
@javydekoning
Copy link

I think I'm running into this issue as well. Trying to run updateall on 7.0.3 I get Exception setting "SecurityProtocol": "The requested security protocol is not supported."

@majkinetor
Copy link
Owner

Are you running latest master version or not ? This change isnt yet published.

@javydekoning
Copy link

Ah, yes installing like

          git clone -q https://github.com/majkinetor/au.git $Env:TEMP/au
          . "$Env:TEMP/au/scripts/Install-AU.ps1" $Env:au_version

@majkinetor
Copy link
Owner

Mhm... not sure why, I run 7.0.3 also without a problem. U say updateall brings this, but this is in individual updaters, does all packages fail or something else happen ?

Did you try to modify the line in original posters question to make it work ?

@javydekoning
Copy link

Because my $Env:au_version was $null Install-AU.ps1 defaulted to the latest release.

Using setting $Env:au_version to master fixes the issue indeed.

I didn't realize #216 was not in the latest release.

@majkinetor
Copy link
Owner

No problem :)

@javydekoning
Copy link

javydekoning commented Oct 29, 2020

I still face the issue because of:

[System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor [System.Net.SecurityProtocolType]::Tls -bor [System.Net.SecurityProtocolType]::Ssl3

And:

au/publish.ps1

Line 58 in b976947

[System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor [System.Net.SecurityProtocolType]::Tls -bor [System.Net.SecurityProtocolType]::Ssl3

Running Gist
  ERROR:  
    Exception setting "SecurityProtocol": "The requested security protocol is not supported."

Consider switching to tls1.2 like:

[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072

@majkinetor
Copy link
Owner

Thx for reporting this. publish.ps1 isn't used by AU but myself when publishing new version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants