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

Digitally sign the Contour installation on Windows #1554

Open
christianparpart opened this issue Jul 1, 2024 · 0 comments
Open

Digitally sign the Contour installation on Windows #1554

christianparpart opened this issue Jul 1, 2024 · 0 comments
Labels
CMake platform: windows topics that directly address Windows platform

Comments

@christianparpart
Copy link
Member

christianparpart commented Jul 1, 2024

This requires signtool.exe (part of Windows SDK).

It seems to be not too hard to implement, at least the documentation to it seems not as complex as it is for macOS.

I hope with this to get rid of the Windows OS wrong banner, saying that "Windows protected your PC", and defaults to abort executing Contour's MSI installer file.

image

set(SIGNTOOL_EXECUTABLE "signtool" CACHE STRING "Path to signtool.exe")
set(SIGNTOOL_CERTFILE_PATH "/path/to/certificate.pfx" CACHE PATH "Path to your certificate.pfx")
set(SIGNTOOL_CERTFILE_PASSWORD "" CACHE STRING "Password for the given certificate")
add_custom_command(
    TARGET contour POST_BUILD
    COMMAND ${SIGNTOOL_EXECUTABLE} sign /f "${SIGNTOOL_CERTIFICATE_PATH}" /p "${SIGNTOOL_CERTFILE_PASSWORD)" /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 $<TARGET_FILE:contour>
)
  • Not sure how much we'd need to digitally sign, i.e., what about the DLLs?
  • Also, the .msi file at the end should be digitally signed as well as its content.
@christianparpart christianparpart added CMake platform: windows topics that directly address Windows platform labels Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake platform: windows topics that directly address Windows platform
Projects
None yet
Development

No branches or pull requests

1 participant