Skip to content
This repository was archived by the owner on Mar 16, 2020. It is now read-only.
This repository was archived by the owner on Mar 16, 2020. It is now read-only.

Signing using standard Signtool is also possible #8

@tomasszabo

Description

@tomasszabo

I was struggling with this problem for past few days. Unfortunately, tool in this repository was not working in my case due to:

Validating certificate thumbprint
Converting thumbprint to bytes
Acquiring cryptographic context
Setting PIN
Opening system-level cryptographic store 65536/MY
Retrieving certificate from the store
Beginning the signing process
Loading MSSign32.dll from specific path: C:\Windows\System32\mssign32.dll
Getting SignerSignEx2 pointer
Marshalling SignerSignEx2 pointer to a delegate
Invoking SignerSignEx2
Signing operation failed. Error details:
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

However I've found another solution which is working for me:

https://stackoverflow.com/questions/17927895/automate-extended-validation-ev-code-signing/54439759#54439759

and according to mentioned Stackoverflow, I was able to sign appxbundle using standard Signtool:

signtool sign /fd sha256 /f mycert.cer /csp "eToken Base Cryptographic Provider" /kc "[{{TokenPasswordHere}}]=KeyContainerNameHere" mybundle.appxbundle

For troubleshooting of Signtool (because it is also not working out-of-the-box), read Microsoft's documentation:

https://docs.microsoft.com/en-us/windows/msix/package/sign-app-package-using-signtool

I'm not sure if this should be a bug report but at least I wanted to inform you that there is also "standard" way and custom tools are not necessary. Also if someone else is searching for solution, this could help them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions