Open coderjoe opened 5 months ago
I'd like to add tests for this, but I believe this would require different appveyor setups using different powershell versions (5 or less, 6, and 7). It was not clear to me how to test across multiple powershell versions. I'm happy to update if I could get some guidance on how best to get that done.
Would love to see this Pull request get in. I'm facing the same issue, especially now I'm trying out the Guest Configuration.
@coderjoe just tested out your change locally.
You've to add the $securityProtocolSettingsOriginal = [System.Net.ServicePointManager]::SecurityProtocol to keep the original. Otherwise it throws an error :)
What a silly thing to miss. Thank you very much for the test @Gijsreyn! Had some local upstaged changes that somehow got missed in the first commit. I'll have to re-test Monday to make sure there isn't anything else I've missed. 👍
@coderjoe No worries champ. Was already glad you had an open pull request here with the fix :)
Why does it take so long to merge? I would like to use it in Azure Policies Guest Configuration as well, but becasue of this, it is not possible.
Thanks!
Description Of Changes
Update the cChocoInstaller to only use SSLv3 for versions lower than Powershell 6
Motivation and Context
SSLv3 was deprecated and removed in Powershell 6+ resulting in the resource throwing an error:
Exception setting "SecurityProtocol": "The requested security protocol is not supported."
Omitting SSLv3 resolved this issue in Powershell 6 and 7 for my use cases.
Testing
Operating Systems Testing
Change Types Made
Change Checklist
Related Issue
Relates to #182 and possibly #173 Fixes #182