I was following Verify the Digital Signatures of XML Documents tutorial and got into trouble.
Now my smart card contains three additional key value pairs that are redundant a开发者_Go百科nd I have to remove them.
MSDN tutorial How to: Store Asymmetric Keys in a Key Container contains an explanation of how to remove the key from the container, but does not explain how to remove the existing keys.
When I re-start program that contains the following piece of code:
// Create a new CspParameters object to specify
// a key container.
CspParameters cspParams = new CspParameters(1, "ActivClient Cryptographic Service Provider");
cspParams.Flags = CspProviderFlags.UseDefaultKeyContainer;
// Create a new RSA signing key and save it in the container.
RSACryptoServiceProvider rsaKey = new RSACryptoServiceProvider(cspParams);
rsaKey.PersistKeyInCsp = false;
Then the program will respond with the following error: The security token does not have storage space available for an additional container.
I am new to this (smart cards), so I'm totally lost. Please help.
that's because you have reached the limit of key containers that the card could host. This amount of maximal key containers can be obtained by querying the card minidriver (if present).
精彩评论