-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add aws_lc_rs feature and set it as default #56
Conversation
See https://github.com/rustls/rustls/blob/main/rustls/src/crypto/mod.rs#L270-L283 |
I'm happy to add a feature for using aws-lc-rs, but I want to stick with ring as the default for now and please avoid any changes unrelated to this (such as TOML reformatting and version bumps to other dependencies). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks a lot better. There are still a few small unrelated changes that I'd prefer to avoid.
src/lib.rs
Outdated
@@ -13,14 +17,13 @@ use http_body_util::{BodyExt, Full}; | |||
use hyper::body::{Bytes, Incoming}; | |||
use hyper::header::{CONTENT_TYPE, LOCATION}; | |||
use hyper::{Method, Request, Response, StatusCode}; | |||
use hyper_util::client::legacy::{connect::Connect, Client as HyperClient}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to stick to one line per module (so keeping the separate lines for Connect
and Client
, as before).
src/types.rs
Outdated
use rustls_pki_types::CertificateDer; | ||
use serde::de::DeserializeOwned; | ||
use serde::ser::SerializeMap; | ||
use serde::{Deserialize, Serialize}; | ||
use std::fmt; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should remain in a separate block of imports by itself, as before.
Cargo.toml
Outdated
@@ -29,7 +33,7 @@ thiserror = "1.0.30" | |||
[dev-dependencies] | |||
anyhow = "1.0.66" | |||
clap = { version = "4.0.29", features = ["derive"] } | |||
rcgen = "0.12" | |||
rcgen = { version = "0.12", features = ["pem"], default-features = false } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As elsewhere, please keep default-features = false
before features = []
.
Cargo.toml
Outdated
default = ["hyper-rustls"] | ||
default = ["hyper-rustls", "ring"] | ||
ring = ["dep:ring", "hyper-rustls?/ring", "rcgen/ring"] | ||
aws_lc_rs = ["dep:aws-lc-rs", "hyper-rustls?/aws-lc-rs", "rcgen/aws_lc_rs"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would prefer to name the feature with hyphens instead of underscores.
CI is failing because
|
The suggested commands don’t work because ring is in the default feature.
|
Ah, sorry, that sounds good! |
@djc Apparently, on Windows, NASM is a dependency for aws_lc_rs. |
@djc Done. Is there anything else that should be applied? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good start. Going to merge this and follow up in a separate PR.
This PR adds the aws_lc_rs feature to the instant-acme library, sets it as the default feature, and updates the dependencies.