Reply to Thread

Post a reply to the thread: Compiler Error GEN 1053 appears when Digital Signature set to Yes or No

Your Message

Click here to log in

What's the name of our main installation product (in uppercase letters), directly followed by the current year?

 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Topic Review (Newest First)

  • 07-30-2024, 02:46 AM
    Robin77

    Re: Compiler Error GEN 1053 appears when Digital Signature set to Yes or No

    The compiler error GEN 1053 occurs when the Digital Signature option is set to either Yes or No. This issue suggests that there may be a problem with the configuration or compatibility of the digital signature settings in your project. Ensure that all related settings are correctly configured and that your development environment supports the chosen digital signature option. Consider reviewing documentation or seeking support for specific guidance on resolving this error.
  • 10-26-2012, 11:55 AM
    linder

    Re: Compiler Error GEN 1053 appears when Digital Signature set to Yes or No

    Hello,

    Why don't you use the "#run..." compiler directive to run your batch file (including your PAUSE command in it) instead of the "#code-sign application..." directive? Perhaps you can then find out why your machine has a problem with code-signing? And if it still fails (e.g. because your certificate is password protected and the password embedding process is blocked by your protection software), you can try the .PFX and use SignTool.exe (which can handle passwords via the command line).

    BTW, it is impossible to use a batch file via "Tools | Options | File Locations" because the file name determines the code-signing method (SignTool.exe or SignCode.exe). The SignCode.exe Location specifies the pathname of the signcode.EXE that performs the signing tasks.

    Hope this helps a bit.

    Friedrich
  • 10-26-2012, 11:20 AM
    jgamalinda

    Re: Compiler Error GEN 1053 appears when Digital Signature set to Yes or No

    Quote Originally Posted by linder View Post
    In other words, code-signing is not a general issue at all (it's machine specific). If a code-signing issue is reported then in most cases it is 1) caused by an expired code-signing certificate or 2) by a buggy or too protective anti-virus and/or anti-spyware system that blocks access to the timestamp server. I hope the new default values can help you.
    Friedrich
    In this case it started as #1 expired, but then timing showed up.

    Problem is when signing fails with the "Compiler Error GEN 1053" there's no way to tell the problem. I need to see the command line output of the SignCode.exe cmd line that shows the error. It would help if SB had a way.

    I tried changing Tools, Options, File Locations the SignCode.exe to my own SignCarl.BAT. It does run, but because you hide the window I cannot add a PAUSE and see what's going wrong. So one tweak you could make is if the Sign Code program is a BAT or CMD that you do not hide the window. Or add a Pragma to not hide the window.

    I changed my BAT to redirect to a file and do see some info. I need to put more time into it, but I'm not sure it's possible.

    Here's my BAT file replacement for SignCode.exe
    Code:
    echo signing  >> V:\alpha\Emem\SignCarl\signlog.txt
    @echo parm 1: %1  >> V:\alpha\Emem\SignCarl\signlog.txt
    @echo parm 2: %2  >> V:\alpha\Emem\SignCarl\signlog.txt
    @echo parm 3: %3  >> V:\alpha\Emem\SignCarl\signlog.txt
    @echo parm 4: %4  >> V:\alpha\Emem\SignCarl\signlog.txt
    @echo parm 5: %5  >> V:\alpha\Emem\SignCarl\signlog.txt
    @echo parm 6: %6  >> V:\alpha\Emem\SignCarl\signlog.txt
    @echo parm 7: %7  >> V:\alpha\Emem\SignCarl\signlog.txt
    @echo parm 8: %8  >> V:\alpha\Emem\SignCarl\signlog.txt
    @echo parm 9: %9  >> V:\alpha\Emem\SignCarl\signlog.txt
    @echo parm 10: %10  >> V:\alpha\Emem\SignCarl\signlog.txt
    @echo parm 11: %11  >> V:\alpha\Emem\SignCarl\signlog.txt
    @echo parm 12: %12  >> V:\alpha\Emem\SignCarl\signlog.txt
    @echo parm 13: %13  >> V:\alpha\Emem\SignCarl\signlog.txt
    @echo parm 14: %14  >> V:\alpha\Emem\SignCarl\signlog.txt
    @echo parm 15: %15  >> V:\alpha\Emem\SignCarl\signlog.txt
    @echo parm 16: %16  >> V:\alpha\Emem\SignCarl\signlog.txt
    @echo parm 17: %17  >> V:\alpha\Emem\SignCarl\signlog.txt
    @echo parm 18: %18  >> V:\alpha\Emem\SignCarl\signlog.txt
    @echo parm 19: %19  >> V:\alpha\Emem\SignCarl\signlog.txt
    
    V:\alpha\Emem\SignCarl\signcode.exe  /tr 3 /tw 4  %1 %2 %3 %4 %5 %6 %7 %8 %9 %10 %11 %12 %13 %14       >> V:\alpha\Emem\SignCarl\signlog.txt
    rem pause
    Here's the result (I do not get the output of signcode.exe):

    signing
    parm 1: -spc
    parm 2: "V:\alpha\SignCodeBCS\xxxxxCredentials.spc"
    parm 3: -v
    parm 4: "V:\alpha\SignCodeBCS\xxxxPrivateKey.pvk"
    parm 5: -i
    parm 6: "http://www.xxxxx.com/"
    parm 7: -n
    parm 8: "xxxxxxx"
    parm 9: -t
    parm 10: -spc0
    parm 11: -spc1
    parm 12: -spc2
    parm 13: -spc3
    parm 14: -spc4
    parm 15: -spc5
    parm 16: -spc6
    parm 17: -spc7
    parm 18: -spc8
    parm 19: -spc9

    I don't see the EXE name in the command line.
  • 10-25-2012, 12:17 AM
    linder

    Re: Compiler Error GEN 1053 appears when Digital Signature set to Yes or No

    I think 3 and 3 are already good values because they allow more retries and give the protection system more time to cool down. But we can increase it to 5 and 5, no problem. BTW, support requests for code-signing are not even on our list of Top 500 support requests. In other words, code-signing is not a general issue at all (it's machine specific). If a code-signing issue is reported then in most cases it is 1) caused by an expired code-signing certificate or 2) by a buggy or too protective anti-virus and/or anti-spyware system that blocks access to the timestamp server. I hope the new default values can help you.

    Friedrich
  • 10-24-2012, 12:05 PM
    jgamalinda

    Re: Compiler Error GEN 1053 appears when Digital Signature set to Yes or No

    Quote Originally Posted by linder View Post
    IMPROVEMENT: IDE: Add CODESIGN_DELAY #pragma to set the delay (in number of seconds) between each timestamp trial. Defaults to 3.
    IMPROVEMENT: IDE: Add CODESIGN_TSTRIALS #pragma to set the maximum number of timestamp trials until success; defaults to 3.
    Think that's a good idea you defaulted to multiple tries. I searched and see a bunch of people saying they needed to add timestamp retires to work consistently. I've seen no downside. You want a timestampm, you may need to wait.

    BTW 3 and 3 were numbers I picked without any research that happended to work right away. I just went and tested a bunch of combos and 3 seconds seems to be the minimum wait that I needed. I'd suggest 4 or 5 retries as the default to try to get it done as often as possible.

    SignCode is silent with doing the retries so its hard to know what is working.


    Any reason I can't write my own Clarion based Signer EXE for you to call?
    Basically: RUN('SignCode.exe '/tr 3 /tw 3 ' & clip(command(''),1)

    Hmmmm I need the ExitCode from that which I can't think how to do without CreateProcess() or ShellExecuteEx).
  • 10-24-2012, 10:16 AM
    linder

    Re: Compiler Error GEN 1053 appears when Digital Signature set to Yes or No

    Added and changed in SetupBuilder 8:

    IMPROVEMENT: IDE: Add CODESIGN_DELAY #pragma to set the delay (in number of seconds) between each timestamp trial. Defaults to 3.

    IMPROVEMENT: IDE: Add CODESIGN_TSTRIALS #pragma to set the maximum number of timestamp trials until success; defaults to 3.

    CHANGE: IDE: The default delay between each code-signing timestamp trial increased from 0 to 3 seconds.

    CHANGE: IDE: The default maximum number of timestamp trials until success increased from 1 to 3.


    Friedrich
  • 10-24-2012, 09:48 AM
    linder

    Re: Compiler Error GEN 1053 appears when Digital Signature set to Yes or No

    You can't add parameters. "File Location" only points to the signtool.exe or signcode.exe files.

    But we'll add a compiler #pragma to SetupBuilder 8 to specify the maximum number of timestamp trials until success and the delay (in number of seconds) between each timestamp trial.

    Friedrich
  • 10-24-2012, 09:41 AM
    linder

    Re: Compiler Error GEN 1053 appears when Digital Signature set to Yes or No

    Yes, this is correct and expected. That's how the MS Authenticode tool works.

    Friedrich
  • 10-24-2012, 09:40 AM
    linder

    Re: Compiler Error GEN 1053 appears when Digital Signature set to Yes or No

    John,

    I think there is a problem with your protection software product (as I understand it, earlier this month you had no issues so it seems to me that one of the latest definition updates introduced it in your case). What you can try is to add the code-signing tool to the "exclusion" list. Perhaps this can help to let it go through to the timestamp server.

    Or convert your .spc/.pvk to a .pfx and use signtool.exe to code sign.

    Friedrich
  • 10-24-2012, 09:26 AM
    jgamalinda

    Re: Compiler Error GEN 1053 appears when Digital Signature set to Yes or No

    I tried adding " /tr 3 /tw 3" under Tools,Options,File Locations to the SignCode line but it errors in compiling.

    That page would be a good spot to add parm override.
This thread has more than 10 replies. Click here to review the whole thread.

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •