Archived Forum Post

Index of archived forum posts

Question:

How to use Chilkatcrypt features

Aug 30 '12 at 08:39

Dear Forum Members
I have a query regarding Digital Signature Implementation. I have Delphi 6 IDE. I have downloaded the Delphi ActiveX components. Imported the type libraries and registered the Delphi DLL's. I am trying to execute the sample examples which were given in the repository.

crypt := TChilkatCrypt2.Create(Self);

//  Any string argument automatically begins the 30-day trial.
success := crypt.UnlockComponent('30-day trial');
if (success <> 1) then
  begin
    ShowMessage('Crypt component unlock failed');
    Exit;
  end;

cert := TChilkatCert.Create(Self);
success := cert.LoadByCommonName('Chilkat Software, Inc.');
if (success <> 1) then
begin
    ShowMessage(cert.LastErrorText);
    Exit;
end;

The above code will always returns the loadbycommonname procedure with "0". Could you please let me know how to resolve the issue ?


Answer

You would need to change the string passed to LoadByCommonName to the name of your certificate. Also, if you already did it, then it would make sense to provide the available error information w/ your question -- meaning the contents of the LastErrorText property..