Skip to content

Commit 2b9d66c

Browse files
Merge pull request #4 from gabriel-samfira/fix-windows-cert-import
Fix certificate import on Windows
2 parents ff07b21 + 8841ea4 commit 2b9d66c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cloudconfig/templates.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,9 @@ function Import-Certificate() {
306306
param (
307307
[parameter(Mandatory=$true)]
308308
[string]$CertificatePath,
309-
[parameter(Mandatory=$true)]
309+
[parameter(Mandatory=$false)]
310310
[System.Security.Cryptography.X509Certificates.StoreLocation]$StoreLocation="LocalMachine",
311-
[parameter(Mandatory=$true)]
311+
[parameter(Mandatory=$false)]
312312
[System.Security.Cryptography.X509Certificates.StoreName]$StoreName="TrustedPublisher"
313313
)
314314
PROCESS
@@ -412,7 +412,7 @@ function Install-Runner() {
412412
413413
if($PEMData.Trim().Length -gt 0){
414414
Set-Content $env:TMP\garm-ca.pem $PEMData
415-
Import-Certificate -CertificatePath $env:TMP\garm-ca.pem
415+
Import-Certificate -CertificatePath $env:TMP\garm-ca.pem -StoreName Root -StoreLocation LocalMachine
416416
}
417417
418418
Update-GarmStatus -CallbackURL $CallbackURL -Message "downloading tools from $DownloadURL"

0 commit comments

Comments
 (0)