Skip to content

Signing of Windows Exe fails #3693

Closed
Closed

Description

@infeo

Please agree to the following

Summary

Creating Windows installers fail currently, since the signing step fails.

What software is involved?

  • Operating System: Microsoft Windows Server 2022 10.0.20348
  • Cryptomator: develop/ 9a8f96d

Volume Type

None

Steps to Reproduce

  1. Start the "Build Windows Installer" (win-exe.yml) workflow

Expected Behavior

Signing suceesds, installers are built.

Actual Behavior

Build process fails due to signing failure.

Reproducibility

Always

Relevant Log Output

Writing 4447 bytes to C:\Users\RUNNER~1\AppData\Local\Temp\certificate.pfx.
Certificate "Skymatic GmbH" added to store.

CertUtil: -importPFX command completed successfully.

Certificate valid until Jul 13 23:59:59 2025 GMT
Skipping C:/Program Files (x86)/Windows Kits/10/bin/10.0.14393.0/x64/signtool.exe due to error.
Skipping C:/Program Files (x86)/Windows Kits/10/bin/10.0.15063.0/x64/signtool.exe due to error.
Skipping C:/Program Files (x86)/Windows Kits/10/bin/10.0.16299.0/x64/signtool.exe due to error.
Skipping C:/Program Files (x86)/Windows Kits/10/bin/10.0.17134.0/x64/signtool.exe due to error.
Signtool location is C:/Program Files (x86)/Windows Kits/10/bin/10.0.26100.0/x64/signtool.exe.
Signing appdir/Cryptomator/Cryptomator.exe.
Signing command: "C:/Program Files (x86)/Windows Kits/10/bin/10.0.26100.0/x64/signtool.exe" sign /sm /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 /sha1 "5FC94CE149E5B511E621F53A060AC67CBD446B3A" /d "Cryptomator" appdir/Cryptomator/Cryptomator.exe
Done Adding Additional Store

Number of errors: 1


Process to sign file exited with code 1.
SignTool Error: SignedCode::Sign returned error: 0x800700C1

	For more information, please see https://aka.ms/badexeformat
SignTool Error: An error occurred while attempting to sign: appdir/Cryptomator/Cryptomator.exe

Anything else?

See https://github.com/cryptomator/cryptomator/actions/runs/12873760519

Activity

  1. infeo commented on Jan 20, 2025

    @infeo
    MemberAuthor

    This issue occurs since #3676.

    A run with zulu (https://github.com/cryptomator/cryptomator/actions/runs/12873864218) completes without errors. Digging deeper, this is caused by a fix on the temurin side (first reported for JDK 21, see adoptium/temurin-build#3489). Inspecting jdk.jpackage.jmod\classes\jdk\jpackage\internal\resources\wixhelper.dll, the file is now signed. All dlls and exes are signed now And here a Windows peculiarity kicks in and causing the issue:

    is caused by the fact that we're code-signing one of our files which is used as the template for the generated .exe file ... (and then we're modifying it, hence it end up with an invalid signature...)

    (taken from airsdk/Adobe-Runtime-Support#482 (comment))

    Listing the content of the jmod, there is jpackageapplauncher.exe. I'm sure this is the template launcher which is adjusted later.

  2. added this to the next milestone on Jan 20, 2025
  3. added a commit that references this issue on Jan 21, 2025
    b6224f3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions