Skip to content

Commit 1f15dae

Browse files
committed
Merge main
2 parents 65c96e7 + 16bcfdb commit 1f15dae

File tree

2 files changed

+43
-7
lines changed

2 files changed

+43
-7
lines changed

.github/workflows/test.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build_and_test:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v3
12+
13+
- name: Set up Rust
14+
uses: dtolnay/rust-toolchain@stable
15+
with:
16+
toolchain: stable
17+
components: rustfmt, clippy
18+
19+
- name: Cache dependencies
20+
uses: actions/cache@v3
21+
with:
22+
path: |
23+
~/.cargo/registry
24+
~/.cargo/git
25+
target
26+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
27+
restore-keys: |
28+
${{ runner.os }}-cargo-
29+
30+
- name: Run cargo clippy
31+
run: cargo clippy -- -D warnings
32+
33+
- name: Run cargo test
34+
run: cargo test

src/lib.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,15 @@ impl<L: AttestationPlatform, R: AttestationPlatform> ProxyServer<L, R> {
5757
.with_single_cert(cert_chain.clone(), key)
5858
.expect("Failed to create rustls server config");
5959

60-
let server = Self::new_with_tls_config(
60+
Self::new_with_tls_config(
6161
cert_chain,
6262
server_config.into(),
6363
local,
6464
target,
6565
local_attestation_platform,
6666
remote_attestation_platform,
6767
)
68-
.await;
69-
70-
server
68+
.await
7169
}
7270

7371
/// Start with preconfigured TLS
@@ -184,16 +182,15 @@ impl<L: AttestationPlatform, R: AttestationPlatform> ProxyClient<L, R> {
184182
.with_root_certificates(root_store)
185183
.with_no_client_auth();
186184

187-
let client = Self::new_with_tls_config(
185+
Self::new_with_tls_config(
188186
client_config.into(),
189187
address,
190188
server_address,
191189
server_name,
192190
local_attestation_platform,
193191
remote_attestation_platform,
194192
)
195-
.await;
196-
client
193+
.await
197194
}
198195

199196
pub async fn new_with_tls_config(
@@ -215,7 +212,12 @@ impl<L: AttestationPlatform, R: AttestationPlatform> ProxyClient<L, R> {
215212
Self {
216213
inner,
217214
connector,
215+
<<<<<<< HEAD
218216
target: target.into(),
217+
=======
218+
listener,
219+
target,
220+
>>>>>>> main
219221
target_name,
220222
}
221223
}

0 commit comments

Comments
 (0)