-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with code signing with an EV certificate on Windows #7729
Comments
Found the problem: there are two versions of Powershell on Windows: the one called "Windows Powershell" (powershell.exe), that is Powershell version 5.x and that is kept on all Windows systems for compatibility reasons, and the newer versions called "Powershell" (pwsh.exe), that is Powershell version 6.x, 7.x, ... The command called by electron-builder is "powershell.exe", and strangely enough doesn't work from the newer Powershell because of the ":" character. Launching the build/deploy script from Windows Power Shell (the 5.x version) fixed the problem. |
currently, I am using PowerShell v5 instead of v7. |
Me too. I lost several hours with this problem.😢 |
Hi there! I got the same issue, but I don't understand how it can resolved. Not even after reading your comments. |
@stephanedupont how do you use powershell v5? |
Like I mentioned, use |
Fixed: electron-userland#7729 electron-userland#8055 Signed-off-by: Kevin Cui <[email protected]>
Fixed: electron-userland#7729 electron-userland#8055 Signed-off-by: Kevin Cui <[email protected]>
Fixed: electron-userland#7729 electron-userland#8055 Signed-off-by: Kevin Cui <[email protected]>
Fixed: electron-userland#7729 electron-userland#8055 Signed-off-by: Kevin Cui <[email protected]>
Fixed: electron-userland#7729 electron-userland#8055 Signed-off-by: Kevin Cui <[email protected]>
…8384) Fixed: #7729 #8055 Signed-off-by: Kevin Cui <[email protected]>
I was using a code signing certificate until now, using
CSC_LINK
andCSC_KEY_PASSWORD
as specified here and it was working fine.I was not able to renew my certificate as they stopped issuing certificates without a hardware token due to new regulations (see here), so I ordered instead an EV code signing certificate that comes with a USB hardware token.
I installed the SafeNet driver, removed
CSC_LINK
andCSC_KEY_PASSWORD
and addedwin.certificateSubjectName
as mentioned in the documentation.When executing the
electron-builder build --win
command, it now fails with the following output:If I try to manually execute the command mentioned directly in the PowerShell, by decomposing it step by step, I have the following results:
powershell.exe -NoProfile -NonInteractive -Command Get-ChildItem -Recurse Cert: -CodeSigningCert
powershell.exe -NoProfile -NonInteractive -Command Get-ChildItem -Recurse Cert: -CodeSigningCert | Select-Object -Property Subject,PSParentPath,Thumbprint
powershell.exe -NoProfile -NonInteractive -Command Get-ChildItem -Recurse Cert: -CodeSigningCert | Select-Object -Property Subject,PSParentPath,Thumbprint | ConvertTo-Json -Compress
[{"Subject":null,"PSParentPath":null,"Thumbprint":null},{"Subject":null,"PSParentPath":null,"Thumbprint":null},{"Subject":null,"PSParentPath":null,"Thumbprint":null},{"Subject":null,"PSParentPath":null,"Thumbprint":null},{"Subject":null,"PSParentPath":null,"Thumbprint":null},{"Subject":null,"PSParentPath":null,"Thumbprint":null},{"Subject":null,"PSParentPath":null,"Thumbprint":null},{"Subject":null,"PSParentPath":null,"Thumbprint":null},{"Subject":null,"PSParentPath":null,"Thumbprint":null}]
So it seems that there is a problem with the code in
windowsCodeSign.js
, in the functiongetCertificateFromStoreInfo
. Any idea of why and how to fix this?The text was updated successfully, but these errors were encountered: