PDA

View Full Version : Friedrich - Please enlighten me



NewsArchive
01-12-2013, 03:27 AM
See attached
I have antivirus turned off and no firewall
Yet, I still cannot code sign 1 file

Thanks

Dan Scott
Garage Partner Pro/Invoice Partner
www.garagepartner.com

NewsArchive
01-12-2013, 03:27 AM
Go to Tools > Options. Select File Location and change the signtool
location path to the one you wish to use. It will then work.

--

Russ Eggen
RADFusion International, LLC

NewsArchive
01-12-2013, 03:28 AM
Russ,
It is only one file out 100, all the other are fine

Dan

NewsArchive
01-12-2013, 03:28 AM
Dan,

> Yet, I still cannot code sign 1 file

Is it a file you created or someone else?

Is it already signed?

Is it marked read-only?

Is it Friday?

--
Lee White

RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
RPM Review........: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Report Faxing.....: http://www.cwaddons.com/products/afe/
---Enroll Today---: http://CWaddons.com

Enhanced Reporting: http://CreativeReporting.com

Product Release & Update Notices
http://twitter.com/DeveloperPLUS

Windows 8 brings us "The Oval, Bumper Car, Roller Coaster of Wait!"

NewsArchive
01-12-2013, 05:43 AM
Dan,

> It is only one file out 100, all the other are fine

Assuming the Authenticode configuration information for this specific file
is correct (e.g. the password, link to the correct certificate, etc.) and if
no anti-virus or anti-spyware and firewall "blocks" the code-signing
process, then there is a problem with the .exe PE structure. Windows
Authenticode was unable to successfully code-sign your file and so it
returns Error Code #1.

As a test, I would suggest to create a "dummy" script and try to code-sign
only this specific file. If it still fails, disable timestamping to see if
this makes a difference.

It's always caused by (at least) one the following:

1. Authenticode configuration information is incorrect

2. "Something" blocks access to the timestamp server

3. Certificate expired (please note that it's possible to use different
certificates from the same project)

4. The .exe PE structure is invalid

Friedrich

NewsArchive
01-12-2013, 08:31 AM
Friedrich

Thanks, I will do as you say.

The script that contains this file also contains many other exe and dll
files with no errors, so I think
I can eliminate number 1 and Number 3, but what do you think about number 2?

Right now I have the offending file at the end of all the other files, but I
have tried moving it up the list to see if maybe something gets tired, but
same thing, when it hit that file RegSet.exe it chokes.

Dan

NewsArchive
01-12-2013, 08:33 AM
Lee

See Below

"Lee White (Lodestar Software)" wrote in message
news:bol1f81jtf6rh5q5mpnmdmbmgcn2fp1ouo@cwaddons.c om...

Dan,

> Yet, I still cannot code sign 1 file

Is it a file you created or someone else? By Me

Is it already signed? It was surely signed at one time,(Probably 75 times)
but I just recompiled it
to see if that was the problem

Is it marked read-only? I will look, but if it was, I don't think I would
be able to recompile and create the
exe again.

Is it Friday? There Ya Go, it's Friday

--
Lee White

RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
RPM Review........: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Report Faxing.....: http://www.cwaddons.com/products/afe/
---Enroll Today---: http://CWaddons.com

Enhanced Reporting: http://CreativeReporting.com

Product Release & Update Notices
http://twitter.com/DeveloperPLUS

Windows 8 brings us "The Oval, Bumper Car, Roller Coaster of Wait!"

NewsArchive
01-13-2013, 03:45 AM
Dan,

> The script that contains this file also contains many other exe and
> dll files with no errors, so I think
> I can eliminate number 1 and Number 3, but what do you think about
> number 2?

