rcgen
Rust X.509 certificate generator
0.14.9
91M downloads/mo
#854 most downloaded on crates.io
rustls/rcgen
What this package is like to depend on
Last release 13 days ago
10 Aug 2026
Release timing varies
gaps range from 8 days to 9 months
Nearly every release is documented
notes for 45 of 49 stable releases
3 versions withdrawn
withdrawn after publishing
8 years old
52 releases · first in 2019
6 releases in the last 12 months
see the full history below
Release timeline
52 releases · Jan 2019 to Aug 2026Releases
latest 52-
0.14.910 Aug 2026Release notes
Open source →Previous versions generated DER that is strictly incompatible with the spec, writing an explicit
falsevalue forIsCa::ExplicitNoCawhere this should be omitted (as it's the default).What's Changed
-
0.14.811 May 2026Release notes
Open source →What's Changed
- Fix incorrect identifier for ML-DSA signature algorithms by @DarkmatterVale in #412
- Upgrade yasna to 0.6 by @djc in #419
- Add support for is_ca in CSR Params by @5Dev24 in #420
- Add support for serializing BasicConstraints in CSR's by @5Dev24 in #422
- update key_pair to signing_key in README.md by @fakelozic in #427
- Fix encoding of directoryName constraints by @sfackler in #429
-
0.14.719 Jan 2026Release notes
Open source →What's Changed
- Implement
From<KeyPair> for PrivateKeyDer<'static>by @LebedevRI in #403 - update copyright year in LICENSE by @jasmyhigh in #407
- Add P521-SHA256 and P521-SHA384 signing algorithms by @djc in #408
- Implement
-
0.14.613 Dec 2025Release notes
Open source →What's Changed
- Use private cfg for docs.rs-like builds by @ctz in #384
- Expand rustdoc for CertificateSigningRequestParams::from_der by @dwhjames in #386
- Group imports by @iamjpotts in #381
- examples: add signing new cert using existing ca pem files by @iamjpotts in #379
- Tweak CSR parsing errors/documentation by @djc in #390
- Rename invalid CSR signature error variant by @djc in #393
- chore: fix some typos in comments by @black5box in #395
- ci: sync cargo-check-external-types nightly by @cpu in #399
- Forward selected crypto backend to x509-parser by @djc in #398
-
0.14.525 Sep 2025Release notes
Open source →Implement SigningKey for
&impl SigningKeyto makeIssuermore broadly useful.What's Changed
-
0.14.410 Sep 2025 -
0.14.321 Jul 2025 -
0.14.210 Jul 2025 -
0.14.102 Jul 2025Release notes
Open source → -
0.14.002 Jul 2025Release notes
Open source →0.14.0 contains a number of potentially breaking API changes, though hopefully the rate of API change should slow down after this. Here is a summary of the most noticeable changes you might run into:
signed_by()methods now take a reference to an&Issuertype that contains both the issuer's relevant certificate parameters and the signing key (see #356). Thefrom_ca_cert_der()andfrom_ca_cert_pem()constructors that were previously attached toCertificateParamsare now attached toIssuerinstead, removing a number of documented caveats.- The
RemoteKeyPairtrait is now calledSigningKeyand instead ofKeyPairbeing an enum that contains aRemotevariant, that variant has been removed in favor ofKeyPairimplementing the trait (see #328). To align with this change, theCertifiedKey::key_pairfield is now calledsigning_key, andCertifiedKeyis generic over the signing key type. - The
KeyPair::public_key_der()method has moved toPublicKeyData::subject_public_key_info()(see #328). - Output types like
Certificateno longer contain their originatingCertificateParams. Instead,signed_by()andself_signed()now take&self, allowing the caller to retain access to the input parameters (see #328). In order to make this possible,Certificate::key_identifier()can now be accessed viaCertificateParamsdirectly. - String types have been moved into a module (see #329).
What's Changed
- Revert impl AsRef issuer by @audunhalland in #325
- Move string types to separate module by @est31 in #329
- Unbundle params from output types by @djc in #328
- Deduplicate Issuer construction by @djc in #332
- Extract write_extensions() method, reducing rightward drift by @djc in #333
- Update 0.12-to-0.13.md by @Alirexaa in #338
- Distribute methods for parsing params elements from x509 by @djc in #336
- Eagerly derive Clone, Copy, where possible by @lvkv in #341
- Updated
.gitignoreto be more specific by @Rynibami in #342 - Eagerly implemented
Debugtrait by @Rynibami in #343 - Minor tweaks to Debug impls and other style improvements by @djc in #348
- tests: only test against openssl on Unix by @djc in #350
- Eagerly implemented
PartialEqandEqtraits by @Rynibami in #344 - Use Issuer directly in the public API by @djc in #356
- Tweak docstring for PublicKeyData::subject_public_key_info() by @djc in #358
-
0.13.315 Mar 2025 withdrawnNothing published for this version
-
0.13.220 Dec 2024Nothing published for this version
-
0.13.105 Apr 2024Release notes
Open source →Fixed:
- Fixed incorrect usage of the subject certificate's parameter's key identifier method when computing the key identifier of the issuer for the subject's authority key identifier (AKI) extension.
-
0.13.028 Mar 2024Release notes
Open source →Breaking changes:
-
The API used to create/issue key pairs, certificates, certificate signing requests (CSRs), and certificate revocation lists (CRLs) has been restructured to emphasize consistency and avoid common errors with serialization.
For each concrete type (cert, CSR, CRL) the process is now the same:
- generate or load a key pair and any information about issuers required.
- create parameters, customizing as appropriate.
- call a generation
fnon the parameters, providing subject key pair and issuer information and as appropriate. - call serialization
fns on the finalized type, obtaining DER or PEM.
For more information, see [rcgen/docs/0.12-to-0.13.md].
-
Throughout the API DER inputs are now represented using types from the Rustls
rustls-pki-typescrate, e.g.PrivateKeyDer,CertificateDer,CertificateSigningRequestDer. Contributed by Tudyx. -
String types used in
SanTypeandDnValueenums for non-UTF8 string types have been replaced with more specific types that prevent representation of illegal values. E.g.Ia5String,BmpString,PrintableString,TeletexString, andUniversalString. Contributed by Tudyx. -
Method names starting with
get_have been renamed to match Rust convention:CertificateRevocationList::get_params()->params()Certificate::get_params()->params()Certificate::get_key_identifier()->Certificate::key_identifier()Certificate::get_times()->Certificate::times()
Added:
-
RSA key generation support has been added. This support requires using the
aws-lc-rsfeature. By default usingKeyPair::generate_for()with an RSASignatureAlgorithmwill generate an RSA 2048 keypair. SeeKeyPair::generate_rsa_for()for support for RSA 2048, 3072 and 4096 key sizes. -
Support for ECDSA P521 signatures and key generation has been added when using the
aws-lc-rsfeature. Contributed by Alvenix. -
Support for loading private keys that may be PKCS8, PKCS1, or SEC1 has been added when using the
aws-lc-rsfeature. Without this feature private keys must be PKCS8. SeeKeyPair::from_pem_and_sign_algo()andKeyPair::from_der_and_sign_algo()for more information. Contributed by Alvenix. -
Support has been added for Subject Alternative Name (SAN) names of type
OtherName. Contributed by Tudyx. -
Support has been added for specifying custom "other" OIDs in extended key usage. Contributed by Tudyx.
-
Support has been added for building rcgen without cryptography by omitting the new (default-enabled)
cryptofeature flag. Contributed by corrideat. -
Support for using
aws-lc-rsinfipsmode can now be activated by using thefipsfeature in combination with theaws-lc-rsfeature. Contributed by BiagioFesta. -
A small command-line tool for certificate generation (
rustls-cert-gen) was added. Contributed by tbro.
-
-
0.12.126 Jan 2024Release notes
Open source →- RFC 5280 specifies that a serial number must not be larger than 20 octets in length. Prior to this release an unintended interaction between rcgen and its underlying DER encoding library could result in 21 octet serials. This has now been fixed.
- A regression that caused build errors when the optional
pemfeature was omitted has been fixed.
-
0.12.016 Dec 2023Release notes
Open source →- Rename
RcgenErrortoError. Contributed by thomaseizinger. - The public interface of
Errorhas been made not expose external library types:Error::PemErrornow holds aStringvalue, and theErrortype doesn't supportFrom<_>based conversion any more. This allows rcgen to update dependencies without impacting downstream users. - Upgrade to
ringv0.17. Contributed by thomaseizinger. - Make dependency on
ringoptional and allow usage ofaws-lc-rsvia a cargo feature. Ring remains the default. Contributed by BiagioFesta. - Add
Ia5Stringsupport forDistinguishedNames. - Add a
KeyIdMethod::PreSpecifiedvariant to set, and not generate the SKI.CertificateParams::from_ca_cert_pemnow uses it when building params from an existing CA certificate. Contributed by Brocar.
- Rename
-
0.11.330 Sep 2023 -
0.11.221 Sep 2023Release notes
Open source →rcgenhas joined the umbrella of the rustls organization.- Support for retrieving signature algorithm from
KeyPairs. Contributed by tindzk. - Fix for writing certificate signing requests (CSRs) with custom extensions from parameters without subject alternative names.
- Support for certificate CRL distribution points extension.
- Corrected OID for
ExtendedKeyUsagePurpose::Any. Contributed by jgallagher. - Support for creating certificate revocation lists (CRLs).
-
0.11.117 Jun 2023 -
0.11.015 Jun 2023Release notes
Open source →- Parse IP-address subject alternative names. Contributed by iamjpotts.
- Emit platform-apropriate line endings. Contributed by frjonsen.
- Support larger serial numbers. Contributed by andrenth.
- Parse more certificate parameters. Contributed by andrenth.
- Output
SanType::IpAddresswhen callingCertificateParams::neworgenerate_simple_self_signed. Contributed by rukai. - Update pem to 2.0. Contributed by koushiro.
-
0.10.029 Sep 2022Release notes
Open source →- Update x509-parser to 0.14.
- Increase minimum supported Rust version to 1.58.1.
- Update edition to 2021.
- Change
IsCaenum to haveNoCaandExplicitNoCaandCa(...). Contributed by doraneko94.
-
0.9.428 Sep 2022 withdrawn -
0.9.316 Jul 2022 -
0.9.221 Feb 2022 -
0.9.109 Feb 2022 -
0.9.002 Feb 2022 -
0.8.1414 Oct 2021 -
0.8.1323 Aug 2021 -
0.8.1222 Aug 2021 withdrawnRelease notes
Open source →- Use public key as default serial number. Contributed by jpastuszek.
- Add support for
PKCS_RSA_SHA512andPKCS_RSA_SHA384signature algorithms. - Add support for the keyUsage extension. Contributed by jaredwolff.
- Ability to use remote keys. Contributed by daxpedda.
-
0.8.1128 Apr 2021Release notes
Open source →- Add getters for the criticality, content, and
oid_componentsof aCustomExtension - Update yasna to 0.4
- Add getters for the criticality, content, and
-
0.8.1015 Apr 2021Release notes
Open source →- Implement some additional traits for some of the types. Contributed by zurborg.
- Adoption of intra-doc-links
- Addition of the ability to zero key pairs. Contributed by didier-wenzek.
-
0.8.904 Dec 2020Release notes
Open source →- Switch CI to Github Actions.
- Strip nanos from
DateTimeas well. Contributed by @trevor-crypto.
-
0.8.701 Dec 2020Release notes
Open source →- Turn
botanback into a dev-dependency. Contributed by @nthuemmel. - Fix signing when CA uses different signing algorithm . Contributed by @nthuemmel.
- Turn
-
0.8.601 Dec 2020 -
0.8.529 Jun 2020Release notes
Open source →- Add some more
DnTypes:OrganizationalUnitName,LocalityName,StateOrProvinceName - Add
removefunction toDistinguishedName - Add ability to specify
NameConstraints
- Add some more
-
0.8.405 Jun 2020Release notes
Open source →- Improve spec compliance in the
notBefore/notAfterfields generated by usingUTCTimeif needed
- Improve spec compliance in the
-
0.8.324 May 2020Release notes
Open source →- Fix regression of
0.8.1that generated standards non compliant CSRs and broke Go toolchain parsers. Contributed by @thomastaylor312.
- Fix regression of
-
0.8.217 May 2020Release notes
Open source →- Disable
chronodefault features to get rid of time crate - Improve
openssltests to do a full handshake with the generated cert
- Disable
-
0.8.102 Apr 2020Release notes
Open source →- Fix non-standard-compliant SubjectKeyIdentifier X.509v3 extension format
- BasicConstraints X.509v3 extension is now marked as critical
- Use RFC 7093 to calculate calculate subject key identifiers
- Add option to insert AuthorityKeyIdentifier X.509v3 extension into non-self-signed certificates
- Update to x509-parser 0.7
-
0.8.012 Mar 2020Release notes
Open source →- Update to pem 0.7
- Correct number of nanoseconds per second. Contributed by @samlich.
- Adoption of the
non_exhaustivefeature in the API
-
0.7.014 Sep 2019Release notes
Open source →- Bugfix release for ip address subject alternative names. Turns out they aren't CIDR subnets after all :)
-
0.6.012 Sep 2019Release notes
Open source →- Support for email and cidr subnet (ip address) subject alternative names
- Support for the extended key usage extension
-
0.5.119 Aug 2019 -
0.5.019 Jul 2019Release notes
Open source →- Update to ring 0.16 and webpki 0.21
- Update to x509-parser 0.5
- Expose an API to get the raw public key of a key pair
-
0.4.128 Jun 2019 -
0.4.018 Jun 2019Release notes
Open source →- Support for user supplied keypairs. Contributed by @fzgregor.
- Support for signing with user supplied CA certificates. Contributed by @fzgregor.
- Correct a bug with distinguished name serialization (PR link). Contributed by @fzgregor.
- Addition of limited (no key generation) RSA support
- Proper error handling with
Resultand our own Error type - Improvements of the testsuite
-
0.3.106 Jun 2019Release notes
Open source →- Ability to disable the dependency on the
pemcrate - Support for creating CSRs (Certificate Signing Requests). Contributed by @djc.
- Ability to specify custom extensions for certificates
- Ability to craft
acmeIdentifierextensions - Update yasna to 0.3.0
- Ability to disable the dependency on the
-
0.3.017 May 2019 -
0.2.126 Apr 2019 -
0.2.010 Jan 2019Nothing published for this version
-
0.1.006 Jan 2019Nothing published for this version
-
0.0.203 Jan 2019Nothing published for this version