I am using the pkcs11interop to create the session for a token
and force the “Digital Signature PIN logon” popup to appear for user.
but wrong popup shows “Token logon”:
wrong popup token logon
but this should be shown:
desired pin poup
so is there any way to show the right PIN logon popup?
the used code is:
string exePath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
string pkcs11LibraryPath = System.IO.Path.Combine(exePath, @”eTPKCS11.dll”);//I can access also IDPrimePKCS11.dll
Pkcs11InteropFactories factories = new Pkcs11InteropFactories();
try
{
using (IPkcs11Library pkcs11Library = factories.Pkcs11LibraryFactory.LoadPkcs11Library(factories, pkcs11LibraryPath, AppType.MultiThreaded))
{
ILibraryInfo libraryInfo = pkcs11Library.GetInfo();
// Get list of all available slots
foreach (ISlot slot in pkcs11Library.GetSlotList(SlotsType.WithOrWithoutTokenPresent))
{
ISlotInfo slotInfo = slot.GetSlotInfo();
if (slotInfo.SlotFlags.TokenPresent)
{
ITokenInfo tokenInfo = slot.GetTokenInfo();
using (ISession session = slot.OpenSession(SessionType.ReadWrite))
{
// Attempt to login to the session
// Pass null or empty string to trigger the PIN dialog
session.Login(CKU.CKU_USER, (string)null);
//PDF SIGNING HERE
DoSigningAndUpload();
}
}
}
}
}
Thanks in advance
vendor dll-s which check for used slots eTPKCS11.dll ,IDPrimePKCS11.dll and eventualy can show the right popup
Csaba Farkas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.