EldoS | Feel safer!

Software components for data protection, secure storage and transfer

No security handler available exception

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#22051
Posted: 10/17/2012 04:37:00
by KRZYSZTOF JAKIELASZEK (Standard support level)
Joined: 10/17/2012
Posts: 5

hi,
when I try to verify pdf file in my application and I call TElPDFSignature.Validate() method I get an exception: No security handler available
and stack trace:
at SBPDF.TElPDFSignature.Validate(Boolean MDPLiberalMode)
at SBPDF.TElPDFSignature.Validate()

here is my code
document = new TElPDFDocument();
document.Open(fileStream);
Sign = document.get_Signatures(0);
IsVerified = Sign.Validate(); // exception goes here
Handler = (TElPDFPublicKeySecurityHandler)Sign.Handler;

what should I do to fix it?

regards
Krzysiek
#22052
Posted: 10/17/2012 04:46:34
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

The following two functions must be called before PDF functionality is used:

Code
SBPDF.Unit.Initialize();
SBPDFSecurity.Unit.Initialize();


Most likely you missed them.
#22053
Posted: 10/17/2012 05:16:47
by KRZYSZTOF JAKIELASZEK (Standard support level)
Joined: 10/17/2012
Posts: 5

thanks for quick answer
I put those code lines before my code line
document = new TElPDFDocument();
and I still get the same exception
#22054
Posted: 10/17/2012 05:22:30
by Vsevolod Ievgiienko (EldoS Corp.)

Forgot to mention that you should also add this line:

Code
SBPAdES.Unit.Initialize();


If this doesn't help then try to validate the signature using our sample from \EldoS\SecureBlackbox.NET\Samples\C#\PDFBlackbox\PAdES folder and check if the same problem occurs.
#22055
Posted: 10/17/2012 05:32:33
by KRZYSZTOF JAKIELASZEK (Standard support level)
Joined: 10/17/2012
Posts: 5

I use SecureBlackbox ver. 7.2.0.171 and I don't have PAdES folder under \EldoS\SecureBlackbox.NET\Samples\C#\PDFBlackbox
#22056
Posted: 10/17/2012 05:40:14
by Vsevolod Ievgiienko (EldoS Corp.)

Indeed PAdES was not available in SBB 7.2. Please try to use the latest SBB build and check if you can validate your signature with the sample I wrote above.
#22057
Posted: 10/17/2012 07:55:06
by KRZYSZTOF JAKIELASZEK (Standard support level)
Joined: 10/17/2012
Posts: 5

when I use SBB 10.0.226.0 it does not throw an exception, but the Validate() method returns false. also when I use third party software to verify that pdf file the result is that the file's sign is correctly verified...
#22058
Posted: 10/17/2012 07:58:34
by Vsevolod Ievgiienko (EldoS Corp.)

You can post your file for investigation via Helpdesk.
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 733 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!