Set OPENSSL_CONF variable to point to openssl.cfg

This commit is contained in:
Iristyle
2012-11-27 23:08:22 -05:00
parent fc3c34104a
commit ddbf24cbf7
2 changed files with 15 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
<metadata>
<id>OpenSSL.Light</id>
<title>OpenSSL - The Open Source SSL and TLS toolkit</title>
<version>1.0.1.3</version>
<version>1.0.1.20121127</version>
<authors>Shining Light Productions</authors>
<owners>Ethan Brown</owners>
<summary>Open Source SSL v2/v3 and TLS v1 toolkit</summary>

View File

@@ -17,6 +17,19 @@ try {
Install-ChocolateyPackage @params
if (!$Env:OPENSSL_CONF)
{
$configPath = Join-Path $Env:ProgramFiles 'OpenSSL\bin\openssl.cfg'
if (Test-Path $configPath)
{
[Environment]::SetEnvironmentVariable(
'OPENSSL_CONF', $configPath, 'User')
Write-Host "Configured OPENSSL_CONF variable as $configPath"
}
}
Write-ChocolateySuccess $package
} catch {
Write-ChocolateyFailure $package "$($_.Exception.Message)"