EldoS | Feel safer!

Software components for data protection, secure storage and transfer

ElAuthenticodeSigner

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
#6437
Posted: 05/30/2008 04:40:40
by Filosoft  (Premium support level)
Joined: 05/28/2008
Posts: 12

Hi,

I am trying to sign some PE files. I followed the how-to instructions and created and populated a Certificate Chain (end-entity <- code signing CA <- Server CA).
- CertChain.Complete is True
- CertChain.Validate returns cvOK

- Signer.OpenFile(fname) returns 0
- Signer.AddAuthenticode(acSHA1) returns True
- Signer.AddSignature('','',acSHA1,CertChain.Certificates[0],True,True) returns 0
- Signer.CloseFile(True) returns 0

The problem is that Windows reports the signature as invalid...
Using the same certificate with MS tools the signature is valid...

Can you help ?

Regards,
#6438
Posted: 05/30/2008 04:52:37
by Mykola Olshevsky (Basic support level)
Joined: 07/07/2005
Posts: 450

Have you added all certificates from the chain to ElAuthenticodeSigner.Certificates?
#6440
Posted: 05/30/2008 04:57:29
by Eugene Mayevski (EldoS Corp.)

1) Is it RSA or DSA certificate?
2) Can you please sign some small file, put it to ZIP archive and post the archive here?


Sincerely yours
Eugene Mayevski
#6441
Posted: 05/30/2008 05:02:51
by Filosoft  (Premium support level)
Joined: 05/28/2008
Posts: 12

Quote
Mykola Olshevsky wrote:
Have you added all certificates from the chain to ElAuthenticodeSigner.Certificates?


I followed the how-to that says that creating the chain and adding the first certificate from the chain (index 0) to the Signer will automatically add other needed certificates (provided that they are in the chain).

If I try to add the other certificates it will fail.

Regards,
#6442
Posted: 05/30/2008 05:10:06
by Filosoft  (Premium support level)
Joined: 05/28/2008
Posts: 12

Quote
Eugene Mayevski wrote:
1) Is it RSA or DSA certificate?
2) Can you please sign some small file, put it to ZIP archive and post the archive here?


Certificate is RSA.

Please check the attached file.

Main difference from the MS Tool signed PE is at 1.3.6.1.4.1.311.2.1.12:
- SBB signed has value: 30 08 a0 02 80 00 a1 02 80 00
- MS signed has value: 30 00


Thanks,


[ Download ]
#6443
Posted: 05/30/2008 05:12:18
by Eugene Mayevski (EldoS Corp.)

I am afraid that you have misunderstood the how-to.

Try using the sample application (AuthenticodeDemo) to sign the file.


Sincerely yours
Eugene Mayevski
#6444
Posted: 05/30/2008 05:44:02
by Filosoft  (Premium support level)
Joined: 05/28/2008
Posts: 12

Quote
Eugene Mayevski wrote:
I am afraid that you have misunderstood the how-to.

Try using the sample application (AuthenticodeDemo) to sign the file.


I already done that. Same result, invalid signature.

I can send you the certificate I am using and it's chain for test purposes if needed.
#6445
Posted: 05/30/2008 06:01:34
by Eugene Mayevski (EldoS Corp.)

OK, and what happens if you use the sample certificates included with SecureBlackbox? If the problem persists with sample certificates, we will be able to test the issue here.


Sincerely yours
Eugene Mayevski
#6446
Posted: 05/30/2008 06:11:56
by Filosoft  (Premium support level)
Joined: 05/28/2008
Posts: 12

OK, I tried with cert.pfx and child_cert.pfx (sample certificates) and the signature is also invalid.

I used your Authenticode sample.

Regards,
#6480
Posted: 06/03/2008 05:48:09
by Filosoft  (Premium support level)
Joined: 05/28/2008
Posts: 12

Hi,

Any news about this ?

Regards,
Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages

Reply

Statistics

Topic viewed 3735 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!