I need users of my applications to sign their approvals using their personal USB security token.
I managed to sign the data, but I could not get information about which token was used for this.
Here is the code that I still have:
CspParameters csp = new CspParameters(1, "SafeNet RSA CSP"); csp.Flags = CspProviderFlags.UseDefaultKeyContainer; RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(csp); // Create some data to sign. byte[] data = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7 }; Console.WriteLine("Data : " + BitConverter.ToString(data)); // Sign the data using the Smart Card CryptoGraphic Provider. byte[] sig = rsa.SignData(data, "SHA1"); Console.WriteLine("Signature : " + BitConverter.ToString(sig));
There is a field in the token information called the "Token Name". How can I access this field to confirm that the token was used to sign the approval?

Additional information and update:
- "Token Name" always matches the name of the owner (the user who owns the USB token)
- It seems that this is not possible, perhaps there is a web service or I need to call to get information directly from the certification body.
source share