[macOS] Deprecate openssl 1.0.2 and set 1.1 as the default one (#2223)
* switch to 1.1 + test * fix echo * add path test * fix version test * Update comment Co-authored-by: Mike McQuaid <[email protected]> Co-authored-by: Mike McQuaid <[email protected]>
This commit is contained in:
co-authored by
Mike McQuaid
parent
52a29b9213
commit
b635f29ec0
@@ -2,24 +2,11 @@
|
|||||||
|
|
||||||
source ~/utils/utils.sh
|
source ~/utils/utils.sh
|
||||||
|
|
||||||
echo Installing OpenSSL...
|
echo "Install latest openssl"
|
||||||
brew install openssl
|
brew install openssl
|
||||||
|
|
||||||
# Install OpenSSL 1.0.2t
|
echo "Install open[email protected]"
|
||||||
# https://www.openssl.org/policies/releasestrat.html - Version 1.0.2 will be supported until 2019-12-31 (LTS)
|
brew install [email protected]
|
||||||
# To preserve backward compatibility with ruby-toolcache
|
|
||||||
brew tap-new --no-git local/openssl
|
|
||||||
FORMULA_PATH=$(brew extract openssl local/openssl | grep "Homebrew/Library/Taps")
|
|
||||||
brew install $FORMULA_PATH
|
|
||||||
|
|
||||||
# Set OpenSSL 1.0.2t as default
|
# Symlink brew [email protected] to `/usr/local/bin` as Homebrew refuses
|
||||||
ln -sf /usr/local/Cellar/[email protected] /usr/local/Cellar/openssl
|
ln -sf $(brew --prefix [email protected])/bin/openssl /usr/local/bin/openssl
|
||||||
ln -sf /usr/local/Cellar/openssl/1.0.2t/bin/openssl /usr/local/bin/openssl
|
|
||||||
rm /usr/local/opt/openssl
|
|
||||||
ln -sf ../Cellar/openssl/1.0.2t /usr/local/opt/openssl
|
|
||||||
|
|
||||||
# Resolve dot net core openssl dependency issue for agent
|
|
||||||
# https://github.com/microsoft/azure-pipelines-agent/blob/master/docs/start/envosx.md
|
|
||||||
mkdir -p /usr/local/lib/
|
|
||||||
ln -s /usr/local/opt/[email protected]/lib/libcrypto.1.0.0.dylib /usr/local/lib/
|
|
||||||
ln -s /usr/local/opt/[email protected]/lib/libssl.1.0.0.dylib /usr/local/lib/
|
|
||||||
|
|||||||
@@ -156,10 +156,22 @@ Describe "Common utilities" {
|
|||||||
"jq --version" | Should -ReturnZeroExitCode
|
"jq --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
It "OpenSSL" {
|
Context "OpenSSL" {
|
||||||
|
It "OpenSSL is available" {
|
||||||
"openssl version" | Should -ReturnZeroExitCode
|
"openssl version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
It "OpenSSL 1.1 path exists" {
|
||||||
|
$openSSLpath = "/usr/local/opt/[email protected]"
|
||||||
|
$openSSLpath | Should -Exist
|
||||||
|
}
|
||||||
|
|
||||||
|
It "Default OpenSSL version is 1.1" {
|
||||||
|
$commandResult = Get-CommandResult "openssl version"
|
||||||
|
$commandResult.Output | Should -Match "OpenSSL 1.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
It "GnuPG" {
|
It "GnuPG" {
|
||||||
"gpg --version" | Should -ReturnZeroExitCode
|
"gpg --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user