Skip to content

Conversation

@sosthene-nitrokey
Copy link
Contributor

The increased size of files is a requirement for PIV, 1kB certificates are too small. This commit also removes the user_attribute field that was never read anyway. This avoids increasing the total size of the interchange

Both changes are breaking changes:

  • Changing the messages size for the read and write requests can cause compilation error for code that depends on the length of the heapless arrays
  • Removing user_attribute will require changing every call to the read_file and write_methods to remove the None.

@sosthene-nitrokey sosthene-nitrokey force-pushed the write-2k branch 2 times, most recently from 96409ff to 2c9f677 Compare January 30, 2023 09:33
@nickray
Copy link
Member

nickray commented Jan 31, 2023

Yeah, we can remove UserAttribute. If I remember correctly, it would have allowed filtering a tree of files without loading the files themselves, which might be an optimization for apps with a large amount of such files. So since we don't use it, can add back later if and only if someone actually needs this.

The increased size of files is a requirement for  PIV,
1kB certificates are too small.
The motivation for this change is to avoid increasing the interchange size
with the larger data for files.

The justification for removing it are the following:
- They are not used anywhere
- They were actually never written, so even if someone used them they did nothing when writing
- Their usage was not documented at all
@sosthene-nitrokey
Copy link
Contributor Author

This will we replaced by the streaming api. Current advances can be found in Nitrokey#18. Once #96 and trussed-dev/littlefs2#34 are merged I will upstream it.

@sosthene-nitrokey sosthene-nitrokey deleted the write-2k branch April 6, 2023 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants