From 14c934b357cf9ce3528246a2a016f66253ea358c Mon Sep 17 00:00:00 2001 From: chrysn Date: Wed, 15 Nov 2023 20:08:44 +0100 Subject: [PATCH] fixup! refactor!: Pull Crypto trait to the high-level implementation --- examples/edhoc-rs-no_std/src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/edhoc-rs-no_std/src/main.rs b/examples/edhoc-rs-no_std/src/main.rs index f1994a4d..a3afd0a7 100644 --- a/examples/edhoc-rs-no_std/src/main.rs +++ b/examples/edhoc-rs-no_std/src/main.rs @@ -74,7 +74,7 @@ fn main() -> ! { fn test_new_initiator() { let state = Default::default(); - let _initiator = EdhocInitiator::new(state, I, CRED_I, Some(CRED_R)); + let _initiator = EdhocInitiator::new(state, edhoc_crypto::default_crypto(), I, CRED_I, Some(CRED_R)); } test_new_initiator(); @@ -94,7 +94,7 @@ fn main() -> ! { fn test_prepare_message_1() { let state = Default::default(); - let mut initiator = EdhocInitiator::new(state, I, CRED_I, Some(CRED_R)); + let mut initiator = EdhocInitiator::new(state, edhoc_crypto::default_crypto(), I, CRED_I, Some(CRED_R)); let c_i: u8 = generate_connection_identifier_cbor().into(); let message_1 = initiator.prepare_message_1(c_i); @@ -106,9 +106,9 @@ fn main() -> ! { fn test_handshake() { let state_initiator = Default::default(); - let mut initiator = EdhocInitiator::new(state_initiator, I, CRED_I, Some(CRED_R)); + let mut initiator = EdhocInitiator::new(state_initiator, edhoc_crypto::default_crypto(), I, CRED_I, Some(CRED_R)); let state_responder = Default::default(); - let responder = EdhocResponder::new(state_responder, R, CRED_R, Some(CRED_I)); + let responder = EdhocResponder::new(state_responder, edhoc_crypto::default_crypto(), R, CRED_R, Some(CRED_I)); let c_i: u8 = generate_connection_identifier_cbor().into(); let (initiator, message_1) = initiator.prepare_message_1(c_i).unwrap(); // to update the state