Skip to content

Commit

Permalink
FW-880. When initializing the context, copy idContext param.
Browse files Browse the repository at this point in the history
  • Loading branch information
malishav committed Jul 1, 2020
1 parent 0058e49 commit 46762b4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions openweb/opencoap/oscore.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ void oscore_init_security_context(oscore_security_context_t *ctx,
// common context
ctx->aeadAlgorithm = AES_CCM_16_64_128;

memcpy(ctx->idContext, idContext, idContextLen);
ctx->idContextLen = idContextLen;

// invoke HKDF to get common IV
hkdf_derive_parameter(ctx->commonIV,
masterSecret,
Expand Down

0 comments on commit 46762b4

Please sign in to comment.