EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Enter PIN programmatically

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
#23743
Posted: 02/26/2013 09:53:24
by walter Schrabmair (Basic support level)
Joined: 12/15/2012
Posts: 43

No ken, the advice is not correct. The Cast can not be found.
I have installed the latest version
#23744
Posted: 02/26/2013 09:58:50
by walter Schrabmair (Basic support level)
Joined: 12/15/2012
Posts: 43

Cert.KeyMaterial.CryptoProvider is not defined.
Maybe you have an developmental version of SBB.
#23746
Posted: 02/26/2013 10:03:31
by walter Schrabmair (Basic support level)
Joined: 12/15/2012
Posts: 43

I can only read in the changes that there was a featuer added with OperationPIN, but no word in the Help file.
#23747
Posted: 02/26/2013 10:09:01
by Ken Ivanov (EldoS Corp.)

That was my bad, sorry. Please use the following property to access the cryptoprovider:

Cert.KeyMaterial.Key.CryptoProvider
#23748
Posted: 02/26/2013 10:09:09
by walter Schrabmair (Basic support level)
Joined: 12/15/2012
Posts: 43

I found what it could be:
http://eldos.com/forum/read.php?FID=7&TID=4217&MID=23306#message23306

wrong, also this line does not work. Maybe in the next version ?
#23752
Posted: 02/26/2013 10:21:26
by walter Schrabmair (Basic support level)
Joined: 12/15/2012
Posts: 43

ANd h ow can I set the OperationPIN?

Please be more detailed.
Thanks
#23753
Posted: 02/26/2013 10:24:20
by walter Schrabmair (Basic support level)
Joined: 12/15/2012
Posts: 43

I think it will be in a future version, as you said coming out in several days.
The cast is unknown.
#23754
Posted: 02/26/2013 10:30:46
by Ken Ivanov (EldoS Corp.)

The update including the property (10.0.232) had come out on 5 of February. Have you referenced the SBCryptoProvPKCS11 unit in the uses clause of your unit?
#23756
Posted: 02/26/2013 11:58:28
by walter Schrabmair (Basic support level)
Joined: 12/15/2012
Posts: 43

Yes that was the mistake. Now It compiles, but
still the DLL asks for the PIN.

I have added this line there:

Code
        // retrieving signing certificate
        CertStorage.Clear;
        PublicKeyHandler.SignatureType := pstPKCS7SHA1;
        if rbPKCS11Cert.Checked and (cmbPKCS11Certificates.ItemIndex > 0) then
        begin
          Cert := PKCS11CertStorage.Certificates[cmbPKCS11Certificates.ItemIndex - 1];
          TElPKCS11CryptoProviderOptions(Cert.KeyMaterial.Key.CryptoProvider.Options).OperationPIN := '2367';
        //  Cert.KeyMaterial.Key.CryptoProvider.Options    //.Options).OperationPIN := 2367;
          CertStorage.Add(Cert);
        end
        else if rbWindowsCert.Checked and (cmbWindowsCertificates.ItemIndex > 0) then
        begin
          Cert := WinCertStorage.Certificates[cmbWindowsCertificates.ItemIndex - 1];
          CertStorage.Add(Cert);
        end
        else
        begin
          MessageDlg('No Certificate selected', mtError, [mbOk], 0);
          Exit;
        end;

        PublicKeyHandler.CertStorage := CertStorage;
        PublicKeyHandler.CustomName := 'Adobe.PPKMS';

        // configuring timestamping properties
        if (cbTimestamp.Checked) then
        begin
          TSPClient.HttpClient := HTTPClient;
          TSPClient.URL := editTimestampServer.Text;
          TSPClient.HashAlgorithm := SB_ALGORITHM_DGST_SHA1;
          PublicKeyHandler.TSPClient := TSPClient;
        end;

        // allowing to save the document
        Success := true;
      finally
        // closing the document
        Document.Close(Success);
      end;
    finally
      // we need to ensure that a certificate(s) cleared before closing PKCS11 storage
      CertStorage.Clear;

      FreeAndNil(F);
    end;
  except
#23757
Posted: 02/26/2013 12:37:03
by walter Schrabmair (Basic support level)
Joined: 12/15/2012
Posts: 43

Sorry, but I have a strange Problem:

I have 2 PCs.

PC a) WIN 7 64bit
PC b) WIN XP 32 bit

on all the same Delphi 7 32bit and the latest SBB.

On the WIN XP there is the property: .OperationPIN and I can compile
But on the WIN 7 PC there is no property .OperationPIN.

What can I do?
Thanks
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.

Reply

Statistics

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