Skip to content

Commit

Permalink
meta: update dependencies & fix some clippies
Browse files Browse the repository at this point in the history
  • Loading branch information
mcginty committed May 11, 2021
1 parent 9259c0b commit f57a377
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ rand_core = "0.6"
subtle = "2.4"

# default crypto provider
aes-gcm = { version = "0.8", optional = true }
chacha20poly1305 = { version = "0.7", optional = true }
aes-gcm = { version = "0.9", optional = true }
chacha20poly1305 = { version = "0.8", optional = true }
blake2 = { version = "0.9", optional = true }
rand = { version = "0.8", optional = true }
sha2 = { version = "0.9", optional = true }
x25519-dalek = { version = "1.1", optional = true }
pqcrypto-kyber = { version = "0.6", optional = true }
pqcrypto-kyber = { version = "0.7", optional = true }
pqcrypto-traits = { version = "0.3", optional = true }

# ring crypto proivder
Expand Down
2 changes: 1 addition & 1 deletion src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ impl<'builder> Builder<'builder> {
let mut rs_buf = [0u8; MAXDHLEN];
let rs = match self.rs {
Some(v) => {
rs_buf[..v.len()].copy_from_slice(&v[..]);
rs_buf[..v.len()].copy_from_slice(v);
Toggle::on(rs_buf)
},
None => Toggle::off(rs_buf),
Expand Down
6 changes: 3 additions & 3 deletions src/handshakestate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ impl HandshakeState {
}

let mut new_psk = [0u8; PSKLEN];
new_psk.copy_from_slice(&key[..]);
new_psk.copy_from_slice(key);
self.psks[location as usize] = Some(new_psk);

Ok(())
Expand Down Expand Up @@ -522,12 +522,12 @@ impl HandshakeState {

/// Convert this `HandshakeState` into a `TransportState` with an internally stored nonce.
pub fn into_transport_mode(self) -> Result<TransportState, Error> {
Ok(self.try_into()?)
self.try_into()
}

/// Convert this `HandshakeState` into a `StatelessTransportState` without an internally stored nonce.
pub fn into_stateless_transport_mode(self) -> Result<StatelessTransportState, Error> {
Ok(self.try_into()?)
self.try_into()
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/params/patterns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,6 @@ fn apply_hfs_modifier(patterns: &mut Patterns) {
// HandshakePattern is not one-way.
assert!(
!(e1_insert_idx.is_some() ^ ee_insert_idx.is_some()),
"handshake messages contain one of the {{'e1', 'ekem1'}} tokens, but not the other",
"handshake messages contain one of the ['e1', 'ekem1'] tokens, but not the other",
);
}
2 changes: 1 addition & 1 deletion src/stateless_transportstate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl StatelessTransportState {
}

let cipher = if self.initiator { &self.cipherstates.0 } else { &self.cipherstates.1 };
Ok(cipher.encrypt(nonce, payload, message)?)
cipher.encrypt(nonce, payload, message)
}

/// Reads a noise message from `input`
Expand Down

0 comments on commit f57a377

Please sign in to comment.