Skip to content

Commit

Permalink
feat: Update ASN.1 schema for SignerInfo.sid
Browse files Browse the repository at this point in the history
- Support Primitive and Constructed types for KeyIdentifier
  • Loading branch information
microshine committed Aug 27, 2021
1 parent d4fb4b9 commit fee3e79
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions src/SignerInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,28 @@ export default class SignerInfo
blockName: "SignerInfo.sid"
}
}),
new asn1js.Primitive({
optional: true,
name: (names.sid || "SignerInfo.sid"),
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 0 // [0]
},
value: [new asn1js.OctetString()]
})
new asn1js.Choice({
value: [
new asn1js.Constructed({
optional: true,
name: (names.sid || "SignerInfo.sid"),
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 0 // [0]
},
value: [new asn1js.OctetString()]
}),
new asn1js.Primitive({
optional: true,
name: (names.sid || "SignerInfo.sid"),
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 0 // [0]
},
value: [new asn1js.OctetString()]
}),
]
}),
]
}),
AlgorithmIdentifier.schema(names.digestAlgorithm || {
Expand Down

0 comments on commit fee3e79

Please sign in to comment.