You can only eliminate 1 and 3 here if you are using a wildacard file
specification to code-sign multiple files and the other files (from that
specific #code-sign application..." line) code-sign successfully.

If you have one #code-sign application..." line to code-sign RegSet.exe and
the configuration information in this line is incorrect, then the other
files code-sign okay.

> Right now I have the offending file at the end of all the other files, but
> I have tried moving it up the list to see if maybe something gets tired,
> but same thing, when it hit that file RegSet.exe it chokes.

Then just for fun, I would try to manually code-sign RegSet.exe (via the
command line). Perhaps Windows will give you a human readable error message
to find out what is wrong with this file.

Please keep us posted.

BTW, you can also send me RegSet.exe and I can try to find out what is wrong
with this file.

Friedrich

NewsArchive
01-13-2013, 03:46 AM
Not sure how to code sign from the cmd line, SB spoils me.
I will send you a copy of regset.

Dan

NewsArchive
01-13-2013, 03:47 AM
Here's one way:

>"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\signtool.exe" sign /f P:\Comodo\Your.p12 /p YourPassword /t http://timestamp.comodoca.com/authenticode /d "Description" /du www.yoursite.com /v %1

Mike Hanson

NewsArchive
01-13-2013, 03:47 AM
Yea, thanks Mike

Dan Scott

NewsArchive
01-13-2013, 03:50 AM
Strange, Re compiled regset.exe and the code signing went thru as
advertised.

Tried to code sign again and instead of the warning that it was already code
signed like
all the others, it simply failed.

Well, at least I know I have to recompile it before I do SB compile. PITA,
but it works.

Dan Scott

NewsArchive
01-13-2013, 03:51 AM
Dan,

> Tried to code sign again and instead of the warning that it was already code
> signed like
> all the others, it simply failed.

Do you have the option to skip enabled?

--
Lee White

RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
RPM Review........: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Report Faxing.....: http://www.cwaddons.com/products/afe/
---Enroll Today---: http://CWaddons.com

Enhanced Reporting: http://CreativeReporting.com

Product Release & Update Notices
http://twitter.com/DeveloperPLUS

Windows 8 brings us "The Oval, Bumper Car, Roller Coaster of Wait!"

NewsArchive
01-13-2013, 03:51 AM
Yuppers

Dan Scott

NewsArchive
01-13-2013, 03:52 AM
Dan,

> Yuppers

In that case you're on your own!<g>

--
Lee White

RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
RPM Review........: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Report Faxing.....: http://www.cwaddons.com/products/afe/
---Enroll Today---: http://CWaddons.com

Enhanced Reporting: http://CreativeReporting.com

Product Release & Update Notices
http://twitter.com/DeveloperPLUS

Windows 8 brings us "The Oval, Bumper Car, Roller Coaster of Wait!"

NewsArchive
01-13-2013, 07:43 AM
> Well, at least I know I have to recompile it before I do SB compile.
> PITA, but it works.

No, Dan! It's not SB that can't code-sign your file. It's Microsoft
Authenticode that can't code sign it because your file is damaged!!!!

See attached screenshot from an attempt to code-sign it via Microsoft
SignCode.exe. The regset.exe file you sent (compiled: May 05, 2012) is NOT
code signed and Authenticode fails here (and the tool can't even provide an
error code; so it's an unknown error code).

In other words, there is definitely a problem with the file's .exe PE
structure. If I were you I would check this and NOT distribute the file to
others yet.

BTW, interesting typo in the Microsoft error message: "The Sigrature
wizard..." (see screenshot) <g>

Friedrich

NewsArchive
01-13-2013, 07:44 AM
Unknown error code on "regset.exe".

Friedrich

NewsArchive
01-13-2013, 08:41 AM
> The regset.exe file you sent (compiled: May 05, 2012)...

Should read: "The regset.exe file you sent (created: May 05, 2012 :
re-compiled: January 12, 2013)..."

Friedrich

NewsArchive
01-13-2013, 08:42 AM
> BTW, interesting typo in the Microsoft error message: "The Sigrature
> wizard..." (see screenshot) <g>

I think that regset.exe file (sometimes) causes a stack corruption in the
Authenticode tool (so no error message and an incorrect "Sigrature"
message). The message does not even exist inside the signcode.exe file.

Friedrich

NewsArchive
01-14-2013, 03:15 AM
Friedrich

I can't imagine what would be wrong in the executable.
I will try deleting the exe and recreating it.

Dan