From 239b7310a4e1c3af2e82c365c7e7965b1e4178f8 Mon Sep 17 00:00:00 2001 From: DougCh Date: Tue, 17 Dec 2024 22:00:19 +0000 Subject: [PATCH] chore: Move s2n-tls-hyper to a separate workspace --- bindings/rust/standard/Cargo.toml | 4 ++++ {s2n-tls-hyper => bindings/rust/standard}/rust-toolchain | 0 .../rust/standard/s2n-tls-hyper}/Cargo.toml | 6 +++--- .../rust/standard/s2n-tls-hyper}/README.md | 0 .../rust/standard/s2n-tls-hyper}/src/connector.rs | 0 .../rust/standard/s2n-tls-hyper}/src/error.rs | 0 .../rust/standard/s2n-tls-hyper}/src/lib.rs | 0 .../rust/standard/s2n-tls-hyper}/src/stream.rs | 0 .../rust/standard/s2n-tls-hyper}/tests/common/echo.rs | 0 .../rust/standard/s2n-tls-hyper}/tests/common/mod.rs | 4 ++-- .../rust/standard/s2n-tls-hyper}/tests/http.rs | 4 ++-- 11 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 bindings/rust/standard/Cargo.toml rename {s2n-tls-hyper => bindings/rust/standard}/rust-toolchain (100%) rename {s2n-tls-hyper => bindings/rust/standard/s2n-tls-hyper}/Cargo.toml (79%) rename {s2n-tls-hyper => bindings/rust/standard/s2n-tls-hyper}/README.md (100%) rename {s2n-tls-hyper => bindings/rust/standard/s2n-tls-hyper}/src/connector.rs (100%) rename {s2n-tls-hyper => bindings/rust/standard/s2n-tls-hyper}/src/error.rs (100%) rename {s2n-tls-hyper => bindings/rust/standard/s2n-tls-hyper}/src/lib.rs (100%) rename {s2n-tls-hyper => bindings/rust/standard/s2n-tls-hyper}/src/stream.rs (100%) rename {s2n-tls-hyper => bindings/rust/standard/s2n-tls-hyper}/tests/common/echo.rs (100%) rename {s2n-tls-hyper => bindings/rust/standard/s2n-tls-hyper}/tests/common/mod.rs (87%) rename {s2n-tls-hyper => bindings/rust/standard/s2n-tls-hyper}/tests/http.rs (99%) diff --git a/bindings/rust/standard/Cargo.toml b/bindings/rust/standard/Cargo.toml new file mode 100644 index 00000000000..f21dffea3c4 --- /dev/null +++ b/bindings/rust/standard/Cargo.toml @@ -0,0 +1,4 @@ +[workspace] +members = [ + "s2n-tls-hyper" +] \ No newline at end of file diff --git a/s2n-tls-hyper/rust-toolchain b/bindings/rust/standard/rust-toolchain similarity index 100% rename from s2n-tls-hyper/rust-toolchain rename to bindings/rust/standard/rust-toolchain diff --git a/s2n-tls-hyper/Cargo.toml b/bindings/rust/standard/s2n-tls-hyper/Cargo.toml similarity index 79% rename from s2n-tls-hyper/Cargo.toml rename to bindings/rust/standard/s2n-tls-hyper/Cargo.toml index a8ff7f9e478..d004e71a7ad 100644 --- a/s2n-tls-hyper/Cargo.toml +++ b/bindings/rust/standard/s2n-tls-hyper/Cargo.toml @@ -4,7 +4,7 @@ description = "A compatbility crate allowing s2n-tls to be used with the hyper H version = "0.0.1" authors = ["AWS s2n"] edition = "2021" -rust-version = "1.63.0" +rust-version = "1.70.0" repository = "https://github.com/aws/s2n-tls" license = "Apache-2.0" publish = false @@ -13,8 +13,8 @@ publish = false default = [] [dependencies] -s2n-tls = { version = "=0.3.9", path = "../bindings/rust/s2n-tls" } -s2n-tls-tokio = { version = "=0.3.9", path = "../bindings/rust/s2n-tls-tokio" } +s2n-tls = { version = "=0.3", path = "../../s2n-tls" } +s2n-tls-tokio = { version = "=0.3", path = "../../s2n-tls-tokio" } hyper = { version = "1" } hyper-util = { version = "0.1", features = ["client-legacy", "tokio", "http1", "http2"] } tower-service = { version = "0.3" } diff --git a/s2n-tls-hyper/README.md b/bindings/rust/standard/s2n-tls-hyper/README.md similarity index 100% rename from s2n-tls-hyper/README.md rename to bindings/rust/standard/s2n-tls-hyper/README.md diff --git a/s2n-tls-hyper/src/connector.rs b/bindings/rust/standard/s2n-tls-hyper/src/connector.rs similarity index 100% rename from s2n-tls-hyper/src/connector.rs rename to bindings/rust/standard/s2n-tls-hyper/src/connector.rs diff --git a/s2n-tls-hyper/src/error.rs b/bindings/rust/standard/s2n-tls-hyper/src/error.rs similarity index 100% rename from s2n-tls-hyper/src/error.rs rename to bindings/rust/standard/s2n-tls-hyper/src/error.rs diff --git a/s2n-tls-hyper/src/lib.rs b/bindings/rust/standard/s2n-tls-hyper/src/lib.rs similarity index 100% rename from s2n-tls-hyper/src/lib.rs rename to bindings/rust/standard/s2n-tls-hyper/src/lib.rs diff --git a/s2n-tls-hyper/src/stream.rs b/bindings/rust/standard/s2n-tls-hyper/src/stream.rs similarity index 100% rename from s2n-tls-hyper/src/stream.rs rename to bindings/rust/standard/s2n-tls-hyper/src/stream.rs diff --git a/s2n-tls-hyper/tests/common/echo.rs b/bindings/rust/standard/s2n-tls-hyper/tests/common/echo.rs similarity index 100% rename from s2n-tls-hyper/tests/common/echo.rs rename to bindings/rust/standard/s2n-tls-hyper/tests/common/echo.rs diff --git a/s2n-tls-hyper/tests/common/mod.rs b/bindings/rust/standard/s2n-tls-hyper/tests/common/mod.rs similarity index 87% rename from s2n-tls-hyper/tests/common/mod.rs rename to bindings/rust/standard/s2n-tls-hyper/tests/common/mod.rs index 2da6cdace69..9c6b0df30fc 100644 --- a/s2n-tls-hyper/tests/common/mod.rs +++ b/bindings/rust/standard/s2n-tls-hyper/tests/common/mod.rs @@ -7,8 +7,8 @@ pub mod echo; /// NOTE: this certificate and key are used for testing purposes only! pub const CERT_PEM: &[u8] = - include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/../certs/cert.pem")); -pub const KEY_PEM: &[u8] = include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/../certs/key.pem")); + include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/../../certs/cert.pem")); +pub const KEY_PEM: &[u8] = include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/../../certs/key.pem")); pub fn config() -> Result { let mut builder = config::Config::builder(); diff --git a/s2n-tls-hyper/tests/http.rs b/bindings/rust/standard/s2n-tls-hyper/tests/http.rs similarity index 99% rename from s2n-tls-hyper/tests/http.rs rename to bindings/rust/standard/s2n-tls-hyper/tests/http.rs index 9f9b87e29a0..c3f5ffb83b3 100644 --- a/s2n-tls-hyper/tests/http.rs +++ b/bindings/rust/standard/s2n-tls-hyper/tests/http.rs @@ -231,11 +231,11 @@ async fn ipv6() -> Result<(), Box> { // matches this identity. let localhost_ipv6_cert: &[u8] = include_bytes!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../certs/cert_localhost_ipv6.pem" + "/../../certs/cert_localhost_ipv6.pem" )); let localhost_ipv6_key: &[u8] = include_bytes!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../certs/key_localhost_ipv6.pem" + "/../../certs/key_localhost_ipv6.pem" )); let mut builder = config::Config::builder();