语言

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

要打开的键的名称。

返回

打开的键。

特性

例外

engineName 或 keyId 为 null.

engineName 或 keyId 为空字符串。

无法通过指定的 ENGINE 打开密钥。

注解

如果 OpenSSL 无法成功加载命名 ENGINE项,或者命名 ENGINE 项无法加载命名密钥,则此操作将失败。

ENGINE并非所有都支持加载私钥。

其 keyId 语法由每个单独 ENGINE决定。

适用于