forked from namecoin/pkcs11mod
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
$ErrorActionPreference = "Stop" | ||
|
||
Write-Host "===== init DB =====" | ||
|
||
& "./certutil.exe" -N -d . | ||
|
||
Write-Host "===== Default System CKBI =====" | ||
|
||
& "./certutil.exe" -L -d . -h all | Tee-Object -FilePath "list-all-default.txt" | ||
If (!$?) { | ||
exit 222 | ||
} | ||
|
||
& "powershell" "-ExecutionPolicy" "Unrestricted" "-File" "testdata/assert-proxy-log.ps1" -desired "missing" | ||
If (!$?) { | ||
exit 222 | ||
} | ||
|
||
Write-Host "===== System CKBI via pkcs11proxy =====" | ||
|
||
$Env:PKCS11PROXY_CKBI_TARGET = "$Env:CI_BAK_MODULE" | ||
Copy-Item pkcs11proxy.dll -Destination "$Env:CI_MAIN_MODULE" | ||
|
||
& "./certutil.exe" -L -d . -h all | Tee-Object -FilePath "list-all-pkcs11proxy.txt" | ||
If (!$?) { | ||
exit 222 | ||
} | ||
|
||
Write-Host "===== System CKBI diff via pkcs11proxy =====" | ||
|
||
$pkcs11proxydiff = Compare-Object -CaseSensitive -SyncWindow 0 (Get-Content "list-all-default.txt") (Get-Content "list-all-pkcs11proxy.txt") | ||
Write-Host $pkcs11proxydiff | ||
|
||
if ($pkcs11proxydiff.Length -gt 0) { | ||
& "powershell" "-ExecutionPolicy" "Unrestricted" "-File" "testdata/dump-proxy-log-fail.ps1" | ||
exit 222 | ||
} | ||
|
||
& "powershell" "-ExecutionPolicy" "Unrestricted" "-File" "testdata/assert-proxy-log.ps1" -desired "present" | ||
If (!$?) { | ||
exit 222 | ||
} | ||
|
||
Write-Host "===== System CKBI via p11proxy =====" | ||
|
||
$Env:P11PROXY_CKBI_TARGET = "$Env:CI_BAK_MODULE" | ||
Copy-Item p11proxy.dll -Destination "$Env:CI_MAIN_MODULE" | ||
|
||
& "./certutil.exe" -L -d . -h all | Tee-Object -FilePath "list-all-p11proxy.txt" | ||
If (!$?) { | ||
exit 222 | ||
} | ||
|
||
Write-Host "===== System CKBI diff via p11proxy =====" | ||
|
||
$p11proxydiff = Compare-Object -CaseSensitive -SyncWindow 0 (Get-Content "list-all-default.txt") (Get-Content "list-all-p11proxy.txt") | ||
Write-Host $p11proxydiff | ||
|
||
if ($p11proxydiff.Length -gt 0) { | ||
& "powershell" "-ExecutionPolicy" "Unrestricted" "-File" "testdata/dump-proxy-log-fail.ps1" | ||
exit 222 | ||
} | ||
|
||
& "powershell" "-ExecutionPolicy" "Unrestricted" "-File" "testdata/assert-proxy-log.ps1" -desired "present" | ||
If (!$?) { | ||
exit 222 | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
$ErrorActionPreference = "Stop" | ||
|
||
$TBBVersion = ( ( Invoke-WebRequest -UseBasicParsing https://nightlies.tbb.torproject.org/nightly-builds/tor-browser-builds/ ).Links | Where-Object {$_.href -match 'tbb'} ).href | ||
|
||
curl -o "mar-tools.zip" "https://nightlies.tbb.torproject.org/nightly-builds/tor-browser-builds/$TBBVersionnightly-windows-x86_64/mar-tools-win64.zip" | ||
tar -xf "mar-tools.zip" |