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

Add a PKCS12 Windows code signing certificate and sign exe/msi artifacts. #2937

Merged
merged 1 commit into from
Jul 15, 2020

Conversation

rryan
Copy link
Member

@rryan rryan commented Jul 13, 2020

This certificate is encrypted with AppVeyor's "secure files" tool:
https://www.appveyor.com/docs/how-to/secure-files/

The secret, salt and password in appveyor.yml are encrypted with
AppVeyor's repository-specific public key. During AppVeyor builds, the
environment variables are set to the decrypted value of the secret,
salt, and password which allows us to decrypt the PKCS12 file and then
decrypt the private key within the PKCS12 file.

The private key in the PKCS12 file itself is encrypted with
PBE-SHA1-3DES, since apparently Windows does not support AES.

TESTED:

…cts.

This certificate is encrypted with AppVeyor's "secure files" tool:
https://www.appveyor.com/docs/how-to/secure-files/

The secret, salt and password in appveyor.yml are encrypted with
AppVeyor's repository-specific public key. During AppVeyor builds, the
environment variables are set to the decrypted value of the secret,
salt, and password which allows us to decrypt the PKCS12 file and then
decrypt the private key within the PKCS12 file.

The private key in the PKCS12 file itself is encrypted with
PBE-SHA1-3DES, since apparently Windows does not support AES.
@uklotzde
Copy link
Contributor

I guess we just need to merge this PR to see if it actually works?

...
-- Installing: C:/mixxx/./doc/Mixxx-Manual.pdf
IF [%APPVEYOR_PULL_REQUEST_NUMBER%] == [] ( signtool sign /f ..\%CODESIGN_CERTIFICATE_PATH% /p %CODESIGN_CERTIFICATE_PASSWORD% *.exe ) else ( echo "Skipping codesigning *.exe because we are in a pull request." )
"Skipping codesigning *.exe because we are in a pull request." 
cpack -G "WIX"
CPack: Create package using WIX
CPack: Install projects
CPack: - Install project: mixxx []
CPack: Create package
CPack: - package: C:/projects/mixxx/cmake_build/mixxx-pr-2937-appveyor-codesign-d4424e300957d38e058410df6a646f2c274a9aa9.msi generated.
IF [%APPVEYOR_PULL_REQUEST_NUMBER%] == [] ( signtool sign /f ..\%CODESIGN_CERTIFICATE_PATH% /p %CODESIGN_CERTIFICATE_PASSWORD% *.msi ) else ( echo "Skipping codesigning *.msi because we are in a pull request." )
"Skipping codesigning *.msi because we are in a pull request." 
...

@rryan
Copy link
Member Author

rryan commented Jul 13, 2020

I guess we just need to merge this PR to see if it actually works?

Nope -- see the "TESTED" section. :)

signtool sign /f ..\%CODESIGN_CERTIFICATE_PATH% /p "%CODESIGN_CERTIFICATE_PASSWORD%" *.msi
Done Adding Additional Store
Successfully signed: mixxx-appveyor-codesign-a3b4933ac9fd1b3a8dc5ff1748063457ad3b4a32.msi

@rryan
Copy link
Member Author

rryan commented Jul 13, 2020

Though I should note, this isn't a fully working solution for code signing. We still need to sign any DLLs that are bundled (e.g. Qt plugins) and potentially we have to unpack the WiX bundle and sign some of its internals. I'm hoping someone else can look at that while I handle macOS signing on Travis.

@Be-ing Be-ing merged commit 25e92a3 into mixxxdj:master Jul 15, 2020
@Be-ing
Copy link
Contributor

Be-ing commented Aug 1, 2020

Whoops, this was merged to master instead of 2.3. I cherry-picked it to 2.3: 07f46bd

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.

None yet

3 participants