Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Commit

Permalink
Refactoring of https connector to make root certificates optional (#47)
Browse files Browse the repository at this point in the history
* Proposal for refactoring of https connector to make root certificates optional

* Tentative fix (#48)

Co-authored-by: Nicolas Savoire <[email protected]>

* return error when HTTPs cannot be used but is requested

* Correctly handle error when no root certificates are found

* Use latest common multipart released package

* Cleanup implementation + add tests

* Fix linting errors

* enable matrix build and test on all expected platforms

* Rename MaybeHttpsConnector to Connector

* Fix compilation on Windows

* Make pin_project_lite usage compile on windows

* Impl own pin project

* Settle on using pin_project

Co-authored-by: r1viollet <[email protected]>
Co-authored-by: Nicolas Savoire <[email protected]>
  • Loading branch information
3 people authored Apr 13, 2022
1 parent 9989036 commit 4019c38
Show file tree
Hide file tree
Showing 9 changed files with 412 additions and 224 deletions.
4 changes: 2 additions & 2 deletions .github/actions/cache/action.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: '[rust] Checkout and cache'
description: '[rust] Checkout cache'
name: '[rust] Cache'
description: '[rust] Cache'

runs:
using: composite
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ env:

jobs:
test:
name: cargo test --workspace
runs-on: ubuntu-latest
name: "cargo test --workspace #${{ matrix.platform }}"
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [windows-latest, ubuntu-latest, macos-latest]
steps:
- name: Checkout sources
uses: actions/checkout@v2
Expand Down
49 changes: 44 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions ddprof-exporter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ license = "Apache-2.0"
crate-type = ["cdylib", "lib"]

[dependencies]
anyhow = "1.0"
bytes = "1.0"
chrono = "0.4"
futures = "0.3"
Expand All @@ -19,16 +20,19 @@ lazy_static = "1.4"
libc = "0.2"
regex = "1.5"
hyper = { version = "0.14", features = ["http1", "client", "tcp", "stream"], default-features = false }
tokio = { version = "1.8", features = ["rt"]}
tokio = { version = "1.8", features = ["rt", "macros"]}
tokio-rustls = { version = "0.23" }
percent-encoding = "2.1"
futures-core = { version = "0.3.0", default-features = false }
futures-util = { version = "0.3.0", default-features = false }
mime_guess = { version = "2.0", default-features = false }
http-body = "0.4"
pin-project-lite = "0.2.0"
pin-project = "1"
rustls = { version = "0.20.4", default-features = false }
rustls-native-certs = { version = "0.6" }
hyper-rustls = { version = "0.23", default-features = false, features = ["native-tokio", "http1", "tls12"] }
hex = "0.4"
hyper-multipart-rfc7578 = { git = "https://github.com/paullegranddc/rust-multipart-rfc7578.git", rev = "8dcedc266e50876c04c91d24390fe9ac44f10b96" }
hyper-multipart-rfc7578 = "0.7.0"

[dev-dependencies]
maplit = "1.0"
211 changes: 0 additions & 211 deletions ddprof-exporter/src/connector.rs

This file was deleted.

Loading

0 comments on commit 4019c38

Please sign in to comment.