Skip to content

Commit 4c7165b

Browse files
committed
Fix OPENSSL_CONF env
1 parent 374014f commit 4c7165b

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

php/BuildPhp/private/Set-OpenSslTestEnvironment.ps1

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@ function Set-OpenSslTestEnvironment {
22
<#
33
.SYNOPSIS
44
Prepare OpenSSL config directory for tests and unset OPENSSL_CONF.
5+
.PARAMETER
6+
PhpBinDirectory
7+
PHP bin directory
58
#>
69
[CmdletBinding()]
7-
param ()
10+
param (
11+
[Parameter(Mandatory = $true, Position=0, HelpMessage='PHP bin directory')]
12+
[ValidateNotNull()]
13+
[ValidateLength(1, [int]::MaxValue)]
14+
[string] $PhpBinDirectory
15+
)
816
process {
917
foreach ($dir in @('C:\OpenSSL-Win32','C:\OpenSSL-Win64')) {
1018
Remove-Item -LiteralPath $dir -Recurse -Force -ErrorAction SilentlyContinue
@@ -34,6 +42,6 @@ function Set-OpenSslTestEnvironment {
3442
throw "openssl.cnf not found at $source"
3543
}
3644
Copy-Item -LiteralPath $source -Destination $opensslDir -Force
37-
$env:OPENSSL_CONF = ''
45+
$Env:OPENSSL_CONF = "$PhpBinDirectory\extras\ssl\openssl.cnf"
3846
}
3947
}

php/BuildPhp/public/Invoke-PhpTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function Invoke-PhpTests {
8383
Set-OdbcTestEnvironment
8484
Set-MsSqlTestEnvironment
8585
Set-FirebirdTestEnvironment
86-
Set-OpenSslTestEnvironment
86+
Set-OpenSslTestEnvironment -PhpBinDirectory "$buildDirectory\phpbin"
8787
Set-EnchantTestEnvironment
8888
Set-SnmpTestEnvironment -TestsDirectoryPath "$buildDirectory\$testsDirectory"
8989
}

0 commit comments

Comments
 (0)