4
我試圖創建X509Certificate2使用下面的代碼串private_key
:找不到請求的對象。當創建X509certificate2
byte[] key = Convert.FromBase64String(private_key);
X509Certificate2 certificate = new X509Certificate2(key);
當最後一行執行後拋出以下異常:
System.Security。 Cryptography.CryptographicException找不到請求的對象
有人知道如何o解決這個問題?
我不認爲你應該用私鑰初始化X509Cert https://msdn.microsoft.com/en-us/library/ms148413(v=vs.110).aspx –
http:// paulstovell.com/blog/x509certificate2看提示5. –
這可能有所幫助:http://stackoverflow.com/questions/18462064/associate-a-private-key-with-the-x509certificate2-class-in-net –