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

Set security protocol in Windows PowerShell install scripts #105

Merged
merged 2 commits into from
Feb 10, 2023

Conversation

tbirdso
Copy link
Contributor

@tbirdso tbirdso commented Feb 9, 2023

Addresses errors where utilities could not be installed in PowerShell
7.2.9 due to the security protocol not being set.

It appears that SSL3 is obsolete and TLS 1.0 is deprecated. Both protocols are removed
from the list of security protocols to try to set.

The previous error message was misleading and has been updated for
better future proofing.

Resolves an issue in building ITK remote modules where SSL3 is not supported in PowerShell
7.2.9 in GitHub Actions windows-2022 runners, so PowerShell is not set to use TLS 1.2
for fetching sources from python.org, therefore fetching sometimes fails.

xref https://github.com/InsightSoftwareConsortium/itk-wasm/actions/runs/4053853776/jobs/6982667101

With these changes ITK module builds successfully fetch Python sources using install_python.ps1: https://github.com/tbirdso/ITKSplitComponents/actions/runs/4138506454/jobs/7154995112

cc @thewtex @jcfr

Addresses errors where utilities could not be installed in PowerShell
7.2.9 due to the security protocol not being set.

SSL3 is obsolete and TLS 1.0 is deprecated. Both protocols are removed
from the list of security protocols to try to set.

The previous error message was misleading and has been updated for
better future proofing.

xref https://github.com/InsightSoftwareConsortium/itk-wasm/actions/runs/4053853776/jobs/6982667101
Addresses issue where `install_python.ps1` would sometimes fail to fetch
`install_utils.ps1` script from GitHub due to error:

> The SSL connection could not be established

Mirrors routine used in `windows/install_utils.ps1` to set security
protocol prior to attempting to fetch from upstream.
@tbirdso
Copy link
Contributor Author

tbirdso commented Feb 9, 2023

Note that this introduces an implicit requirement that windows/install_utils.ps1 is run with PowerShell 5.1 or higher (requiring .NET Framework 4.5 or higher) so that security protocol type enums can be interpreted. The current recommended LTS version of PowerShell is 7.2.

Copy link
Member

@thewtex thewtex left a comment

Choose a reason for hiding this comment

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

🥇

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.

2 participants