Skip to content

Commit 7f04ecd

Browse files
authored
use PersistKeySet (#115744)
1 parent 8490d3d commit 7f04ecd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build/azure-pipelines/win32/import-esrp-auth-cert.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ $ErrorActionPreference = "Stop"
33

44
$CertBytes = [System.Convert]::FromBase64String($CertBase64)
55
$CertCollection = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2Collection
6-
$CertCollection.Import($CertBytes, $null, [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::Exportable)
6+
$CertCollection.Import($CertBytes, $null, [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::Exportable -bxor [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::PersistKeySet)
77

88
$CertStore = New-Object System.Security.Cryptography.X509Certificates.X509Store("My","LocalMachine")
99
$CertStore.Open("ReadWrite")

0 commit comments

Comments
 (0)