Expand description
Rust X.509 certificate generation utility
This crate provides a way to generate self signed X.509 certificates.
The most simple way of using this crate is by calling the
generate_simple_self_signed
function.
For more customization abilities, we provide the lower level
Certificate::from_params
function.
Example
extern crate rcgen;
use rcgen::generate_simple_self_signed;
// Generate a certificate that's valid for "localhost" and "hello.world.example"
let subject_alt_names = vec!["hello.world.example".to_string(),
"localhost".to_string()];
let cert = generate_simple_self_signed(subject_alt_names);
println!("{}", cert.serialize_pem());
println!("{}", cert.serialize_private_key_pem());
Structs
A self signed certificate together with signing keys
Parameters used for certificate generation
Distinguished name used e.g. for the issuer and subject fields of a certificate
Enums
The attribute type of a distinguished name entry
Constants
Signature algorithm ID as per RFC 5758
Functions
Helper to obtain a DateTime from year, month, day values
KISS function to generate a self signed certificate