Skip to content

Commit

Permalink
Make nonce setting more lenient when policy is None
Browse files Browse the repository at this point in the history
  • Loading branch information
locka99 committed Oct 27, 2021
1 parent 9786294 commit 8c10747
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/comms/secure_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,11 @@ impl SecureChannel {
self.remote_nonce = remote_nonce.to_vec();
Ok(())
}
} else {
} else if self.security_policy != SecurityPolicy::None {
error!("Remote nonce is invalid {:?}", remote_nonce);
Err(StatusCode::BadNonceInvalid)
} else {
Ok(())
}
}

Expand Down

0 comments on commit 8c10747

Please sign in to comment.