-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.ps1
30 lines (21 loc) · 1001 Bytes
/
test.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Clear-Host
Push-Location -Path (Join-Path -Path $PSScriptRoot -ChildPath "docker\tools")
function Remove-TestData {
Get-ChildItem -Path . | Where-Object { $_.Name.StartsWith("devcert") } | Remove-Item
}
Remove-TestData
Write-Host "Create with defaults" -ForegroundColor Green
.\certz.exe create
Remove-TestData
Write-Host "Create with all options" -ForegroundColor Green
.\certz.exe create --f devcert.pfx --san *.dev.local localhost 127.0.0.1 --p changeit --c devcert.cer --k devcert.key --days 1825
Write-Host "Install certificate" -ForegroundColor Green
.\certz.exe install --f devcert.pfx --p changeit --sl localmachine --sn root
Write-Host "Remove certificate" -ForegroundColor Green
.\certz.exe remove --subject *.dev.local --sl localmachine --sn root
Remove-TestData
Write-Host "Create only PEM" -ForegroundColor Green
.\certz.exe create --c devcert.cer --k devcert.key
Write-Host "List certificates" -ForegroundColor Green
.\certz.exe list --sl localmachine --sn root
Pop-Location