EldoS | Feel safer!

Software components for data protection, secure storage and transfer

How to read from the smart card chain

Posted: 07/20/2011 05:52:54
by Erdem Uysal (Basic support level)
Joined: 07/20/2011
Posts: 1

                SBPKCS11CertStorage.TElPKCS11CertStorage a = new SBPKCS11CertStorage.TElPKCS11CertStorage();
                if (System.Environment.Is64BitOperatingSystem)
                { a.DLLName = @"C:\Windows\SysWOW64\siecap11.dll"; }
                else { a.DLLName = @"C:\Windows\System32\siecap11.dll"; }
                var t = a.OpenSession(0, true);
                string Pass = frmRequestPassword.RequestPassword();
                t.Login(1, Pass);
                var cert = a.get_Certificates(0);

if (MessageBox.Show("Do you wish to add the complete or partial certificate chain?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
Chain = new TElMemoryCertStorage();
TElX509Certificate Cert = LoadCert();
while (Cert != null)
Chain.Add(Cert, false);
Cert = LoadCert();

return cert;

I don't know is bold field :S

I get an error "Certificate chain is not complete" as a result of the program
Posted: 07/20/2011 07:15:16
by Vsevolod Ievgiienko (Team)

Thank you for contacting us.

We have samples that illustrate how to read certificates from smart cards. You can find them in:

- \EldoS\SecureBlackbox\Samples\Delphi\PKIBlackbox\PKCS11 folder for Delphi
- \EldoS\SecureBlackbox.NET\Samples\C#(VB.NET)\PKIBlackbox\CertTokenDemo folder for .NET

Regard "Certificate chain is not complete" error I don't see a code that can cause this error. How do you use your Chain after loading?



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