Skip to content

Commit

Permalink
maybe fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
jmwample committed Oct 12, 2024
1 parent b1eab94 commit d69fbe9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
- run: cargo update -Z minimal-versions
# Now check that `cargo build` works with respect to the oldest possible
# deps and the stated MSRV. 1.70 should work for all
- uses: dtolnay/rust-toolchain@1.75.0
- uses: dtolnay/rust-toolchain@1.77.0
- run: cargo test --workspace --all-targets --all-features
# Also make sure the AVX2 build works
- run: cargo build --target x86_64-unknown-linux-gnu
Expand Down
11 changes: 4 additions & 7 deletions crates/obfs4/src/handshake/handshake_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,18 @@ pub(crate) struct HandshakeMaterials {
pub(crate) len_seed: [u8; SEED_LENGTH],
}

impl<'a> HandshakeMaterials {
impl HandshakeMaterials {
pub fn get_hmac(&self) -> HmacSha256 {
let mut key = self.identity_keys.pk.pk.as_bytes().to_vec();
key.append(&mut self.identity_keys.pk.id.as_bytes().to_vec());
HmacSha256::new_from_slice(&key[..]).unwrap()
}

pub fn new<'b>(
identity_keys: &'b Obfs4NtorSecretKey,
pub fn new(
identity_keys: &Obfs4NtorSecretKey,
session_id: String,
len_seed: [u8; SEED_LENGTH],
) -> Self
where
'b: 'a,
{
) -> Self {
HandshakeMaterials {
identity_keys: identity_keys.clone(),
session_id,
Expand Down
2 changes: 1 addition & 1 deletion crates/obfs4/src/test_utils/fake_prng.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ impl<'a> FakePRNG<'a> {
Self { bytes }
}
}
impl<'a> rand_core::RngCore for FakePRNG<'a> {
impl rand_core::RngCore for FakePRNG<'_> {
fn next_u32(&mut self) -> u32 {
rand_core::impls::next_u32_via_fill(self)
}
Expand Down

0 comments on commit d69fbe9

Please sign in to comment.