Skip to content

pkcs5: remove lifetimes - #1195

Merged
tarcieri merged 4 commits into
masterfrom
pkcs5/remove-lifetimes
Jan 7, 2024
Merged

pkcs5: remove lifetimes#1195
tarcieri merged 4 commits into
masterfrom
pkcs5/remove-lifetimes

Conversation

@tarcieri

Copy link
Copy Markdown
Member

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

cc @baloo

@tarcieritarcieri mentioned this pull request Aug 9, 2023
@@ -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
Copy Markdown
MemberAuthor

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
tarcieriforce-pushed the pkcs5/remove-lifetimes branch from 2b1e55d to 057cee0CompareAugust 9, 2023 02:55
@baloo

baloo commented Aug 9, 2023

Copy link
Copy Markdown
Member

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

@tarcieri

Copy link
Copy Markdown
MemberAuthor

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
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
baloo added a commit to baloo/formats that referenced this pull request Aug 9, 2023
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
@tarcieritarcieri changed the title [WIP] pkcs5: remove lifetimespkcs5: remove lifetimesAug 10, 2023
@tarcieri
tarcieri marked this pull request as ready for review August 10, 2023 12:40
@tarcieri
tarcieriforce-pushed the pkcs5/remove-lifetimes branch from ebe2b2c to 15e5b44CompareAugust 28, 2023 20:14
tarcieriand others added 3 commits January 7, 2024 15:38
Removes lifetimes from all types in the `pkcs5` crate, making them own
their data.
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
@tarcieri
tarcieriforce-pushed the pkcs5/remove-lifetimes branch from 15e5b44 to 14e9b2dCompareJanuary 7, 2024 22:43
@tarcieri
tarcieriforce-pushed the pkcs5/remove-lifetimes branch from a5d452e to f7d998dCompareJanuary 7, 2024 22:52
@tarcieri
tarcieri merged commit b5d5dcb into masterJan 7, 2024
@tarcieri
tarcieri deleted the pkcs5/remove-lifetimes branch January 7, 2024 22:58
@tarcieritarcieri mentioned this pull request Apr 24, 2026
Sign up for freeto 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.

2 participants

@tarcieri@baloo