Jump to content

Code Signing of fm plugin for Windows: badexeformat


This topic is 870 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi, I desperatly try to sign a self created plugin based on scriptmaster. I always get a badexeformat error. My signing code is:

.\signtool.exe sign /v /f "path\to\certificate.pfx" /p [mypassword] /td SHA256 /fd SHA256 /tr http://timestamp.sectigo.com "path\to\SwissQRBillGenerator.fmx64"

The exact error message is:

 

The following certificate was selected:
    Issued to: FSL Consulting Gmbh
    Issued by: Sectigo Public Code Signing CA R36
    Expires:   Sat Aug 31 00:59:59 2024
    SHA1 hash: DF4CD5F66E0A86BDE7E166D91D149CE259ACE951

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: C:\Users\christian\Desktop\SwissQRBillGenerator.fmx64

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

 

 

How can I sign my code successfully?

Thanks Christian

 

Link to comment
Share on other sites

Hi Christian,

It seems you may have resolved your issue but just wanted to post some info here. Just doing some searching it seems this error can happen if you are trying to sign software that is already signed. Are you using the unsigned version of ScriptMaster to generate the plugin?

Link to comment
Share on other sites

Hi Ryan

I already know these sites and followed the instructions there. By the way the timestamp url is no longer valid it must be http://timestamp.sectigo.com as sectigo answered to my question. Besides those sites do not really my answer my question that is, if the scriptmaster plugin is signed, the plugins created with scriptmaster are signed too. If not, then code signing still does not work and error badexeformat remains.

Regards Christian

Link to comment
Share on other sites

Perhaps I am misunderstanding what you are saying but the documentation I sent you explicitly answers your question "if the scriptmaster plugin is signed, the plugins created with scriptmaster are signed too?":

Quote

The reason for needing an unsigned version of ScriptMaster to generate plugins, is that ScriptMaster makes plugins by essentially copying itself into the new plugin, along with the functions you have written. If ScriptMaster is signed before this copy happens, it will carry the signature with it. This is unfortunate, because the newly generated plugin does not match the ScriptMaster plugin exactly, and so the signature it has carried with it is now invalid, and the plugin will not be loaded by FileMaker.

Starting with ScriptMaster 5.2, ScriptMaster will be signed by us. Any plugin generated with those versions will be signed but the signature is invalid because the generated plugin and ScriptMaster are different. This means that you have to use an unsigned version of ScriptMaster (available here) so that there is no signature carry over and you can sign the generated plugin using the outlined procedure. If you are already generating the plugin with the unsigned version of ScriptMaster and still getting the error then I am not sure what is causing the error. We do offer a signing service and can sign your generated plugin for you. If you are interested in that, please let us know!

Link to comment
Share on other sites

This topic is 870 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.