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: Update certificate validation on Windows to check full DN #6576

Merged
merged 3 commits into from Jan 25, 2022

Conversation

devinbinnie
Copy link
Contributor

This PR changes the certificate validation for NSIS installer to allow for validation of the entire DN instead of just the Common Name portion. This should allow for a more secure certificate validation.

@changeset-bot
Copy link

changeset-bot bot commented Jan 24, 2022

🦋 Changeset detected

Latest commit: 2526ab0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
electron-updater Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Jan 24, 2022

✔️ Deploy Preview for car-park-attendant-cleat-11576 ready!

🔨 Explore the source changes: 2526ab0

🔍 Inspect the deploy log: https://app.netlify.com/sites/car-park-attendant-cleat-11576/deploys/61f02d3c304cbf0007fce684

😎 Browse the preview: https://deploy-preview-6576--car-park-attendant-cleat-11576.netlify.app

@devinbinnie
Copy link
Contributor Author

@mmaietta Added as a draft for now because I've added a unit test for the new case, but the tests don't seem to pass on my machine (Windows 10 running Git Bash). I have my own certificate as well, and some of the snapshots don't match. Is there a test runner in CI I can use? Or is there some way to set up my dev environment such that I can get the tests to pass?

@mmaietta
Copy link
Collaborator

@mmaietta Added as a draft for now because I've added a unit test for the new case, but the tests don't seem to pass on my machine (Windows 10 running Git Bash). I have my own certificate as well, and some of the snapshots don't match. Is there a test runner in CI I can use? Or is there some way to set up my dev environment such that I can get the tests to pass?

All CI is now handled through GitHub Actions. The test snapshots are OS-specific and for some, such as publish/updating, they need to have an API key or token that are part of this repo's env secrets. All in all, it's really difficult to get a singular test environment. pnpm test-linux can cover the linux-based snapshots by running via docker. Other than that, the mapping of test files/snapshots to platform are:
Linux

- ArtifactPublisherTest,BuildTest,ExtraBuildTest,RepoSlugTest,binDownloadTest,configurationValidationTest,filenameUtilTest,filesTest,globTest,ignoreTest,macroExpanderTest,mainEntryTest,urlUtilTest,extraMetadataTest,linuxArchiveTest,linuxPackagerTest,HoistedNodeModuleTest,PublishManagerTest
- snapTest,debTest,fpmTest,protonTest

MacOS
TEST_FILES: masTest,dmgTest,protonTest

MacOS (updater-specific due to env tokens)
TEST_FILES: nsisUpdaterTest

Windows
- installerTest,appxTest,msiTest,portableTest,assistedInstallerTest,protonTest
- oneClickInstallerTest,winCodeSignTest,winPackagerTest,webInstallerTest

Depending on what OS I'm working on, I have to update snapshots by booting up my corresponding OS. For non-token-based tests, I think you can activate github actions on a fork of this repo?

@mmaietta
Copy link
Collaborator

All tests pass 🙌

@devinbinnie devinbinnie marked this pull request as ready for review January 25, 2022 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants