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

Feature: Support for RFC 7508 #489

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Allow to specify generic attributes by OID
  • Loading branch information
August Johann committed Jun 10, 2021
commit b6646a5e93daba052ed98e641b77ebe40efe8b4f
8 changes: 8 additions & 0 deletions src/asn1cms-1.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,10 @@ extendClass(KJUR.asn1.cms.SubjectKeyIdentifier, KJUR.asn1.ASN1Object);
* array: [{
* attr: "contentType",
* type: "data"
* },{
* attr: "oid",
* oid: "1.2.840.113549.1.9.16.2.80",
* value: { set: [{ set: [{enum: int 1}] }] }
* }],
* sortflag: false
* })
Expand Down Expand Up @@ -1050,6 +1054,10 @@ KJUR.asn1.cms.AttributeList = function(params) {
} else if (attrName == "signatureTimeStamp" ||
attrName == "timeStampToken") {
a.push(new KJUR.asn1.cades.SignatureTimeStamp(pAttr));
} else if (attrName == "oid") {
if (pAttr.oid == undefined || pAttr.value == undefined)
throw new _Error("missing oid or value attribute");
a.push(KJUR.asn1.ASN1Util.newObject({seq: [{"oid": pAttr.oid, pAttr.value}]));
} else {
throw new _Error("unknown attr: " + attrName);
}
Expand Down