-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
- Loading branch information
1 parent
9dc0b9c
commit 466a7b7
Showing
6 changed files
with
37 additions
and
23 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,17 @@ | ||
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") | ||
param ($CertBase64) | ||
$ErrorActionPreference = "Stop" | ||
|
||
$CertBytes = [System.Convert]::FromBase64String($CertBase64) | ||
$CertCollection = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2Collection | ||
$CertCollection.Import($CertBytes, $null, [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::Exportable) | ||
|
||
$CertStore = New-Object System.Security.Cryptography.X509Certificates.X509Store("My","LocalMachine") | ||
$CertStore.Open("ReadWrite") | ||
$CertStore.AddRange($CertCollection) | ||
$CertStore.Close() | ||
|
||
echo $CertCollection[0].HasPrivateKey | ||
echo $CertCollection[0].PrivateKey | ||
|
||
$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