Skip to content

Commit

Permalink
context_2 calculaton: Use C_x as CBOR item rather than slice
Browse files Browse the repository at this point in the history
This made no difference as long as all C_x were numeric and had
identical slice and CBOR representations.
  • Loading branch information
chrysn committed Nov 4, 2024
1 parent 2867756 commit bf8a7f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/edhoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ fn encode_kdf_context(
let mut output: BytesMaxContextBuffer = [0x00; MAX_KDF_CONTEXT_LEN];

let mut output_len = if let Some(c_r) = c_r {
let c_r = c_r.as_slice();
let c_r = c_r.as_cbor();
output[..c_r.len()].copy_from_slice(c_r);
c_r.len()
} else {
Expand Down

0 comments on commit bf8a7f2

Please sign in to comment.