mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode 2c306f762bf9c3db82dc06c7afaa56ef46d72f79 (#14050)
* Merge from vscode 2c306f762bf9c3db82dc06c7afaa56ef46d72f79 * Fix breaks * Extension management fixes * Fix breaks in windows bundling * Fix/skip failing tests * Update distro * Add clear to nuget.config * Add hygiene task * Bump distro * Fix hygiene issue * Add build to hygiene exclusion * Update distro * Update hygiene * Hygiene exclusions * Update tsconfig * Bump distro for server breaks * Update build config * Update darwin path * Add done calls to notebook tests * Skip failing tests * Disable smoke tests
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
Param(
|
||||
[string]$AuthCertificateBase64,
|
||||
[string]$AuthCertificateKey
|
||||
)
|
||||
param ($CertBase64)
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
# 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
|
||||
$CertBytes = [System.Convert]::FromBase64String($CertBase64)
|
||||
$CertCollection = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2Collection
|
||||
$CertCollection.Import($CertBytes, $null, [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::Exportable)
|
||||
|
||||
Write-Output ("##vso[task.setvariable variable=ESRPAuthCertificateSubjectName;]$ESRPAuthCertificateSubjectName")
|
||||
$CertStore = New-Object System.Security.Cryptography.X509Certificates.X509Store("My","LocalMachine")
|
||||
$CertStore.Open("ReadWrite")
|
||||
$CertStore.AddRange($CertCollection)
|
||||
$CertStore.Close()
|
||||
|
||||
$ESRPAuthCertificateSubjectName = $CertCollection[0].Subject
|
||||
Write-Output ("##vso[task.setvariable variable=ESRPAuthCertificateSubjectName;]$ESRPAuthCertificateSubjectName")
|
||||
|
||||
Reference in New Issue
Block a user