Skip to content

Commit ca99f4c

Browse files
authored
Merge pull request #152 from clux/aws-lc-rs
aws-lc tests
2 parents a0ca3da + 66cec6b commit ca99f4c

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

test/rustlscrate/Cargo.toml

+6-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ version = "0.1.0"
55
edition = "2021"
66

77
[dependencies]
8-
hyper = { version = "0.14.18", features = ["client"] }
9-
hyper-rustls = "0.23.0"
10-
rustls = "0.22"
11-
tokio = { version = "1.18.2", features = ["rt-multi-thread", "macros"] }
8+
http-body-util = "0.1.2"
9+
hyper = { version = "1.6.0", features = ["client"] }
10+
hyper-rustls = "0.27.5"
11+
hyper-util = "0.1.10"
12+
rustls = "0.23"
13+
tokio = { version = "1.43.0", features = ["rt-multi-thread", "macros"] }

test/rustlscrate/src/main.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1-
use hyper::{Body, Client, StatusCode, Uri};
1+
use http_body_util::Empty;
2+
use hyper::body::Bytes;
3+
use hyper::http::StatusCode;
4+
use hyper_util::client::legacy::Client;
5+
use hyper_util::rt::TokioExecutor;
26

37
#[tokio::main]
48
async fn main() {
59
let url = ("https://hyper.rs").parse().unwrap();
610
let https = hyper_rustls::HttpsConnectorBuilder::new()
711
.with_native_roots()
12+
.expect("no native root CA certificates found")
813
.https_only()
914
.enable_http1()
1015
.build();
1116

12-
let client: Client<_, hyper::Body> = Client::builder().build(https);
17+
let client: Client<_, Empty<Bytes>> = Client::builder(TokioExecutor::new()).build(https);
1318

1419
let res = client.get(url).await.unwrap();
1520
assert_eq!(res.status(), StatusCode::OK);

0 commit comments

Comments
 (0)