Edit

Share via


SafeEvpPKeyHandle.OpenPrivateKeyFromEngine(String, String) Method

Definition

Open a named private key using a named 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

Parameters

engineName
String

The name of the ENGINE to process the private key open request.

keyId
String

The name of the key to open.

Returns

The opened key.

Attributes

Exceptions

engineName or keyId is null.

engineName or keyId is the empty string.

the key could not be opened via the specified ENGINE.

Remarks

This operation will fail if OpenSSL cannot successfully load the named ENGINE, or if the named ENGINE cannot load the named key.

Not all ENGINEs support loading private keys.

The syntax for keyId is determined by each individual ENGINE.

Applies to