1

I do have a smartcard from thales/gemalto which I can access via their SafeNet software. enter image description here

I'm using Pkcs11Interop for accessing the smartcard via c#. I am able to read the basic information and also can login using the pin via c#.

I now need to create an instance of Pkcs11UriBuilder. There is also an example for this on the Pkcs11Interop website

// ...or it can be easily constructed with Pkcs11UriBuilder
Pkcs11UriBuilder pkcs11UriBuilder = new Pkcs11UriBuilder();
pkcs11UriBuilder.Serial = "123456";
pkcs11UriBuilder.Type = CKO.CKO_PRIVATE_KEY;
pkcs11UriBuilder.Object = "TestApp";
pkcs11UriBuilder.ModulePath = @"C:\Windows\SysWOW64\eTPKCS11.dll";
pkcs11UriBuilder.PinValue = "MyPin";

The following values are dependent of the smartcard:

  • Serial
  • Object

The serial I can get via the following code:

ITokenInfo tokenInfo = slot.GetTokenInfo();
var serial = tokenInfo.SerialNumber;

Question: What value must be provided to "Object" and how do I read the possible/available Object value from the SmartCard using Pkcs11Interop?

Maytham Fahmi
  • 31,138
  • 14
  • 118
  • 137
Manuel
  • 1,985
  • 3
  • 31
  • 51

0 Answers0