rustls-pemfile
Basic .pem file parser for keys and certificates
2.2.0
512M downloads/mo
#205 most downloaded on crates.io
rustls/pemfile
What this package is like to depend on
Last release 2 years ago
no release in 18 months
Ships fairly regularly
a new release about every 2 months
Some releases are documented
notes for 6 of 14 stable releases
1 version withdrawn
withdrawn after publishing
6 years old
18 releases · first in 2020
0 releases in the last 12 months
see the full history below
Release timeline
18 releases · Dec 2020 to Sep 2024Releases
latest 18-
2.2.030 Sep 2024Release notes
Open source →Release notes
The main function of this crate has been incorporated into rustls-pki-types. 2.2.0 maintains the existing public API for this crate, on top of this new implementation. This drops the dependency on the
base64crate, and allows for constant-time decoding of private keys.This crate will continue to exist in its current form, but it is somewhat unlikely that the API will be extended from its current state.
Should you wish to migrate to using the new
rustls-pki-typesPEM APIs directly, here is a rough cheat-sheet:Use case Replace File stream to CertificateDeriteratorrustls_pemfile::certs(io::BufRead)
➡️
CertificateDer::pem_reader_iter(io::Read)File stream to one PrivateKeyDerrustls_pemfile::private_key(io::BufRead)
➡️
PrivateKeyDer::from_pem_reader(io::Read)File stream to one CertificateSigningRequestDerrustls_pemfile::csr(io::BufRead)
➡️
CertificateSigningRequestDer::from_pem_reader(io::Read)File stream to CertificateRevocationListDeriteratorrustls_pemfile::crls(io::BufRead)
➡️
CertificateRevocationListDer::pem_reader_iter(io::Read)File stream to PrivatePkcs1KeyDeriteratorrustls_pemfile::rsa_private_keys(io::BufRead)
➡️
PrivatePkcs1KeyDer::pem_reader_iter(io::Read)File stream to PrivatePkcs8KeyDeriteratorrustls_pemfile::pkcs8_private_keys(io::BufRead)
➡️
PrivatePkcs8KeyDer::pem_reader_iter(io::Read)File stream to PrivateSec1KeyDeriteratorrustls_pemfile::ec_private_keys(io::BufRead)
➡️
PrivateSec1KeyDer::pem_reader_iter(io::Read)File stream to SubjectPublicKeyInfoDeriteratorrustls_pemfile::public_keys(io::BufRead)
➡️
SubjectPublicKeyInfoDer::pem_reader_iter(io::Read)What's Changed
- Add semver checks action by @ctz in #54
- Use pki-types pem decoding by @ctz in #55
- Prepare 2.2.0 by @ctz in #56
Full Changelog: v/2.1.3...v/2.2.0
-
2.1.303 Aug 2024Release notes
Open source →Notable changes
- Added support for raw public keys (see #51).
What's Changed
- ci: add scheduled build, use ubuntu-latest by @cpu in #47
- Bump base64 from 0.22.0 to 0.22.1 by @dependabot in #49
- Read Public Keys from a pemfile by @holodorum in #51
-
2.1.206 Apr 2024Release notes
Open source →Dependency updates.
What's Changed
- Bump base64 from 0.21.5 to 0.22.0 by @dependabot in #44
- Cargo: version 2.1.1 -> 2.1.2 by @alex in #45
- Delete obsolete release history section by @ctz in #46
New Contributors
Full Changelog: v/2.1.1...v/2.1.2
-
2.1.101 Mar 2024Release notes
Open source →Headlines
- Leading whitespace in PEM document bodies is now trimmed in addition to trailing whitespace.
What's Changed
- Trim leading contiguous whitespace, fix nightly clippy warns by @cpu in #41
- v2.1.1 preparation by @cpu in #42
Full Changelog: v/2.1.0...v/2.1.1
-
2.1.015 Feb 2024Release notes
Open source →Headlines
- Adds the
csrfunction and theItem::Csrvariant to support loading DER encoded Certificate Signing Requests (CSRs) from PEM inputs.
What's Changed
New Contributors
Full Changelog: v/2.0.0...v/2.1.0
- Adds the
-
2.0.030 Nov 2023Release notes
Open source →Headlines
- Improving API stability. This crate now uses types from rustls-pki-types; we expect this to reduce the number of breaking changes in rustls ecosystem. As part of this, the
Itemenum's variants got renamed fromItem::{RSAKey, PKCS8Key, ECKey}toItem::{Pkcs1Key, Pkcs8Key, Sec1Key}. no_stdsupport. This crate can now work optionally withoutstd: use the newread_one_from_sliceAPI.
What's Changed
- Switch to using the pki-types crate by @djc in #24
- Bump version to 2.0.0-alpha.0 by @djc in #25
- 2.0.0-alpha.1: take pki-types 0.2 by @ctz in #26
- Add private_key() helper by @djc in #27
- Bump actions/checkout from 3 to 4 by @dependabot in #28
- Allow additionally parsing \r newlines in PEM files by @complexspaces in #30
- add no-std support by @japaric in #29
- Bump version to alpha.2 by @djc in #33
New Contributors
- @dependabot made their first contribution in #28
- @japaric made their first contribution in #29
Full Changelog: v/1.0.4...v/2.0.0
- Improving API stability. This crate now uses types from rustls-pki-types; we expect this to reduce the number of breaking changes in rustls ecosystem. As part of this, the
-
2.0.0-alpha.223 Nov 2023 pre-releaseNothing published for this version
-
2.0.0-alpha.107 Sep 2023 pre-releaseNothing published for this version
-
2.0.0-alpha.001 Sep 2023 pre-releaseNothing published for this version
-
1.0.409 Nov 2023Nothing published for this version
-
1.0.328 Jun 2023Nothing published for this version
-
1.0.210 Jan 2023Nothing published for this version
-
1.0.102 Aug 2022Nothing published for this version
-
1.0.014 Apr 2022Nothing published for this version
-
0.3.005 Feb 2022Nothing published for this version
-
0.2.117 Apr 2021Nothing published for this version
-
0.2.028 Dec 2020Nothing published for this version
-
0.1.028 Dec 2020 withdrawnNothing published for this version