6 releases

0.3.0 Oct 10, 2023
0.2.3 Oct 4, 2023
0.2.1 Sep 26, 2023
0.1.0 Sep 22, 2023

#1966 in Parser implementations

Download history 4/week @ 2024-02-19 4/week @ 2024-02-26 5/week @ 2024-03-11 106/week @ 2024-04-01

111 downloads per month

MIT/Apache

17KB
326 lines

easy-rsa registry

Getting started

cargo add easy-rsa-registry

Functions

Read certs from registry file

let registry_file_path = Path::new("index.txt");
let registry_file_path = format!("{}", registry_file_path.display());
let certs = read_certs_from_file(&registry_file_path)?;

Update cert status

let registry_file_path = Path::new("index.txt");
let registry_file_path = format!("{}", registry_file_path.display());
let cert_serial: &str = "36593F7437AEB5007D2953E7A98B7601";
let certs = update_cert_status(&registry_file_path, &cert_serial, EasyRsaCertificateStatus::Revoked)?;

Remove certificate by serial

let registry_file_path = Path::new("index.txt");
let registry_file_path = format!("{}", registry_file_path.display());
let cert_serial: &str = "36593F7437AEB5007D2953E7A98B7601";
let certs = remove_cert(&registry_file_path, &cert_serial)?;

Dependencies

~1.3–2MB
~38K SLoC