Verify Private Key Protection before signing with RSACryptoServiceProvider
问题 When signing data with RSACryptoServiceProvider in C#, I have a requirement to ensure the certificate was imported with strong key protection and a high security level to require the user enters the password every time they sign with the key. Here's a quick simplified sample of the signing code: X509Store myCurrentUserStore = new X509Store(StoreName.My, StoreLocation.CurrentUser); myCurrentUserStore.Open(OpenFlags.MaxAllowed); X509Certificate2 currentCertificate = myCurrentUserStore