-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Chip-Cert] Prevent extra bytes to be encoded when converting key to …
…chip-b64 (#16121) Observed : - Existing code encodes bytes beyond the buffer actually containing the key. - The issue was sizeof(P256SerializedKeypair) that includes 'length' field as well as 'bytes' field. Changes : - Make use of serializedKeypair.Length() to retrieve actual key length - Clarify usage of buffer sizes vs actual used lengths - Additionally, do not assume that P256SerializedKeypair 'bytes' field is the first field of the data structure (i.e. has implicitly same address as the structure itself)
- Loading branch information
1 parent
1152b30
commit 8ff314b
Showing
1 changed file
with
10 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters