Skip to content

Commit

Permalink
lakers-no_std: update mutable references
Browse files Browse the repository at this point in the history
  • Loading branch information
ElsaLopez133 committed Nov 19, 2024
1 parent 9644815 commit 815c2a4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/lakers-no_std/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,16 @@ fn main() -> ! {
.unwrap(); // exposing own identity only after validating cred_r
let initiator = initiator.verify_message_2(valid_cred_r).unwrap();

let (mut initiator, message_3, i_prk_out) = initiator
let (initiator, message_3, i_prk_out) = initiator
.prepare_message_3(CredentialTransfer::ByReference, &None)
.unwrap();

let (responder, id_cred_i, _ead_3) = responder.parse_message_3(&message_3).unwrap();
let valid_cred_i = credential_check_or_fetch(Some(cred_i), id_cred_i).unwrap();
let (mut responder, r_prk_out) = responder.verify_message_3(valid_cred_i).unwrap();
let (responder, r_prk_out) = responder.verify_message_3(valid_cred_i).unwrap();

let initiator = initiator.completed_without_message_4().unwrap();
let responder = responder.completed_without_message_4().unwrap();
let mut initiator = initiator.completed_without_message_4().unwrap();
let mut responder = responder.completed_without_message_4().unwrap();

// check that prk_out is equal at initiator and responder side
assert_eq!(i_prk_out, r_prk_out);
Expand Down

0 comments on commit 815c2a4

Please sign in to comment.