rename variable to NoLibressl

This commit is contained in:
bagajjal 2017-11-07 16:07:16 -08:00
parent 9b755b284d
commit 4fc40c0959
3 changed files with 12 additions and 12 deletions

View File

@ -20,7 +20,7 @@ $Script:UnitTestResultsFile = Join-Path $TestDataPath $UnitTestResultsFileName
$Script:TestSetupLogFile = Join-Path $TestDataPath $TestSetupLogFileName $Script:TestSetupLogFile = Join-Path $TestDataPath $TestSetupLogFileName
$Script:E2ETestDirectory = Join-Path $repositoryRoot.FullName -ChildPath "regress\pesterTests" $Script:E2ETestDirectory = Join-Path $repositoryRoot.FullName -ChildPath "regress\pesterTests"
$Script:WindowsInBox = $false $Script:WindowsInBox = $false
$Script:UseLibreSSL = $true $Script:NoLibreSSL = $false
$Script:EnableAppVerifier = $true $Script:EnableAppVerifier = $true
$Script:PostmortemDebugging = $false $Script:PostmortemDebugging = $false
@ -58,7 +58,7 @@ function Set-OpenSSHTestEnvironment
$Script:TestSetupLogFile = Join-Path $TestDataPath "TestSetupLog.txt" $Script:TestSetupLogFile = Join-Path $TestDataPath "TestSetupLog.txt"
$Script:UnitTestDirectory = Get-UnitTestDirectory $Script:UnitTestDirectory = Get-UnitTestDirectory
$Script:EnableAppVerifier = -not ($NoAppVerifier.IsPresent) $Script:EnableAppVerifier = -not ($NoAppVerifier.IsPresent)
$Script:UseLibreSSL = -not ($NoLibreSSL.IsPresent) $Script:NoLibreSSL = $NoLibreSSL.IsPresent
if($Script:EnableAppVerifier) if($Script:EnableAppVerifier)
{ {
$Script:PostmortemDebugging = $PostmortemDebugging.IsPresent $Script:PostmortemDebugging = $PostmortemDebugging.IsPresent
@ -80,7 +80,7 @@ function Set-OpenSSHTestEnvironment
"DebugMode" = $DebugMode # run openssh E2E in debug mode "DebugMode" = $DebugMode # run openssh E2E in debug mode
"EnableAppVerifier" = $Script:EnableAppVerifier "EnableAppVerifier" = $Script:EnableAppVerifier
"PostmortemDebugging" = $Script:PostmortemDebugging "PostmortemDebugging" = $Script:PostmortemDebugging
"UseLibreSSL" = $Script:UseLibreSSL "NoLibreSSL" = $Script:NoLibreSSL
} }
#if user does not set path, pick it up #if user does not set path, pick it up

View File

