EldoS | Feel safer!

Software components for data protection, secure storage and transfer

using OID in TElHTTPTSPClient

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#28281
Posted: 02/06/2014 10:48:16
by Christos Papaterpos (Standard support level)
Joined: 03/11/2013
Posts: 7

Hello.

I want to use a specific timestamp server for my digital signatures and I am trying the TElHTTPTSPClient class.
My timestamp server says that I need to specify the OID Policy field and set it to a specific value.
I have taken a look in the properties of TElHTTPTSPClient class and I am not sure how should my code look like to provide this value. Could you please help me?

Thanks.
#28283
Posted: 02/06/2014 11:38:53
by Ken Ivanov (EldoS Corp.)

Hello Christos,

The policy identifier should be assigned to the ReqPolicy property of the TSP client object. Note that the policy identifier is expected in binary (not dotted) format, so you would probably need to convert it with StrToOID() method before assigning to the ReqPolicy property:

Code
TSPClient.ReqPolicy = SBUtils.Unit.StrToOID("1.2.3.4.5");
#28445
Posted: 02/18/2014 12:14:06
by Christos Papaterpos (Standard support level)
Joined: 03/11/2013
Posts: 7

Thanks a lot.
I found the mentioned function here:

Code
SBStrUtils.__Global.StrToOID(OID)


I also have another question.
I am using digital signatures (remote signing with applet) with timestamps (using TElHTTPTSPClient) and I have used these two timestamp servers:

a)
http://timestamp.ermis.gov.gr/TSS/HttpTspServer
OID: 1.3.6.1.4.1.601.10.3.1

b)
http://timeserver1.eim.gr/tsp
(no OID)

When using the 2nd server with a large enough signature extra space (TElPDFSignature.ExtraSpace) (I use 2600 for simple signatures and 9000 when my signature has a display image) everything seems fine.

However, when using the 1st server I have some weird problems.
When I had left my extra space as it was (2600 or 9000) I got the following exception:
Quote
No enough space for signature ---> SBPDFCore.EElPDFError: No enough space for signature
at SBPDF.TElPDFDocument.CompleteAsyncOperation(Stream Stream, TElDCAsyncState AsyncState, TElPDFSecurityHandler Handler)


So, I went and increased my extra space for the signatures (to 9000 for simple signatures and 13000 for those with image) and everything seemed fine initially.
But then I have noticed that some signatures invalidated the pre-existing signatures in the PDF.
Trying to use a larger value for extra space has also reproduced the same problem when using the 2nd server.
Is there any limit to the value I can use in TElPDFSignature.ExtraSpace?
Do you have any idea what may be wrong here?
Acrobat Reader shows that the locked field of the previous signer was edited, but my code doesn't seem to do this and extra-space seems to modify this behaviour.
(Note: I use iTextSharp for filling some forms around the signature)

In case it is helpful, I post three PDF files with the invalidated signatures.
Also, the ZIP contains the different revisions of a PDF file as each signature was inserted into it:
https://www.dropbox.com/s/uc0k3kogjnxn1uv/PDFs.zip

Thank you.
#28446
Posted: 02/18/2014 13:20:49
by Eugene Mayevski (EldoS Corp.)

It's a bad idea to post irrelevant questions to the same topic (either in the forum or in HelpDesk). I've moved your post to HelpDesk for investigation.


Sincerely yours
Eugene Mayevski

Reply

Statistics

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