EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Verifying XAdES and PKCS#7 timestamps

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#10070
Posted: 05/19/2009 23:59:51
by Thanh Nguyen Trung (Priority Standard support level)
Joined: 09/12/2008
Posts: 73

Hi,

I have a question:
For PDF document, as you said in the above post that the timestamps are validate automatically when the document is processed, it is ok. Could you please tell me steps to validate timestamps for XADES-T and PKCS7. (I know how to validate the certificates to signate the ts responses).


Thanks
Thanh
#10075
Posted: 05/20/2009 05:36:19
by Thanh Nguyen Trung (Priority Standard support level)
Joined: 09/12/2008
Posts: 73

Hi,

Do I need to call a "complete function" for the method AddArchiveTimestamp of the TELXADESSigner. (to generate XADES-A)
I use this method, and the signed document is a binary file, not a xml file.

The TSPClient is ok, because it works well to generate XADES-T

Thanks
Thanh
#10076
Posted: 05/20/2009 06:44:18
by Dmytro Bogatskyy (EldoS Corp.)

To validate timestamps you should use ElXAdESVerifier.CheckTimestamp method.
For example:
XAdESVerifier.CheckTimestamp(XAdESVerifier.ArchiveTimestamps[0])

Quote
Do I need to call a "complete function" for the method AddArchiveTimestamp of the TELXADESSigner. (to generate XADES-A)

What do you mean by "complete function"? The second parameter? It is not necessary. It controls formatting of xml elements, if the AddArchiveTimestamp method called after TELXAdESSigner.Save method or from TELXAdESVerifier class.
#10080
Posted: 05/20/2009 09:30:21
by Thanh Nguyen Trung (Priority Standard support level)
Joined: 09/12/2008
Posts: 73

Hi,

I copied and the XMLBlackbox\SimpleSigner examples with only one change that I replace "XAdESSigner.TSPClient = TSPClient" with "XAdESSigner.AddArchiveTimestamp(TSPClient)". The function works well in Windows Forma Application but I get an error while deploy it under a WCF service. The signed document from the WCF service is always in binary format, not a well-form xml document. if I keep the original code, I can generate signatures without any error.

Thanks
Thanh
#10087
Posted: 05/20/2009 16:49:15
by Dmytro Bogatskyy (EldoS Corp.)

Quote
but I get an error while deploy it under a WCF service

Exactly what error did you get?
Quote
The signed document from the WCF service is always in binary format, not a well-form xml document.

Please, post the sample document.
Quote
if I keep the original code, I can generate signatures without any error.

If the code:
XAdESSigner.AddSignatureTimestamp(TSPClient)
produce the same error?
#10088
Posted: 05/20/2009 19:43:32
by Thanh Nguyen Trung (Priority Standard support level)
Joined: 09/12/2008
Posts: 73

Hi,

1. As I said I used your sample code XMLBlackbox\SimpleSigner with only one mirror change that the line of code "XAdESSigner.TSPClient = TSPClient" was replaced with "XAdESSigner.AddArchiveTimestamp(TSPClient)". My changes works well in windows form application (change directly in original sample).

2. I copied the source code with my change, put it in a library function, and deploy it in a WCF service. The output (signed document) was always a fie in binary format not a xml one. If I change back to replace "XAdESSigner.AddArchiveTimestamp(TSPClient) with "XAdESSigner.TSPClient = TSPClient", the function works well (under WCF service).

I nearly did no change in the original sample code, so I think it is not nessesary to put the source code here. I have not had chance to try "XAdESSigner.AddSignatureTimestamp(TSPClient)"

Best,
Thanh
#10089
Posted: 05/20/2009 19:59:58
by Thanh Nguyen Trung (Priority Standard support level)
Joined: 09/12/2008
Posts: 73

Quote
if the code:
XAdESSigner.AddSignatureTimestamp(TSPClient)
produce the same error?


I've just tried XAdESSigner.AddSignatureTimestamp(TSPClient) and got the same error, a binary file is returned not a xml document.
#10097
Posted: 05/21/2009 07:19:40
by Dmytro Bogatskyy (EldoS Corp.)

Quote
I copied the source code with my change, put it in a library function, and deploy it in a WCF service. The output (signed document) was always a fie in binary format not a xml one.

Sorry, I can't reproduce this.
As I understand the "library function" incorporate a code for loading xml document, signing it and then saving it to a stream?
If the instance of TElXMLDOMDocument has a correct structure? For example check an OuterXML property of the XMLDocument.DocumentElement
#10106
Posted: 05/21/2009 13:44:42
by Thanh Nguyen Trung (Priority Standard support level)
Joined: 09/12/2008
Posts: 73

Hi,

My fault, Thanks for your support!
Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.

Reply

Statistics

Topic viewed 2480 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!