This repository was archived by the owner on Aug 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
This repository was archived by the owner on Aug 12, 2025. It is now read-only.
AllSignedDataObjects - undefined ? #137
Copy link
Copy link
Open
Description
Thank you for developing such a useful library.
Regarding the output part of "AllSignedDataObjects", I would like you to check if there are any problems with the logic.
I am trying to generate the following output using XML signatures with xadesjs.
<xades:SignedDataObjectProperties>
<xades:CommitmentTypeIndication>
<xades:CommitmentTypeId>
<xades:Identifier Qualifier="OIDAsURN">urn:oid:1.2.840.113549.1.9.16.6.1</xades:Identifier>
</xades:CommitmentTypeId>
<xades:AllSignedDataObjects/>
</xades:CommitmentTypeIndication>
</xades:SignedDataObjectProperties>
#Here is the relevant code snippet:
const commitmentTypeIndication = new xadesjs.xml.CommitmentTypeIndication();
commitmentTypeIndication.CommitmentTypeId.Identifier.Qualifier = "OIDAsURN";
commitmentTypeIndication.CommitmentTypeId.Identifier.Value = ["urn:oid:1.2.840.113549.1.9.16.6.1"];
commitmentTypeIndication.AllSignedDataObjects = true;
commitmentTypeIndication.MimeType = "text/xml";
signedXml.SignedProperties.SignedDataObjectProperties.DataObjectFormats.Add(commitmentTypeIndication);
// (omission)
signedDocument = signedXml.Sign( (omission) );
When I put some value into commitmentTypeIndication.AllSignedDataObjects
I get <xades:AllSignedDataObjects>undefined</xades:AllSignedDataObjects>
in the output.
However, it always appears as
<xades:AllSignedDataObjects>undefined</xades:AllSignedDataObjects>
No matter what value I enter, "undefined" is output.
Is this "undefined" behavior intentional?
ーーー
#Actual_Output
<xades:SignedDataObjectProperties>
<xades:CommitmentTypeIndication>
<xades:CommitmentTypeId>
<xades:Identifier Qualifier="OIDAsURN">urn:oid:1.2.840.113549.1.9.16.6.1</xades:Identifier>
</xades:CommitmentTypeId>
<xades:AllSignedDataObjects>undefined</xades:AllSignedDataObjects>
</xades:CommitmentTypeIndication>
</xades:SignedDataObjectProperties>
Metadata
Metadata
Assignees
Labels
No labels