PDA

View Full Version : Failure to Code Sign errors



NewsArchive
09-10-2009, 08:59 AM
Trying Setupbuilder 7 on Windows 7 64 bit.

It fails to code sign the installer.
It also fails to codesign an exe file with the following error.

Developer Edition Version 7.0.2712
SetupBuilder EXE (SBEXE) Compiler Version: 7.0.2712

Embed Manifest (Preprocessor)...
BoTran2.sb7(179): warning GEN1090: File already manifested:
E:\DataC\BTTstuff\BoTran2\ReadTrn2.exe
Adding Digital Certificate (Preprocessor)...

Compiler error GEN1053: Code signing process failed. Error Code: -1

Tran2.sb7 - 1 error(s), 1 warning(s)
------------------------------ Compilation
aborted -------------------------------

If I try to run it again without closing and opening SB7, it crashes.

Any ideas what could be causing this?
everything looks good otherwise.
Worked great on XP SP2 with SB6.

Best regards,
Bo

NewsArchive
09-10-2009, 09:00 AM
The standard list of things to check, maybe?

1. Has your certificate expired?
2. Double-check that you've entered the correct password.
3. If you're using a PFX, have you specified the location of signtool.exe
in
Tools | Options | File Locations (or of signcode.exe if you're not using a
PFX)
4. Double-check that you've specified the correct path to your signing
credentials

The latest build (2712) code-signs fine on my Vista 64 machine.

Jane

NewsArchive
09-10-2009, 09:01 AM
Jane,

They seem to be ok, as it works on another SB6 converted setup, without
signing any additional exe's,
just the installer and uninstaller.

and also works if I comment out that one file, and it successfully code
signs the rest.
This one is weird.

Bo

NewsArchive
09-10-2009, 09:01 AM
What happens if you mark the "Skip if file is already code-signed" box on
the errant exe ?

Jane

NewsArchive
09-10-2009, 09:01 AM
Jane,

Didn't make any difference. It was checked. Had to just comment it out to
get past it.
The manifest was working ok with the skip on it. Just throws warnings,
and the other 2 exe's worked ok. Just throws warnings once they are signed.
I haven't tried a fresh exe for the errant one yet. Maybe an earlier
install
code signed it without a manifest or something.

Got the rest to compile by deleting the License agreement file, putting it
back in,
and getting rid of the extra languages for it. That also was causing it to
abort.

This is acting weird, but got it going for now. I hate it when that happens.
Thanks for the advise.

Best regards,
Bo

NewsArchive
09-10-2009, 09:02 AM
Hi Bo,

> BoTran2.sb7(179): warning GEN1090: File already manifested:
> E:\DataC\BTTstuff\BoTran2\ReadTrn2.exe

Sounds like the file is already codesigned. But even if it is it should not
cause problems (me thinks...)

Best regards,

--
ArnĂ³r Baldvinsson - Icetips Alta LLC
Port Angeles, Washington
www.icetips.com - www.buildautomator.com - www.altawebworks.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
09-10-2009, 09:02 AM
Take a look at 'How to fool Friedrichs exellent code signing'...
Am i not the only one?

Edvard

NewsArchive
09-10-2009, 09:03 AM
Bo,

Check the options for SB7. There is a tab for code signing and the default
is to use a provided signing tool elsewhere. You need to change that to
your signing program. Once that is changed, code signing should be back to
where it was.

--
Russell B. Eggen
www.radfusion.com
Clarion developers: www.radfusion.com/devs.htm

NewsArchive
09-10-2009, 09:08 AM
Russ,

That was one of the items I suggested he check.
But the fact that he can sign other stuff with SB7 and can sign his
trouble-child if he doesn't sign that particular exe makes me think that's
not the issue. (Unless he's using a PFX for that file only and SPC/PVK for
the stuff that works).

Jane

NewsArchive
09-10-2009, 09:38 AM
Bo,

The license agreement file or the extra languages do not cause this
code-signing issue. If ReadTrn2.exe gives an code-sign Error Code: -1 then
the Microsoft code-signing tool was unable to code-sign it. You can try to
use SignCode.exe with the exact same "#code-sign application" parameters to
code-sign ReadTrn2.exe -- perhaps this will give a human readable error
messages.

Possible reasons for Error Code: -1:

1. Invalid PE header (file is damaged)
2. Certificate expired
3. Certificate password incorrect
4. Timestamp server not accessible (can also happen if the firewall suddenly
blocks access to the timestamp server)

Friedrich

NewsArchive
09-11-2009, 01:15 AM
Bo

As Friedrich points out I have had this happen every so often.

I have traced mine down to a timeout on the time stamping which fails to
report any specific error. Try again and it works. It can sometimes take 4
attempts.

Not sure if this helps but perhaps it does. Take off the time stamping and
see if that helps.

John Fligg

NewsArchive
09-11-2009, 01:16 AM
John,

>Not sure if this helps but perhaps it does. Take off the time stamping and
see if that helps.

that's what I had to do, comment it out to get it to compile.

But later, I dumped the languages, uncommented it, and it worked.

Bo

================

NewsArchive
09-11-2009, 01:17 AM
>Take a look at 'How to fool Friedrichs exellent code signing'...

I am rapidly getting all the experience with that. ;-)

Sometimes they are code signed before, sometimes not.
Same exe used in a couple different installers, and worked previously on XP
Pro with sb6.
It is supposed to skip it then, and it does sometimes.<g>

Bo

NewsArchive
09-11-2009, 01:18 AM
Russell, Jane,

Must be a time out or firewall thing, as it works sometimes, and not others.
Just reared its head after updating to sb7 and windows7 ultimate 64

Bo