@ -18,8 +18,8 @@ Describe "E2E scenarios for ssh key management" -Tags "CI" {
} }
$keypassphrase = "testpassword" $keypassphrase = "testpassword"
$UseLibreSSL = $OpenSSHTestInfo["UseLibreSSL"] $NoLibreSSL = $OpenSSHTestInfo["NoLibreSSL"]
if($UseLibreSSL) if($NoLibreSSL)
{ {
$keytypes = @("ed25519") $keytypes = @("ed25519")
} }
@ -139,7 +139,7 @@ Describe "E2E scenarios for ssh key management" -Tags "CI" {
{ {
$keyPath = Join-Path $testDir "id_$type" $keyPath = Join-Path $testDir "id_$type"
remove-item $keyPath -ErrorAction SilentlyContinue remove-item $keyPath -ErrorAction SilentlyContinue
if($OpenSSHTestInfo["UseLibreSSL"]) if($OpenSSHTestInfo["NoLibreSSL"])
{ {
ssh-keygen -t $type -P $keypassphrase -f $keyPath -Z aes128-ctr ssh-keygen -t $type -P $keypassphrase -f $keyPath -Z aes128-ctr
} }
@ -252,7 +252,7 @@ Describe "E2E scenarios for ssh key management" -Tags "CI" {
$keyFileName = "sshadd_userPermTestkey_ed25519" $keyFileName = "sshadd_userPermTestkey_ed25519"
$keyFilePath = Join-Path $testDir $keyFileName $keyFilePath = Join-Path $testDir $keyFileName
Remove-Item -path "$keyFilePath*" -Force -ErrorAction SilentlyContinue Remove-Item -path "$keyFilePath*" -Force -ErrorAction SilentlyContinue
if($OpenSSHTestInfo["UseLibreSSL"]) if($OpenSSHTestInfo["NoLibreSSL"])
{ {
ssh-keygen.exe -t ed25519 -f $keyFilePath -P $keypassphrase -Z aes128-ctr ssh-keygen.exe -t ed25519 -f $keyFilePath -P $keypassphrase -Z aes128-ctr
} }
@ -377,23 +377,23 @@ Describe "E2E scenarios for ssh key management" -Tags "CI" {
} }
AfterAll{$tC++} AfterAll{$tC++}
It "$tC.$tI - ssh-keyscan with default arguments" -Skip:$UseLibreSSL { It "$tC.$tI - ssh-keyscan with default arguments" -Skip:$NoLibreSSL {
cmd /c "ssh-keyscan -p $port 127.0.0.1 2>&1 > $outputFile" cmd /c "ssh-keyscan -p $port 127.0.0.1 2>&1 > $outputFile"
$outputFile | Should Contain '.*ssh-rsa.*' $outputFile | Should Contain '.*ssh-rsa.*'
} }
It "$tC.$tI - ssh-keyscan with -p" -Skip:$UseLibreSSL { It "$tC.$tI - ssh-keyscan with -p" -Skip:$NoLibreSSL {
cmd /c "ssh-keyscan -p $port 127.0.0.1 2>&1 > $outputFile" cmd /c "ssh-keyscan -p $port 127.0.0.1 2>&1 > $outputFile"
$outputFile | Should Contain '.*ssh-rsa.*' $outputFile | Should Contain '.*ssh-rsa.*'
} }
It "$tC.$tI - ssh-keyscan with -f" -Skip:$UseLibreSSL { It "$tC.$tI - ssh-keyscan with -f" -Skip:$NoLibreSSL {
Set-Content -Path tmp.txt -Value "127.0.0.1" Set-Content -Path tmp.txt -Value "127.0.0.1"
cmd /c "ssh-keyscan -p $port -f tmp.txt 2>&1 > $outputFile" cmd /c "ssh-keyscan -p $port -f tmp.txt 2>&1 > $outputFile"
$outputFile | Should Contain '.*ssh-rsa.*' $outputFile | Should Contain '.*ssh-rsa.*'
} }
It "$tC.$tI - ssh-keyscan with -f -t" -Skip:$UseLibreSSL { It "$tC.$tI - ssh-keyscan with -f -t" -Skip:$NoLibreSSL {
Set-Content -Path tmp.txt -Value "127.0.0.1" Set-Content -Path tmp.txt -Value "127.0.0.1"
cmd /c "ssh-keyscan -p $port -f tmp.txt -t rsa,dsa 2>&1 > $outputFile" cmd /c "ssh-keyscan -p $port -f tmp.txt -t rsa,dsa 2>&1 > $outputFile"
$outputFile | Should Contain '.*ssh-rsa.*' $outputFile | Should Contain '.*ssh-rsa.*'

View File

@ -50,7 +50,7 @@ Describe "Tests for user Key file permission" -Tags "CI" {
$keyFileName = "sshtest_userPermTestkey_ed25519" $keyFileName = "sshtest_userPermTestkey_ed25519"
$keyFilePath = Join-Path $testDir $keyFileName $keyFilePath = Join-Path $testDir $keyFileName
Remove-Item -path "$keyFilePath*" -Force -ErrorAction SilentlyContinue Remove-Item -path "$keyFilePath*" -Force -ErrorAction SilentlyContinue
if($OpenSSHTestInfo["UseLibreSSL"]) if($OpenSSHTestInfo["NoLibreSSL"])
{ {
ssh-keygen.exe -t ed25519 -f $keyFilePath -P $keypassphrase -Z aes128-ctr ssh-keygen.exe -t ed25519 -f $keyFilePath -P $keypassphrase -Z aes128-ctr
} }