CertificateManager.ExportPemFromJwkJson method (1 of 2)

Creates a self-signed certificate from the given RSA JWK JSON and exports it as a PEM certificate (optionally including the private key) to the specified path.

public static void ExportPemFromJwkJson(string jwkJson, string filePath, 
    ReadOnlySpan<char> password = default, bool includePrivateKey = false)
parameter description
jwkJson The RSA JWK JSON string.
filePath Target file path. If no extension is provided, “.pem” will be added.
password Optional password used to encrypt the private key when includePrivateKey is true. Ignored when includePrivateKey is false.
includePrivateKey If true, the PEM export will include the private key (and create a .key file as per Export logic).

See Also


CertificateManager.ExportPemFromJwkJson method (2 of 2)

Creates a self-signed certificate from the given RSA JWK JSON and exports it as a PEM certificate (optionally including the private key) to the specified path, using a SecureString password.

public static void ExportPemFromJwkJson(string jwkJson, string filePath, SecureString password, 
    bool includePrivateKey = false)
parameter description
jwkJson The RSA JWK JSON string.
filePath Target file path for the PEM output.
password SecureString password used to encrypt the private key when includePrivateKey is true.
includePrivateKey If true, the PEM export will include the private key.

See Also