From dcced5ffd6da0e4b2ffede1e39041c160527e8ae Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 13 Feb 2025 12:12:46 +0000
Subject: [PATCH] Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---
 .github/workflows/build_windows.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml
index 6203bda1..22c618e3 100644
--- a/.github/workflows/build_windows.yaml
+++ b/.github/workflows/build_windows.yaml
@@ -177,10 +177,10 @@ jobs:
             - name: Trust eSigner sandbox cert
               if: inputs.sign == ''
               run: |
-                  $cert = (Get-AuthenticodeSignature -FilePath (get-item ./dist/win-*unpacked/*.exe)).SignerCertificate
-                  $chain = New-Object -TypeName System.Security.Cryptography.X509Certificates.X509Chain
-                  $chain.Build($cert)
-                  $chain.ChainElements[2].Certificate | Export-Certificate -Type CERT -FilePath SSLcom-sandbox-root.crt
+                  $Cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 (get-item ./dist/win-*unpacked/*.exe)
+                  $Chain = New-Object System.Security.Cryptography.X509Certificates.X509Chain
+                  [void]$Chain.Build($Cert)
+                  $Chain.ChainElements[2].Certificate | Export-Certificate -Type CERT -FilePath SSLcom-sandbox-root.crt
                   certutil.exe -addstore root ./SSLcom-sandbox-root.crt
               env:
                   INSTALL_DIR: C:\Users\runneradmin\eSignerCKA