-
Notifications
You must be signed in to change notification settings - Fork 29.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ESRP Cert (#108366) * update ESRP * update to new ESRP cert * make gulp fail when inno setup fails * fix esrp * debug * update esrp client version * 🤦 * argh * update esrpclient * argh * remove echos
- Loading branch information
1 parent
c069731
commit d2e414d
Showing
6 changed files
with
32 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Microsoft.ESRPClient" version="1.2.25" /> | ||
<package id="Microsoft.ESRPClient" version="1.2.47" /> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters