Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cryptographic Message Syntax ASN.1 de/serialisation #14

Merged
merged 4 commits into from
Feb 2, 2023
Merged

Conversation

dnadoba
Copy link
Member

@dnadoba dnadoba commented Feb 2, 2023

No description provided.

@dnadoba dnadoba marked this pull request as ready for review February 2, 2023 10:53

// TODO: support multiple signer infos. For this we need to validate that the binary representation of each element is lexicographically sorted.
guard signerInfos.count <= 1 else {
throw Error.multipleDigestAlgorithmsAreNotSupportedYet
Copy link
Contributor

Choose a reason for hiding this comment

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

Presumably this was meant to be the signer infos error.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch! Thanks. Fixed in c33a826

enum CMSSignerIdentifier {
enum CMSSignerIdentifier: DERParseable, DERSerializable, Hashable {

private static let subjectKeyIdentifierIdentifier = ASN1Identifier(tagWithNumber: 0, tagClass: .contextSpecific)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe call this skiIdentifier, repeating the word identifier feels weird here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree, changed in c33a826

@dnadoba dnadoba merged commit 3a6e5c8 into main Feb 2, 2023
@dnadoba dnadoba deleted the dn-cms-asn1 branch February 2, 2023 14:44
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.

2 participants