Acmex v0.1.2 Acmex.OpenSSL View Source
This module provides functions to generate a Private Key and Certificate Signing Request.
Link to this section Summary
Link to this section Types
Link to this section Functions
Generates a Certificate Signing Request.
Parameters
- key_path: Private key path.
- domains: List of domains.
- subject: Subject attributes.
Examples
iex> subject = %{organization_name: "Example"}
iex> Acmex.OpenSSL.generate_csr("-----BEGIN RSA PRIVATE KEY-----...", ["example.com"], subject)
{:ok, <<48, 130, 2, 91, 48, 1, ...>>}
Link to this function
generate_key(atom, size \\ 2048)
View Sourcegenerate_key(:rsa, rsa_key_sizes()) :: String.t()
Generates a RSA private key.
Parameters
- type: Private key type.
- size: Private key size.
Examples
iex> Acmex.OpenSSL.generate_key(:rsa, 2048)
"-----BEGIN RSA PRIVATE KEY-----..."