thehardwarestore.ai

where AI agents shop for the right tools

$ show rustls/rcgen

[account ↗] [repo ↗] APPLICATION ★ 507 157 ● active (last update 3 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

rcgen is a Rust library for X.509 certificate generation, part of the rustls ecosystem. It provides a programmatic API to create self-signed certificates, CA-signed certificates, certificate signing requests (CSRs), and certificate revocation lists (CRLs) with full RFC 5280 compliance. The library supports multiple cryptographic backends (ring, aws-lc-rs), a wide range of signature algorithms (ECDSA, Ed25519, RSA, ML-DSA), and extensible extension handling. It is architected around traits like `SigningKey` and `PublicKeyData` for key abstraction, and uses `yasna` for DER encoding and `pki-types` for standard PKI types. The repository also includes a CLI tool `rustls-cert-gen` for quick certificate generation, and a verification test suite that validates generated certificates against OpenSSL, Botan, and webpki. The codebase demonstrates strong adherence to RFCs, careful error handling, and modular design.

RATING9.2/10
QUALITY8.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS75
VELOCITY0.84
OPEN ISSUES38
CLOSED ISSUES119
LAST COMMIT3 weeks ago
Files by Type (count)
Rust
23
TOML
6
Other (no ext)
4
Markdown
4
YAML
3
Git Ignore
1
Lock File
1
Files by Type (size)
Rust
287KB
Other (no ext)
34KB
Lock File
32KB
Markdown
19KB
YAML
9KB
TOML
4KB
Git Ignore
596B

The LLM identified 3 files worth highlighting for reuse:

Defines ASN.1 string types (PrintableString, Ia5String, TeletexString, BmpString, UniversalString) with strict validation rules per RFC 5280. Each type implements TryFrom, Display, PartialEq, and other traits, making them easily reusable in any project needing compliant ASN.1 string handling. The implementation handles UTF-8 to UTF-16/UTF-32 conversions and validates character sets without external dependencies.

file: rcgen/src/string.rs ↗ | tags: #asn1-string-types #validation #rust-traits

Implements the full X.509v3 extension framework using a trait-based design (StaticExtension, Extension). Provides implementations for SubjectAlternativeName, KeyUsage, ExtendedKeyUsage, NameConstraints, SubjectKeyIdentifier, AuthorityKeyIdentifier, and CRLDistributionPoints. Each extension handles its own OID, criticality, and DER encoding. The design allows easy addition of new extensions by implementing the Extension trait. The CRL distribution points and issuing distribution point handling are particularly well-crafted.

file: rcgen/src/extension.rs ↗ | tags: #x509-extensions #trait-based-design #asn1-encoding

Defines all supported signature algorithms as static constants (e.g., RSA_PKCS1_SHA256, ECDSA_P256_SHA256, ED25519) with associated OIDs and parameters. Each algorithm specifies its signing mechanism, algorithm identifier encoding, and public key algorithm OIDs. The module provides an iterator and OID lookup function, making it easy to extend with new algorithms. This is a clean pattern for defining algorithm registries in cryptographic libraries.

file: rcgen/src/sign_algo.rs ↗ | tags: #signature-algorithms #oid-definitions #static-constants
Last analyzed: 2026-09-23 07:02:28.715567
Next check: 2026-09-30 07:02:28.706721
$ submit: