EldoS | Feel safer!

Software components for data protection, secure storage and transfer

sign. : Security handler not found

Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.
#7283
Posted: 08/13/2008 09:49:28
by Kvetoslav Jansta (Standard support level)
Joined: 05/06/2008
Posts: 56

Hi, I try to sign pdf document, but still i have error :
class EElPDFDocumentError with message 'Security handler not found'.
class EElPDFDocumentError with message 'Internal error ElPDFDocument.EnumerateStringsAndStreams.1'.
Internal error ElPDFDocument.EnumerateStringsAndStreams.1

can you help me ?, thank you, slava

pdfDocument := TElPDFDocument.Create(nil);
pdfCert := TElX509Certificate.Create(nil);
CertStorage := TElMemoryCertStorage.Create(nil);
PublicKeyHandler := TElPDFPublicKeySecurityHandler.Create(nil);
WinCertStorage := TElWinCertStorage.Create(nil);

pdfDocument.Open(file);
filling pdfCert......... TElX509Certificate

CertStorage.Clear;
PublicKeyHandler.SignatureType := pstPKCS7SHA1;
CertStorage.Add(pdfCert);
PublicKeyHandler.CertStorage := CertStorage;
PublicKeyHandler.CustomName := 'Adobe.PPKMS';

Index := pdfDocument.AddSignature;
Sig := pdfDocument.Signatures[Index];
Sig.Handler := PublicKeyHandler;
Sig.AuthorName := MultiByteToUTF8('aaaa');
Sig.SigningTime := LocalTimeToUTCTime(Now);
Sig.Reason := MultiByteToUTF8('rrrrrr');
Sig.SignatureType := stDocument;
Sig.Invisible := true;

pdfDocument.SignAndEncrypt;
#7285
Posted: 08/13/2008 13:09:47
by Dmytro Bogatskyy (EldoS Corp.)

You doesn't set EncryptionHandler of TElPDFDocument. Please, see SecurePDF sample for how to fill encryption handler.
Quote
Hi, I try to sign pdf document, but still i have error

Or, if you want to sign only you shouldn't use SignAndEncrypt method.
#7287
Posted: 08/14/2008 02:21:40
by Kvetoslav Jansta (Standard support level)
Joined: 05/06/2008
Posts: 56

Quote
Bogatskyy wrote:
You doesn't set EncryptionHandler of TElPDFDocument. Please, see SecurePDF sample for how to fill encryption handler.
Quote
Hi, I try to sign pdf document, but still i have error

Or, if you want to sign only you shouldn't use SignAndEncrypt method.


hi, o yes, I want just only to sign pdf document, don't see method .sign, I see only SignAndEncrypt. like in sample.
#7288
Posted: 08/14/2008 02:54:11
by Kvetoslav Jansta (Standard support level)
Joined: 05/06/2008
Posts: 56

Quote
Kvetoslav Jansta wrote:
Quote
Bogatskyy wrote:
You doesn't set EncryptionHandler of TElPDFDocument. Please, see SecurePDF sample for how to fill encryption handler.
Quote
Hi, I try to sign pdf document, but still i have error

Or, if you want to sign only you shouldn't use SignAndEncrypt method.


hi, o yes, I want just only to sign pdf document, don't see method .sign, I see only SignAndEncrypt. like in sample.



o yes, I see it now :) there is no .sign, just only .Close(True) will apply changes with el.sign.

ok. best regards, slava

Reply

Statistics

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