An aborted process that reads from a smartcard causes a 2nd reader process to hang

Hi all,     I’m currently working on the following issue on Windows Vista SP2 and Windows 7 RTM which doesn’t happen on Windows XP SP3: if a process that reads from a smart card is aborted unexpectedly after a call to SCardBeginTransaction without calling SCardEndTransaction, other instances of the same application or any other application using…

0

More on .NET CMS classes and SHA-2 algorithms

Hi all,   We don’t officially support the .NET CMS classes with SHA-2 algorithms. This won’t work on Vista and later with third-party CSPs, for instance: “An internal error ocurred” when using SHA-2 algorithms with SignedCMS “Invalid provider type specified” when using CNG providers with .NET CMS classes   But it will work on Vista…

0

How to call CryptMsg API in streaming mode – LargeCMS full sample

Hi all Some time ago I posted a sample which shows how to sign large CMS data by calling CryptMsg API directly (How to call CryptMsg API in streaming mode (C#)) and that way overcome the current limitations of SignedCms in .NET (“ASN1 value too large” error when calling SignedCms.ComputeSignature). I continued working on the…

4

Big delay while calling EnvelopedCms constructor

Hi all,   You may experience a big delay when calling EnvelopedCms constructor in your .NET application if you have networking problems. For example, if DNS server is not available, a call to the constructor may take 30 to 90 seconds!!!   I could repro the issue by running the following code: DateTime before =…

2

How to enumerate all certificates on a smart card (PowerShell)

Hi all,   Some time ago I assisted my colleague Jeff Bowles with the development of a PowerShell script which enumerates all certificates on a smart card. Basically the replacement to CAPICOM.Store.Open CAPICOM_SMART_CARD_USER_STORE. He developed a sample that returns a System.Security.Cryptography.X509Certificates.X509Store object with the certificates in the card. The sample tries to emulate what logonUI.exe does during smart…

4