EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Code for PDF signing

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#21330
Posted: 09/06/2012 11:00:51
by Vsevolod Ievgiienko (EldoS Corp.)

Quote
when I open sifned PDF docuemnt in Ac┼Ľobat signature has only local timestamp and not timestamp from timestamp server?

From the first point of view your code is correct. Could you please send us generated document via Helpdesk for investigation.
#21333
Posted: 09/06/2012 11:28:16
by Eugene Mayevski (EldoS Corp.)

Let the user check the sample first.


Sincerely yours
Eugene Mayevski
#21339
Posted: 09/06/2012 15:17:00
by Zdenek Mukensnabl (Priority Standard support level)
Joined: 09/05/2012
Posts: 15

Hi,
I solved my problem with timestamp set property

PublicKeyHandler->SignatureType = stMDP;

But now when I close (save) document I get error "Invalid certificate data". What means this error?

Thanks
#21341
Posted: 09/06/2012 15:39:29
by Eugene Mayevski (EldoS Corp.)

I don't think we'll get far with helping you if you do something on your own without letting us help you. In other words, please DO TRY THE SAMPLE first. See if it works. If not, let's deal with the sample.


Sincerely yours
Eugene Mayevski
#21357
Posted: 09/07/2012 07:36:45
by Zdenek Mukensnabl (Priority Standard support level)
Joined: 09/05/2012
Posts: 15

Hi,
sample code works fine, but when I add timestamping (following code)

PublicKeyHandler->IgnoreTimestampFailure = false;
PublicKeyHandler->SignatureType = stMDP;

HTTPSClient->RequestParameters->Username = "demoTSA";
HTTPSClient->RequestParameters->Password = "demoTSA2010";

HTTPTSPClient->HTTPClient = HTTPSClient;
HTTPTSPClient->URL = "https://www.postsignum.cz/DEMOTSA/TSS_user/";
PublicKeyHandler->TSPClient = HTTPTSPClient;

I get error "Certificate validation handler is not assigned. Please handle OnCertificateValidate event ...",

I implement this event for HTTPSClient component as

void __fastcall TfrmMain::HTTPSClientCertificateValidate(TObject *Sender, TElX509Certificate *X509Certificate,
bool &Validate)
{
Validate = true;
}

but when I sign and timestamp PDF document I get error "Invalid certificate data."


Thanks
#21360
Posted: 09/07/2012 07:49:58
by Eugene Mayevski (EldoS Corp.)

I am confused - do you add the above code to the sample project or to your project?


Sincerely yours
Eugene Mayevski
#21361
Posted: 09/07/2012 08:20:29
by Zdenek Mukensnabl (Priority Standard support level)
Joined: 09/05/2012
Posts: 15

Hi,
I add this code to sample code TinySigner.
#21369
Posted: 09/07/2012 12:04:54
by Vsevolod Ievgiienko (EldoS Corp.)

Could you send us the full project (via Helpdesk) for investigation because such exception can't occur if TElHTTPSClient->OnCertificateValidate event handler is ready assigned. Is it?
#21371
Posted: 09/07/2012 13:36:29
by Eugene Mayevski (EldoS Corp.)

As I understand you are playing with C++Builder sample which is simpler than Delphi one (Delphi sample has been updated with timestamping functionality and HTTPS certificate validation).

Please re-check the issue with Delphi sample as well and also please try signing and timestamping some other document and let us know the result.

Doing those checks should narrow down the problem and let us focus on solving it rather than reproducing it.


Sincerely yours
Eugene Mayevski
#21372
Posted: 09/07/2012 14:06:22
by Dmytro Bogatskyy (EldoS Corp.)

Please check if you occasionally didn't enable TElPDFPublicKeySecurityHandler.IgnoreTimestampFailure property.

When I tried to sign using your timestamp server I got an error SB_TSP_ERROR_NO_REPLY with http error code 401 (Unauthorized). You can use TElHTTPTSPClient.OnHTTPError to obtain http error code and TElHTTPSClient.RequestParameters to set username and password for example.
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.

Reply

Statistics

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