From b1d8e89820070d1165ff04581b2425d71f4c9fc4 Mon Sep 17 00:00:00 2001 From: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Date: Thu, 23 Oct 2025 11:00:10 +0100 Subject: [PATCH] [Windows] OpenSSL: do not install DLLs globally to system32 (#13203) --- images/windows/scripts/build/Install-OpenSSL.ps1 | 2 +- images/windows/scripts/tests/Tools.Tests.ps1 | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/images/windows/scripts/build/Install-OpenSSL.ps1 b/images/windows/scripts/build/Install-OpenSSL.ps1 index b830adb30..3717ddc54 100644 --- a/images/windows/scripts/build/Install-OpenSSL.ps1 +++ b/images/windows/scripts/build/Install-OpenSSL.ps1 @@ -34,7 +34,7 @@ if ($null -eq $installerUrl) { Install-Binary ` -Url $installerUrl ` - -InstallArgs @('/silent', '/sp-', '/suppressmsgboxes', "/DIR=`"$installDir`"") ` + -InstallArgs @('/silent', '/sp-', '/suppressmsgboxes','/tasks="copytobin"', "/DIR=`"$installDir`"") ` -ExpectedSHA512Sum $installerHash # Update PATH diff --git a/images/windows/scripts/tests/Tools.Tests.ps1 b/images/windows/scripts/tests/Tools.Tests.ps1 index 66caa076d..510915cf5 100644 --- a/images/windows/scripts/tests/Tools.Tests.ps1 +++ b/images/windows/scripts/tests/Tools.Tests.ps1 @@ -235,4 +235,9 @@ Describe "OpenSSL" { It "OpenSSL Full package" { Join-Path ${env:ProgramFiles} 'OpenSSL\include' | Should -Exist } + + It "OpenSSL DLLs not in System32" { + Get-ChildItem -Path "$env:SystemRoot\System32" -Filter "libcrypto-*.dll" -File -ErrorAction SilentlyContinue | Should -BeNullOrEmpty + Get-ChildItem -Path "$env:SystemRoot\System32" -Filter "libssl-*.dll" -File -ErrorAction SilentlyContinue | Should -BeNullOrEmpty + } }