EldoS | Feel safer!

Software components for data protection, secure storage and transfer

No security handler available exception

#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 (Team)

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 (Team)

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 (Team)

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 (Team)

You can post your file for investigation via Helpdesk.

Reply

Statistics

Topic viewed 880 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!