Skip to content

Conversation

@tarcieri
Copy link
Member

@tarcieri tarcieri commented Aug 9, 2023

Removes lifetimes from all types in the pkcs5 crate, making them own their data.

cc @baloo

@@ -0,0 +1,104 @@
//! Salt storage buffer which works on heapless `no_std` targets.
// TODO(tarcieri): use `ArrayVec` when it's available in `core`.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth considering making a crate like arrayvec or tinyvec an optional dependency of der so it can implement much of the boilerplate below.

There are a few places we use fixed-sized buffers like this where it would be nice, I believe.

@tarcieri tarcieri force-pushed the pkcs5/remove-lifetimes branch from 2b1e55d to 057cee0 Compare August 9, 2023 02:55
@baloo
Copy link
Member

baloo commented Aug 9, 2023

Ha, well. That makes it easy, but we lose the *Ref and *Owned aliases.

@tarcieri
Copy link
Member Author

tarcieri commented Aug 9, 2023

No need for them if everything can always be owned! Unlike any of the other types these have a fairly fixed upper bound which isn't too big.

I can go ahead and make the changes to the other crates so the tests pass if you're okay with this. I guess you'd need to rebase your changes on this PR to fully split EncryptedPrivateKeyInfo.

I guess we can probably move to making breaking changes soon too.

baloo added a commit to baloo/formats that referenced this pull request Aug 9, 2023
baloo added a commit to baloo/formats that referenced this pull request Aug 9, 2023
@tarcieri tarcieri changed the title [WIP] pkcs5: remove lifetimes pkcs5: remove lifetimes Aug 10, 2023
@tarcieri tarcieri marked this pull request as ready for review August 10, 2023 12:40
@tarcieri tarcieri force-pushed the pkcs5/remove-lifetimes branch from ebe2b2c to 15e5b44 Compare August 28, 2023 20:14
tarcieri and others added 3 commits January 7, 2024 15:38
Removes lifetimes from all types in the `pkcs5` crate, making them own
their data.
@tarcieri tarcieri force-pushed the pkcs5/remove-lifetimes branch from 15e5b44 to 14e9b2d Compare January 7, 2024 22:43
@tarcieri tarcieri force-pushed the pkcs5/remove-lifetimes branch from a5d452e to f7d998d Compare January 7, 2024 22:52
@tarcieri tarcieri merged commit b5d5dcb into master Jan 7, 2024
@tarcieri tarcieri deleted the pkcs5/remove-lifetimes branch January 7, 2024 22:58
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