Share via


SafeEvpPKeyHandle.OpenPrivateKeyFromEngine(String, String) 方法

定義

使用名為 OpenSSL ENGINE 的 來開啟具名私密金鑰。

public:
 static System::Security::Cryptography::SafeEvpPKeyHandle ^ OpenPrivateKeyFromEngine(System::String ^ engineName, System::String ^ keyId);
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("windows")]
public static System.Security.Cryptography.SafeEvpPKeyHandle OpenPrivateKeyFromEngine (string engineName, string keyId);
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>]
static member OpenPrivateKeyFromEngine : string * string -> System.Security.Cryptography.SafeEvpPKeyHandle
Public Shared Function OpenPrivateKeyFromEngine (engineName As String, keyId As String) As SafeEvpPKeyHandle

參數

engineName
String

要處理私密金鑰開啟要求的 名稱 ENGINE

keyId
String

要開啟的金鑰名稱。

傳回

已開啟的金鑰。

屬性

例外狀況

engineNamekeyIdnull

engineNamekeyId 是空字串。

無法透過指定的 ENGINE 開啟金鑰。

備註

如果 OpenSSL 無法成功載入具名的 ,或如果具名 ENGINE 無法載入具名 ENGINE 索引鍵,這項作業將會失敗。

ENGINE並非所有都支援載入私密金鑰。

的語法 keyId 是由每個個別 ENGINE 的 所決定。

適用於