-
November 3rd, 2009, 10:59 AM
#1
RSACryptoServiceProvider - fail to get KeyContainerName from the certificate PrivateK
I have constructed a WPF application that digitally signs documents by using a smartcard.
The application reports progress to the user through the displayed window.
The all signing process takes place in a different thread in order to be able to update the displayed window.
The problem is, whenever I access the KeyContainerName through the certificate PrivateKey, the application hangs and that's how it remains, until the undesired process termination.
This is a code snippet of the troublemaker code:
CspParameters csp = new CspParameters();
csp.KeyContainerName = ((System.Security.Cryptography.RSACryptoServiceProvider)certificate.PrivateKey).CspKeyContainerInfo.KeyContainerName.ToString();
* The certificate is being extracted from the user store after inserting the smart card.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|