mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 04:09:28 +00:00
14 lines
705 B
PowerShell
14 lines
705 B
PowerShell
Param(
|
|
[string]$AuthCertificateBase64,
|
|
[string]$AuthCertificateKey
|
|
)
|
|
|
|
# Import auth certificate
|
|
$AuthCertificateFileName = [System.IO.Path]::GetTempFileName()
|
|
$AuthCertificateBytes = [Convert]::FromBase64String($AuthCertificateBase64)
|
|
[IO.File]::WriteAllBytes($AuthCertificateFileName, $AuthCertificateBytes)
|
|
$AuthCertificate = Import-PfxCertificate -FilePath $AuthCertificateFileName -CertStoreLocation Cert:\LocalMachine\My -Password (ConvertTo-SecureString $AuthCertificateKey -AsPlainText -Force)
|
|
rm $AuthCertificateFileName
|
|
$ESRPAuthCertificateSubjectName = $AuthCertificate.Subject
|
|
|
|
Write-Output ("##vso[task.setvariable variable=ESRPAuthCertificateSubjectName;]$ESRPAuthCertificateSubjectName") |