InfiniTec - Henning Krauses Blog

Don't adjust your mind - it's reality that is malfunctioning

Troubleshooting Smartcard error “The requested keycontainer could not be found” or “The Local Security Authority Cannot Be Contacted”

Posted under Smartcards | Comments (0)

If you use a Smartcard for cryptographic operations and get one of the errors above, the error might be in the configuration of your Smartcard Cryptographic service provider configuration. In my case I had a NetKey 3.0 card and got the error “The requested keycontainer could not be found” when accessing the private key. The error “The Local Security Authority Cannot Be Contacted” was thrown when I tried to use a certificate from the smartcard to establish a mutual authenticated SSL connection to a server.

The cause for this error was that the key length of the certificate on the smartcard was 2048 bits, but the Smartcard provider had a length of 1024 bits configured in the registry.

To fix the problem, I had to follow these steps:

  1. Open Regedit and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\T-Systems\CardMiniDriverTCOS3\Applications\NKS V3.0\Key1.
  2. Set the value of the field KeySize to 2048 (if the key on your card has indeed a length of 2048 bits)
  3. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\T-Systems\CardMiniDriverTCOS3\Applications\NKS V3.0\Key2
  4. Set the value of the field KeySize to 2048.
  5. Close Regedit.
  6. Open the Card Management tool, select the smartcard and navigate to the node Smartcard Base CSP
  7. In the context menu of that node click Remove Base CSP application from the card…
    Delete
  8. Confirm the operation by entering the pin and click “Remove Base CSP application!” (seriously – who puts exclamation points on button labels?)
    image
  9. After the operation completes, close the Card management tool.
  10. Remove the smartcard from the reader and insert it again.
  11. Open the Card management tool again. This will re-initialize the card.

That’s it.


Posted by Henning Krause on Tuesday, November 16, 2010 9:04 AM, last modified on Tuesday, November 16, 2010 9:04 AM
Permalink | Post RSSRSS comment feed