| Crates.io | certificate_manager |
| lib.rs | certificate_manager |
| version | 0.2.2 |
| created_at | 2025-01-27 23:35:22.368096+00 |
| updated_at | 2025-02-12 11:52:24.160215+00 |
| description | A library for managing and spoofing X.509 certificates |
| homepage | https://github.com/SentineLLM-1/certificate_manager |
| repository | https://github.com/SentineLLM-1/certificate_manager |
| max_upload_size | |
| id | 1533063 |
| size | 100,856 |
==========================
A Rust library for loading Certificate Authorities (CAs) from PEM formatted files.
This library provides a simple and secure way to load Certificate Authorities from PEM files. It supports loading CAs with encrypted private keys, using a provided passphrase.
CertificateAuthority struct containing the loaded certificate and private keyTo use this library, add the following dependency to your Cargo.toml file:
[dependencies]
certificate_manager = "0.1.0"
Then, use the load_from_pem_files function to load a CA from PEM files:
use certificate_manager::certificate::CertificateAuthority;
let cert_file = "path/to/ca_cert.pem";
let key_file = "path/to/ca_key.pem";
let passphrase = Some("my_secret_passphrase".to_string());
let ca = CertificateAuthority::load_from_pem_files(cert_file, key_file, passphrase)
.expect("Failed to load CA");
The load_from_pem_files function is documented with detailed information on its arguments, return values, and error handling.
Contributions are welcome! If you'd like to contribute to this project, please fork the repository and submit a pull request.
This library is licensed under the MIT License. See the LICENSE file for details.