Made the PowerShell code work in Windows PowerShell

This commit is contained in:
Violet Hansen
2024-05-23 19:43:38 +03:00
committed by GitHub
parent 8554f5470b
commit 752df9d9d1

View File

@ -111,8 +111,9 @@ certutil.exe -asn <path to signed policy file>
```powershell ```powershell
$CIPolicyBin = 'path to signed policy file' $CIPolicyBin = 'path to signed policy file'
Add-Type -AssemblyName 'System.Security'
$SignedCryptoMsgSyntax = New-Object -TypeName System.Security.Cryptography.Pkcs.SignedCms $SignedCryptoMsgSyntax = New-Object -TypeName System.Security.Cryptography.Pkcs.SignedCms
$SignedCryptoMsgSyntax.Decode((Get-Content -LiteralPath $CIPolicyBin -AsByteStream -Raw)) $SignedCryptoMsgSyntax.Decode([System.IO.File]::ReadAllBytes($CIPolicyBin))
$SignedCryptoMsgSyntax.Certificates | Format-List -Property * $SignedCryptoMsgSyntax.Certificates | Format-List -Property *
``` ```