Skip to content

Commit

Permalink
python: adding message_4 in test_lakers.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ElsaLopez133 committed Nov 22, 2024
1 parent 47c7216 commit 5b46303
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/coap/src/bin/coapserver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ fn main() {
};
let (mut responder, message_4) = responder.prepare_message_4(&None).unwrap();
// send empty ack back
response.message.payload = b"".to_vec();
response.message.payload = Vec::from(message_4.as_slice());

println!("EDHOC exchange successfully completed");
println!("PRK_out: {:02x?}", prk_out);
Expand Down
1 change: 0 additions & 1 deletion lakers-python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ MATURIN_PYPI_TOKEN=<your pypi token here> maturin publish
```
.take().ok_or(StateMismatch)?,
## Requirements

The maturin executable must be available. The recommended way is to install and use it in a virtual environment:

```
Expand Down
6 changes: 3 additions & 3 deletions lakers-python/test/test_lakers.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ def _test_handshake(cred_r_transfer, cred_i_transfer):
assert ead_3 == None
valid_cred_i = lakers.credential_check_or_fetch(id_cred_i, CRED_I)
r_prk_out = responder.verify_message_3(valid_cred_i)
message_4 = responder.prepare_message_4(None)

assert i_prk_out == r_prk_out

# advanced state
responder.completed_without_message_4()
initiator.completed_without_message_4()
# initiator
ead_4 = initiator.process_message_4(message_4)

i_oscore_secret = initiator.edhoc_exporter(0, [], 16)
i_oscore_salt = initiator.edhoc_exporter(1, [], 8)
Expand Down

0 comments on commit 5b46303

Please sign in to comment.