-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a23093
commit c85aa09
Showing
5 changed files
with
144 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
name: Build Test rustls-platform-verifier | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "main" | ||
- "rc" | ||
- "hotfix-rc" | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build-windows: | ||
name: Build Windows | ||
runs-on: windows-2022 | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | ||
|
||
- name: Build | ||
run: cargo build -p test-rustls-platform-verifier --release --target=x86_64-pc-windows-msvc | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
with: | ||
name: test-rustls-platform-verifier | ||
path: ./target/release/test-rustls-platform-verifier.exe |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[package] | ||
name = "test-rustls-platform-verifier" | ||
version.workspace = true | ||
authors.workspace = true | ||
edition.workspace = true | ||
rust-version.workspace = true | ||
homepage.workspace = true | ||
repository.workspace = true | ||
license-file.workspace = true | ||
keywords.workspace = true | ||
|
||
[dependencies] | ||
reqwest = { version = "0.12.5", features = [ | ||
"rustls-tls-manual-roots", | ||
], default-features = false } | ||
rustls-platform-verifier = "0.3.3" | ||
tokio = { version = "1.39.2", features = ["rt-multi-thread", "macros"] } | ||
|
||
[lints] | ||
workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#[tokio::main] | ||
async fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
let client = reqwest::Client::builder() | ||
.use_preconfigured_tls(rustls_platform_verifier::tls_config()) | ||
.build() | ||
.expect("Build should not fail"); | ||
|
||
let resp = client | ||
.get("https://httpbin.org/ip") | ||
.send() | ||
.await? | ||
.text() | ||
.await?; | ||
|
||
println!("body = {resp:?}"); | ||
|
||
Ok(()) | ||
} |