Skip to content

der: Document and SecretDocument types - #571

Merged
tarcieri merged 1 commit into
masterfrom
der/document-types
Apr 5, 2022
Merged

der: Document and SecretDocument types#571
tarcieri merged 1 commit into
masterfrom
der/document-types

Conversation

@tarcieri

Copy link
Copy Markdown
Member

Replaces the previous Document trait with types for wrapping serialized ASN.1 DER SEQUENCEs stored on the heap.

The SecretDocument is composed in terms of Document and provides some additional hardening for sensitive data, namely zeroize-on-drop and file permissions hardening when writing to disk.

This commit also removes all of the format-specific *Document types found in the pkcs1, pkcs8, spki, and sec1 crates with the new Document and SecretDocument types.

@tarcieri
tarcieriforce-pushed the der/document-types branch 4 times, most recently from ce80f42 to 156e8a4CompareApril 2, 2022 17:05
@tarcieri
tarcieriforce-pushed the der/document-types branch 2 times, most recently from d4da146 to 7e991f5CompareApril 3, 2022 17:53
@tarcieritarcieri changed the title [WIP] der: Document and SecretDocument typesder: Document and SecretDocument typesApr 3, 2022
@tarcieri
tarcieri marked this pull request as ready for review April 3, 2022 17:53
@tarcieri
tarcieriforce-pushed the der/document-types branch from 7e991f5 to 933122eCompareApril 3, 2022 18:05
@tarcieri

Copy link
Copy Markdown
MemberAuthor

Removing WIP/draft.

The core implementation is effectively done, although could probably use some additional work to reduce repetitiveness. Still, this removes quite a bit of duplicated code from the original implementation.

I'm going to continue adding additional/replacement tests for the format-specific Decode*/Encode* traits.

cc @bstrie@npmccallum

@tarcieri
tarcieriforce-pushed the der/document-types branch from 933122e to 3d998bcCompareApril 3, 2022 18:23
@@ -1,97 +0,0 @@
//! CertificateDocument implementation

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.

@carl-wallace FYI, ended up removing this along with all of the format-specific *Document types. Hope the Document type works for your use cases

@tarcieri
tarcieriforce-pushed the der/document-types branch 3 times, most recently from bf3ca08 to 4ad135fCompareApril 4, 2022 23:48
Replaces the previous `Document` trait with types for wrapping
serialized ASN.1 DER SEQUENCEs stored on the heap.
The `SecretDocument` is composed in terms of `Document` and provides
some additional hardening for sensitive data, namely zeroize-on-drop and
file permissions hardening when writing to disk.
This commit also removes all of the format-specific `*Document` types
found in the `pkcs1`, `pkcs8`, `spki`, and `sec1` crates with the new
`Document` and `SecretDocument` types.
@tarcieri
tarcieriforce-pushed the der/document-types branch from 4ad135f to 7104154CompareApril 4, 2022 23:59
@tarcieri
tarcieri merged commit 71bb668 into masterApr 5, 2022
@tarcieri
tarcieri deleted the der/document-types branch April 5, 2022 12:29
@tarcieritarcieri mentioned this pull request Apr 6, 2022
This was referenced May 8, 2022
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.

1 participant

@tarcieri