mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-19 05:53:03 +08:00
[qca] import local certs
This commit is contained in:
parent
90f0e2fb17
commit
03cdf1dc97
@ -22,13 +22,8 @@ Write-Host "Importing: " $certs.Count " certificates ..."
|
||||
|
||||
foreach ($cert in $certs)
|
||||
{
|
||||
$certs.GetIssuerName()
|
||||
$out = New-Object String[] -ArgumentList 3
|
||||
$out[0] = "-----BEGIN CERTIFICATE-----"
|
||||
$out[1] = [System.Convert]::ToBase64String($cert.PublicKey.EncodedKeyValue.RawData, "InsertLineBreaks")
|
||||
$out[2] = "-----END CERTIFICATE-----"
|
||||
|
||||
[System.IO.File]::AppendAllLines($outfile, $out)
|
||||
$outfile = $outpath + "/" + $cert.Thumbprint + ".cer"
|
||||
Export-Certificate -Cert $cert -FilePath $outfile
|
||||
}
|
||||
|
||||
Write-Host "Written to: " $outfile
|
||||
|
Loading…
Reference in New Issue
Block a user