Skip to content

Commit

Permalink
fix buffer size
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanHri committed May 20, 2024
1 parent 785d07b commit 013276b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/edhoc/initiator.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ static enum err msg3_only_gen(const struct edhoc_initiator_context *c,
c->id_cred_i.len + AS_BSTR_SIZE(SIG_OR_MAC_SIZE) +
c->ead_3.len);
BYTE_ARRAY_NEW(ciphertext, CIPHERTEXT3_SIZE,
AS_BSTR_SIZE(plaintext.len));
AS_BSTR_SIZE(plaintext.len) +
get_aead_mac_len(rc->suite.edhoc_aead));
/*calculate Signature_or_MAC_3*/
BYTE_ARRAY_NEW(sign_or_mac_3, SIG_OR_MAC_SIZE, SIG_OR_MAC_SIZE);
TRY(signature_or_mac(GENERATE, static_dh_i, &rc->suite, &c->sk_i,
Expand Down
2 changes: 1 addition & 1 deletion test/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

// in order to execute only a specific tes set this macro to a specific
// test macro and comment out EXECUTE_ALL_TESTS
#define EXECUTE_ONLY_TEST TEST_INITIATOR_RESPONDER_INTERACTION1
#define EXECUTE_ONLY_TEST TEST_EDHOC_INITIATOR_X509_X5T_RFC9529

/**
* @brief This function allows to skip a given test if only one other test
Expand Down

0 comments on commit 013276b

Please sign in to comment.