CAPICOM use for signature in Delphi

Asked

Viewed 265 times

0

I’m using the capicom.dll on Delphi to perform the signature on files (planned in .pdf). I’ve been able to read the certificates My of the area CAPICOM_CURRENT_USER_STORE.

But I have the following problem in IF down below:

if (cert.HasPrivateKey) And (cert.ValidFromDate <= Now) And (cert.ValidToDate >= Now) then
  begin
  { assinar um documento }
  end;i

The problem is in (cert.HasPrivateKey). He is always returning Inaccessible value in the watch. Can anyone give me a hand? Note: If this method is outdated, please let me know!

  • Inaccessible value is not a problem, he is informing you that you can not show a value, of course, HasPrivateKey is a method and not a property.

  • in the example I’m following, he takes that test... it would be wrong to take the test then?

  • No, it’s not, I’m saying he’s not a problem.

  • Friend, do you know about this routine? In my source it uses this validation (the whole if). Obs: I have 2 certificates on my machine

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.