Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare 2.2.0 #56

Merged
merged 1 commit into from
Sep 30, 2024
Merged

Prepare 2.2.0 #56

merged 1 commit into from
Sep 30, 2024

Conversation

ctz
Copy link
Member

@ctz ctz commented Sep 30, 2024

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 base64 crate, 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-types PEM APIs directly, here is a rough cheat-sheet:

Use case Replace
File stream to CertificateDer iterator rustls_pemfile::certs(io::BufRead)
➡️
CertificateDer::pem_reader_iter(io::Read)
File stream to one PrivateKeyDer rustls_pemfile::private_key(io::BufRead)
➡️
PrivateKeyDer::from_pem_reader(io::Read)
File stream to one CertificateSigningRequestDer rustls_pemfile::csr(io::BufRead)
➡️
CertificateSigningRequestDer::from_pem_reader(io::Read)
File stream to CertificateRevocationListDer iterator rustls_pemfile::crls(io::BufRead)
➡️
CertificateRevocationListDer::pem_reader_iter(io::Read)
File stream to PrivatePkcs1KeyDer iterator rustls_pemfile::rsa_private_keys(io::BufRead)
➡️
PrivatePkcs1KeyDer::pem_reader_iter(io::Read)
File stream to PrivatePkcs8KeyDer iterator rustls_pemfile::pkcs8_private_keys(io::BufRead)
➡️
PrivatePkcs8KeyDer::pem_reader_iter(io::Read)
File stream to PrivateSec1KeyDer iterator rustls_pemfile::ec_private_keys(io::BufRead)
➡️
PrivateSec1KeyDer::pem_reader_iter(io::Read)
File stream to SubjectPublicKeyInfoDer iterator rustls_pemfile::public_keys(io::BufRead)
➡️
SubjectPublicKeyInfoDer::pem_reader_iter(io::Read)

@ctz ctz marked this pull request as ready for review September 30, 2024 14:25
@ctz
Copy link
Member Author

ctz commented Sep 30, 2024

(maybe this big table isn't warranted in the release notes, maybe the README instead?)

@cpu
Copy link
Member

cpu commented Sep 30, 2024

Release notes LGTM.

Should you wish to migrate to using the new rustls-pki-types PEM APIs directly, here is a rough cheat-sheet:

Maybe hyperlink to https://github.com/rustls/pki-types or https://docs.rs/rustls-pki-types/latest/rustls_pki_types/ ?

(maybe this big table isn't warranted in the release notes, maybe the README instead?)

I don't think there's a big disadvantage to having it in the release notes (or both places!).

@cpu
Copy link
Member

cpu commented Sep 30, 2024

maybe the README instead

It would probably be a good idea to include a paragraph in the README about the future of this crate/API in either case

@ctz
Copy link
Member Author

ctz commented Sep 30, 2024

Maybe hyperlink to https://github.com/rustls/pki-types or https://docs.rs/rustls-pki-types/latest/rustls_pki_types/ ?

Linked.

README

Added.

Copy link
Member

@djc djc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@ctz ctz merged commit 0f37efe into main Sep 30, 2024
18 checks passed
@ctz ctz deleted the jbp-prepare-2.2.0 branch September 30, 2024 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants