From 628266e7c11cfb0b404ccc75a7a5fb786a1d659a Mon Sep 17 00:00:00 2001 From: Elsa Lopez Perez Date: Tue, 19 Nov 2024 10:20:08 +0100 Subject: [PATCH] shared: adding WaitM4 to cbindgen --- examples/coap/src/bin/coapserver-coaphandler.rs | 3 +-- shared/cbindgen.toml | 2 +- shared/src/lib.rs | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/coap/src/bin/coapserver-coaphandler.rs b/examples/coap/src/bin/coapserver-coaphandler.rs index 55b8b4f2..6982e4c9 100644 --- a/examples/coap/src/bin/coapserver-coaphandler.rs +++ b/examples/coap/src/bin/coapserver-coaphandler.rs @@ -187,8 +187,7 @@ impl coap_handler::Handler for EdhocHandler { render_error(e) })?; - let ead_4 = None; - let (mut responder, message_4) = responder.prepare_message_4(&ead_4).unwrap(); + let (mut responder, message_4) = responder.prepare_message_4(&None).unwrap(); println!("EDHOC exchange successfully completed"); println!("PRK_out: {:02x?}", prk_out); diff --git a/shared/cbindgen.toml b/shared/cbindgen.toml index ff11b562..04a17b74 100644 --- a/shared/cbindgen.toml +++ b/shared/cbindgen.toml @@ -21,6 +21,6 @@ include = [ "EdhocBuffer", "BufferKid", "BufferCred", "BufferIdCred", "CredentialKey", "CredentialType", "IdCred", "CredentialTransfer", - "InitiatorStart", "WaitM2", "Completed", "ProcessedM2", + "InitiatorStart", "WaitM2", "Completed", "ProcessedM2", "WaitM4", "EdhocInitiatorC", "EdhocInitiatorWaitM2C", "EdhocInitiatorProcessingM2C", "EdhocInitiatorProcessedM2C", "EdhocInitiatorDoneC", ] diff --git a/shared/src/lib.rs b/shared/src/lib.rs index 62b9c2db..13000451 100644 --- a/shared/src/lib.rs +++ b/shared/src/lib.rs @@ -407,6 +407,7 @@ pub struct ProcessedM3 { } #[derive(Default, Debug)] +#[repr(C)] pub struct WaitM4 { pub prk_4e3m: BytesHashLen, pub th_4: BytesHashLen,