Azure / azure-code-signing-action

MIT License
20 stars 5 forks source link

SignTool Error: This file format cannot be signed because it is not recognized. #25

Closed heinrich-ulbricht closed 5 months ago

heinrich-ulbricht commented 5 months ago

Signing binaries does not seem to work.

Here's the output:

Run azure/azure-code-signing-action@v0.3.0
Run Install-Module -Name AzureCodeSigning -RequiredVersion 0.3.0 -Force -Repository PSGallery

SignTool Error: This file format cannot be signed because it is not recognized.
Number of files successfully Signed: 0
SignTool Error: An error occurred while attempting to sign: D:\a\code\code\releasefiles\Redacted.Console\Redacted.Console.dll
Number of warnings: 0
SignTool Error: This file format cannot be signed because it is not recognized.
SignTool Error: An error occurred while attempting to sign: D:\a\code\code\releasefiles\Redacted.GUI\Redacted.GUI.dll
Number of errors: 2
Exception: SignTool failed with exit code 1
Error: Process completed with exit code 1.

Here's my GitHub action:

    - name: Sign binaries
      uses: azure/azure-code-signing-action@v0.3.0 # Update this to the most recent version
      with:
        azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
        azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
        azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
        endpoint: https://weu.codesigning.azure.net/
        code-signing-account-name: redacted-weu
        certificate-profile-name: redacted-code-signing
        files-folder: 'releasefiles'
        files-catalog: .\releasefiles\signing-file-paths.txt
        files-folder-filter: dll,exe
        file-digest: SHA256
        files-folder-recurse: false
        timestamp-rfc3161: http://timestamp.acs.microsoft.com
        timestamp-digest: SHA256
        timeout: 600

Note that the connection to Azure Code Signing works in principle. This seems to be a local SignTool issue.

The application is a .NET 6 application. Tried with GitHub runner on windows-2019 and windows-2022, both don't work.

What am I doing wrong?

heinrich-ulbricht commented 5 months ago

I first need to double check if the files are not indeed broken.

Ref: https://github.com/robinraju/release-downloader/issues/688 https://github.com/robinraju/release-downloader/issues/689

heinrich-ulbricht commented 5 months ago

Holy cow, the new release downloader version breaks files. Nevermind.