x509-certificate
X.509 certificate parser and utility functionality
0.25.0
22M downloads/mo
#1969 most downloaded on crates.io
indygreg/cryptography-rs
What this package is like to depend on
Last release 1 years ago
17 Aug 2025
Release timing varies
gaps range from 1 weeks to 12 months
Most releases are documented
notes for 23 of 27 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
27 releases · first in 2021
0 releases in the last 12 months
see the full history below
Release timeline
27 releases · Apr 2021 to Aug 2025Releases
latest 27-
0.25.017 Aug 2025Release notes
Open source →Released on 2025-08-17.
- MSRV 1.75 -> 1.85.
- Rust edition 2021 -> 2024.
thiserror1.0 -> 2.0.
-
0.24.002 Nov 2024Release notes
Open source →Released on 2024-11-02.
- MSRV 1.65 -> 1.75.
bytes1.5 -> 1.8.signature2.1 -> 2.2.zeroize1.6 -> 1.8.
-
0.23.116 Nov 2023Release notes
Open source →Released on 2023-11-16.
X509Certificatenow has atbs_certificate()to retrieve a reference to the raw, main certificate data structure.- There are now
From<T>implementations forasn1time::Time,asn1time::GeneralizedTime, andasn1time::UtcTimethat allow conversion tochrono::DateTime<chrono::Utc>. X509Certificatenow hasvalidity_not_before()andvalidity_not_after()methods to obtain achrono::DateTime<chrono::Utc>corresponding to the certificate's validity start and end times.X509Certificatenow has atime_constraints_valid()to check whether the time is between the validity constraints expressed in the certificate.
-
0.23.007 Nov 2023Release notes
Open source →Released on 2023-11-07.
InMemorySigningKeyPairnow stores the private key as aZeroize<Vec<u8>>instead of aVec<u8>.InMemorySigningKeyPairvariants are now structs instead of unnamed tuples.InMemorySigningKeyPairno longer implementsFrom<ring::signature::Ed25519KeyPair>.InMemorySigningKeyPairnow has ato_pkcs8_one_asymmetric_key_der()method to obtain this PKCS#8 DER representation of the key pair.X509CertificateBuilder::create_with_random_keypair()no longer returns aring::pkcs8::Document. (The PKCS#8 representation can now be obtained from the returnedInMemorySigningKeyPair.)InMemorySigningKeyPair::generate_random()no longer returns aring::pkcs8::Document. (The PKCS#8 representation can now be obtained from the returnedInMemorySigningKeyPair.)X509CertificateBuilder::new()no longer accepts aKeyAlgorithmargument.X509CertificateBuildernow implementsDefault.new()is deprecated in favor ofdefault().X509CertificateBuilder::create_with_random_keypair()now requires aKeyAlgorithmargument.X509CertificateBuilderhas gained acreate_with_key_pair()method that allows creating a certificate with a caller specified key pair.Sign::private_key_data()now returns aZeroizing<Vec<u8>>instead of aVec<u8>.Sign::rsa_primes()now returnsZeroizing<Vec<u8>>instead ofVec<u8>.
-
0.22.105 Nov 2023Release notes
Open source →Released on 2023-11-05.
asn1time::UtcTimenow implementsFrom<chrono::DateTime<chrono::Utc>>to facilitate constructing instances from arbitrary times.
-
0.22.003 Nov 2023Release notes
Open source →Released on 2023-11-03.
rfc5958::OneAsymmetricKey(PKCS#8) decoding now correctly handles the public key field. Before, it decoded the public key field as a constructed value when it should have been a regular tagged value. This bug was masked by a bug in ring <0.17, which generated PKCS#8 documents incorrectly. The new decoder only recognizes valid encoded PKCS#8 documents. Please open an issue if you would like support for decoding the invalid format restored.pem2.0 -> 3.0.ring0.16 -> 0.17.
-
0.21.024 Jul 2023Release notes
Open source →Released on 2023-07-24.
GeneralizedTimeimplementsFrom<chrono::DateTime<chrono::Utc>>(#13).
-
0.20.003 Jun 2023Release notes
Open source →Released on 2023-06-03.
- pem upgraded 1.1 -> 2.0.
SignatureAlgorithmgained aNoSignaturevariant to express a a digest without a signature. (#11)chronocompiled without default features (#12).
-
0.19.019 Mar 2023Release notes
Open source →Released on 2023-03-19.
Timenow has atake_opt_from().rfc5280::Versionnow has atake_opt_from().rfc5280::CertificateListnow has atake_opt_from().rfc5280::TbsCertListnow implementstake_from().- der upgraded 0.6 -> 0.7.
- spki upgrades 0.6 -> 0.7.
- bytes upgraded 1.3 -> 1.4.
- Minimum Rust version 1.61 -> 1.65.
-
0.18.021 Jan 2023 -
0.17.030 Dec 2022Release notes
Open source →Released on 2022-12-30.
- pem upgraded 1.0 -> 1.1.
- signature upgraded 1.3 -> 1.6.
-
0.16.019 Dec 2022Release notes
Open source →Released on 2022-12-19.
- Canonical home of project moved to https://github.com/indygreg/cryptography-rs.
- chrono crate upgraded from 0.4.22 to 0.4.23.
- Cargo.toml now defines patch versions of all dependencies.
-
0.15.017 Sep 2022Release notes
Open source →(Released 2022-09-17)
- der crate upgraded from 0.5 to 0.6.
- spki crate upgraded from 0.5 to 0.6.
-
0.14.007 Aug 2022Release notes
Open source →(Released 2022-08-07)
- bcder crate upgraded from 0.6.1 to 0.7.0. This entailed a lot of changes, mainly to error handling.
-
0.13.025 Apr 2022Release notes
Open source →X509Certificatenow implements thespki::EncodePublicKeytrait. This change marks the beginning of a shift/intent to converge this crate onto the interfaces defined by crates under the RustCrypto umbrella for better interop with the rest of the Rust ecosystem.KeyAlgorithmnow implements conversion from/tospki::ObjectIdentifier.InMemorySigningKeyPairnow implementssignature::Signer. This means there are now 2 implementations ofsign()on this type. So if both traits are in scope you will need to disambiguate the call.- The
Sign::sign()trait method is now marked as deprecated. Please switch to thesignature::Signertrait.
-
0.12.004 Apr 2022Release notes
Open source →- Defined a new
Signtrait to indicate support for cryptographic signing.InMemorySigningKeyPairimplements this trait and callers may need touse x509_certificate::Signto pull the trait into scope. - Some functions for resolving algorithm identifiers now return
Result. - Defined RFC 3447 ASN.1 types for representing RSA private keys.
InMemorySigningKeyPairnow holds the the raw private key data. This enables the content to be retrieved later.- Added certificate signing request ASN.1 types to the new
rfc2986module. X509CertificateBuilderhas a newcreate_certificate_signing_request()method to create a certificate signing request (CSR).
- Defined a new
-
0.11.028 Mar 2022Release notes
Open source →- Add some APIs on
Nameto retrieve additional well-known fields. - Add
Name::user_friendly_str()for obtaining a user-friendly string from a series of attributes.
- Add some APIs on
-
0.10.017 Mar 2022Release notes
Open source →CapturedX509Certificatehas gained averify_signed_data_with_algorithm()method that uses an explicitring::signature::VerificationAlgorithmfor verification. The new method allows verifying when using an alternative verification algorithm.verify_signed_data()now internally calls into the new function.
-
0.9.015 Mar 2022Release notes
Open source →- Store
versionfield ofTbsCertificateasOption<Version>instead ofVersion. In 0.8.0 we interpreted a missing optional field as version 1. This was semantically correct. However, when we encoded the parsed data structure we would invent a newversionfield where it didn't exist before. This mismatch is relevant for operations like resolving the certificate fingerprint, as the extra field would produce a different fingerprint result. Serializing now omits theversionfield when it wasn't originally defined. (#525)
- Store
-
0.8.013 Mar 2022Release notes
Open source →- Properly parse
TbsCertificatethat is missing aversionfield. Before, we'd get aMalformederror if this optional field was missing. Now, we correctly interpret a missing field as version 1. (#521)
- Properly parse
-
0.7.006 Mar 2022Release notes
Open source →- Refactor
GeneralizedTimeparsing to allow fractional seconds and timezones. Previously, only limited forms ofGeneralizedTimewere parsed. (#482)
- Refactor
-
0.6.003 Jan 2022 -
0.5.013 Dec 2021 -
0.4.025 Oct 2021Nothing published for this version
-
0.3.008 Aug 2021Nothing published for this version
-
0.2.006 May 2021Nothing published for this version
-
0.1.030 Apr 2021Nothing published for this version