PIN dialog box does not appear

  • Thread starter Thread starter Nam Thanh Vu
  • Start date Start date
N

Nam Thanh Vu

Guest
Dear all

I develop some application which sign XML

everything OK but when I use certificate in usb token, PIN dialog appeared only once. After that, user does not required input PIN (I have closed application, remove usb token)

I want that user have to input PIN each time to sign.

...

X509Certificate2 card;

X509Certificate2Collection chooseCert = X509Certificate2UI.SelectFromCollection(numberCerts,
"Certificates List ", "Choose your certificate", X509SelectionFlag.SingleSelection);

card = chooseCert[0];

System.Security.Cryptography.RSACryptoServiceProvider rsa;

rsa = card.PrivateKey as RSACryptoServiceProvider;

aSignature = rsa.SignData(sh, System.Security.Cryptography.CryptoConfig.MapNameToOID("SHA1"));

...


thanks a lot

Continue reading...
 
Back
Top