diff --git a/hack/windows/Install-OVS.ps1 b/hack/windows/Install-OVS.ps1 index 9241e8f465d..a0608c02ef7 100644 --- a/hack/windows/Install-OVS.ps1 +++ b/hack/windows/Install-OVS.ps1 @@ -199,6 +199,22 @@ function InstallOVS() { SetEnvVar "Path" $env:Path } +function CheckIfLibInstalled() { + # Check if SSL library has been installed + $pathEntries = $env:Path.Split(";") | ForEach-Object { + if ((Test-Path "$_/ssleay32.dll" -PathType Leaf) -and (Test-Path "$_/libeay32.dll" -PathType Leaf)) { + Log "Found existing SSL library." + return + } + } + $SSLZip = "openssl-1.0.2u-x64_86-win64.zip" + curl.exe -LO https://indy.fulgan.com/SSL/$SSLZip + Expand-Archive $SSLZip -DestinationPath openssl + cp -Force openssl/*.dll $OVSInstallDir\usr\sbin\ + rm -Recurse -Force openssl + rm $SSLZip +} + function ConfigOVS() { # Create ovsdb config file $OVS_DB_SCHEMA_PATH = "$OVSInstallDir\usr\share\openvswitch\vswitch.ovsschema" @@ -231,6 +247,8 @@ DownloadOVS InstallOVS +CheckIfLibInstalled + ConfigOVS Log "OVS Installation Complete!"