Skip to content

Air 33.1.1.259: Windows Build: SignTool fails with error: 0x800700C1 #482

Closed

Description

@spielepalast

Problem Description

Using the latest Air SDK 33.1.1.259, signing the generated .exe file with Signtool.exe fails with the output:
SignTool Error: SignedCode::Sign returned error: 0x800700C1

The same procedure works with Air SDK 33.1.1.217.

I have currently installed Windows 10 SDK version 10.0.18362.0 which contains Signtool.exe

This is the command to build the .exe file:
(Taken from ant, usage of quotes may vary)

adt -package -storetype pkcs12 -keystore "bat/desktop.p12" -storepass XXX -target bundle "output" "application.xml" -C "bin" "." -extdir "../_extensions"

This is the Signtool command:

signtool.exe sign /fd SHA256 /f "..\_cert\desktop-winstore.pfx" /p XYZ -v "output\game.exe"

Output from Signtool on Air 33.1.1.259:

The following certificate was selected:
    Issued to: ABC
    Issued by: ABC
    Expires:   Mon Dec 17 15:45:12 2300
    SHA1 hash: QWERTY

Done Adding Additional Store
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: output\game.exe

Number of files successfully Signed: 0
Number of warnings: 0
Number of errors: 1

Output from Signtool on Air 33.1.1.217:

The following certificate was selected:
    Issued to: ABC
    Issued by: ABC
    Expires:   Mon Dec 17 15:45:12 2300
    SHA1 hash: QWERTY

Done Adding Additional Store
Successfully signed: output\game.exe

Number of files successfully Signed: 1
Number of warnings: 0
Number of errors: 0

We can release from the previous Air SDK for now but this issue should be fixed in a future release. Do you need any more info?

We require signing in order to test an appx package that we generate from these binaries. appx is the format of apps for the Windows Store.

Activity

  1. changed the title [-]Air 33.1.1.256: Windows Build: SignTool fails with error: 0x800700C1[/-] [+]Air 33.1.1.259: Windows Build: SignTool fails with error: 0x800700C1[/+] on Sep 29, 2020
  2. ajwfrost commented on Sep 30, 2020

    @ajwfrost
    Collaborator

    Hi

    Are you able to just check what you get if you do "signtool verify output\game.exe" on the one generated with the latest SDK?

    We can start investigating here, it's a curious one as there shouldn't really be any difference in these generated binaries from one version to the next!

    thanks

  3. spielepalast commented on Sep 30, 2020

    @spielepalast
    Author

    Hi,

    thanks for looking into this! The output is:

    File: output\game.exe
    Index  Algorithm  Timestamp
    ========================================
    SignTool Error: No signature found.
    
    Number of errors: 1
    
  4. spielepalast commented on Sep 30, 2020

    @spielepalast
    Author

    I also updated Windows 10 SDK to the latest version 10.0.19041.0 to be sure this is not related to our build tools, but the behavior is the same.

  5. ajwfrost commented on Sep 30, 2020

    @ajwfrost
    Collaborator

    Okay it appears this 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...)

    So if you go to the folder:
    runtimes\air\win\Adobe AIR\Versions\1.0\Resources
    and run
    codesign remove /s CaptiveAppEntry.exe

    and then re-create the bundle and try again..

    Sorry for the inconvenience!

  6. spielepalast commented on Oct 1, 2020

    @spielepalast
    Author

    Not a problem, the workaround is working well. Should we note this procedure for future updates of the Air SDK or will you remove the signature for upcoming releases?

    Thanks

  7. ajwfrost commented on Oct 1, 2020

    @ajwfrost
    Collaborator

    We will remove that signature .. overly optimistic I guess, I had just asked them to sign all the executables, and we hadn't spotted that this then meant the resulting applications couldn't be signed again..!

    I'll get our build scripts updated to omit these template .exes from the list to sign..

    thanks

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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions