Skip to content
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

fix(windows): fix encoding issues while verifying signatures #5071

Merged

Conversation

orzFly
Copy link
Contributor

@orzFly orzFly commented Jun 15, 2020

Our code signing certificate contains Chinese company name in the CN field. Encoding issues may be complex on Windows so I just encode the powershell output as base64-ed UTF-8 bytes.

@orzFly orzFly marked this pull request as ready for review June 17, 2020 07:50
@develar develar merged commit 70a0b80 into electron-userland:master Jul 9, 2020
@hezhuojie
Copy link

Holyshit.
It convert CN from gbk encoded to utf-8 in checkForUpdate.
But in publish stage, windowsCodeSign automatically extracts publisher name of gbk encoded from code signing certificate in. The gbk encoded publish name is wrote to app-update.yml and is used for checkForUpdate.
So AppUpdater must fail to verify signature due to compare utf-8 encoded publish name and gbk encoded name.

@develar
Copy link
Member

develar commented Sep 17, 2020

@hezhuojie Thanks for finding, PR welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants