@owf/eudi-tl 0.7.0 → 0.7.1-alpha-20261117104856
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +79 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -162,7 +162,11 @@ const { signerCertificateBase64 } = await verifyTrustedListSignature(xml, {
|
|
|
162
162
|
|
|
163
163
|
The signature must verify with the key of a pinned certificate in its
|
|
164
164
|
`KeyInfo`, and the list must have exactly one `ds:Signature`, as a child of its
|
|
165
|
-
root.
|
|
165
|
+
root. Before any transform runs, the signature is checked against the profile of
|
|
166
|
+
ETSI TS 119 612 Annex B: it may only use the enveloped-signature transform and
|
|
167
|
+
canonicalization, each once per reference, and it must reference the
|
|
168
|
+
`TrustServiceStatusList` itself (`URI=""` or the `Id` of the root) and otherwise
|
|
169
|
+
only its XAdES `SignedProperties`. Without `trustAnchors`, only the cryptographic validity of the enveloped
|
|
166
170
|
signature is checked — that proves integrity, not trust. Production callers
|
|
167
171
|
should always pin the scheme operator certificate(s); `loadTrustedList` requires
|
|
168
172
|
them.
|
package/dist/index.d.mts
CHANGED
|
@@ -296,9 +296,10 @@ interface VerifyTrustedListResult {
|
|
|
296
296
|
/**
|
|
297
297
|
* Verify the enveloped XAdES/XMLDSig signature of an ETSI TS 119 612 Trusted
|
|
298
298
|
* List. Throws {@link TrustedListSignatureError} when the signature is
|
|
299
|
-
* missing, invalid, not the only `ds:Signature` of the list,
|
|
300
|
-
*
|
|
301
|
-
*
|
|
299
|
+
* missing, invalid, not the only `ds:Signature` of the list, uses a transform
|
|
300
|
+
* other than the enveloped signature and canonicalization, does not reference
|
|
301
|
+
* the list itself, or (with `trustAnchors`) is not verified by the key of a
|
|
302
|
+
* pinned scheme operator certificate.
|
|
302
303
|
*
|
|
303
304
|
* Verified against a standard eIDAS national trusted list (RSA-SHA512,
|
|
304
305
|
* exclusive C14N, XAdES SignedProperties).
|
package/dist/index.mjs
CHANGED
|
@@ -334,20 +334,20 @@ function validateTrustedListProfile(value, rule) {
|
|
|
334
334
|
return toValidationResult(perRule.some((errors) => errors.length === 0) ? [] : perRule.flat());
|
|
335
335
|
}
|
|
336
336
|
// src/parse.ts
|
|
337
|
-
const TSL_NS = "http://uri.etsi.org/02231/v2#";
|
|
337
|
+
const TSL_NS$1 = "http://uri.etsi.org/02231/v2#";
|
|
338
338
|
const SIE_NS = "http://uri.etsi.org/TrstSvc/SvcInfoExt/eSigDir-1999-93-EC-TrustedList/#";
|
|
339
|
-
function descendants(el, name, ns = TSL_NS) {
|
|
339
|
+
function descendants(el, name, ns = TSL_NS$1) {
|
|
340
340
|
return Array.from(el.getElementsByTagNameNS(ns, name));
|
|
341
341
|
}
|
|
342
|
-
function firstDescendant(el, name, ns = TSL_NS) {
|
|
342
|
+
function firstDescendant(el, name, ns = TSL_NS$1) {
|
|
343
343
|
return descendants(el, name, ns)[0];
|
|
344
344
|
}
|
|
345
345
|
/** The direct child elements with the name, so nested elements of the same name are not taken */
|
|
346
|
-
function children(el, name, ns = TSL_NS) {
|
|
346
|
+
function children(el, name, ns = TSL_NS$1) {
|
|
347
347
|
return Array.from(el?.childNodes ?? []).filter((n) => n.namespaceURI === ns && n.localName === name);
|
|
348
348
|
}
|
|
349
349
|
/** The first direct child element with the name, so a nested element of the same name is not taken */
|
|
350
|
-
function child(el, name, ns = TSL_NS) {
|
|
350
|
+
function child(el, name, ns = TSL_NS$1) {
|
|
351
351
|
return children(el, name, ns)[0];
|
|
352
352
|
}
|
|
353
353
|
function textOf(el) {
|
|
@@ -360,7 +360,7 @@ function textOf(el) {
|
|
|
360
360
|
*/
|
|
361
361
|
function localizedName(parent) {
|
|
362
362
|
if (!parent) return void 0;
|
|
363
|
-
const names = Array.from(parent.childNodes).filter((n) => n.namespaceURI === TSL_NS && n.localName === "Name");
|
|
363
|
+
const names = Array.from(parent.childNodes).filter((n) => n.namespaceURI === TSL_NS$1 && n.localName === "Name");
|
|
364
364
|
if (names.length === 0) return void 0;
|
|
365
365
|
return textOf(names.find((n) => n.getAttribute("xml:lang") === "en") ?? names[0]);
|
|
366
366
|
}
|
|
@@ -595,6 +595,74 @@ const TrustedListProfiles = {
|
|
|
595
595
|
};
|
|
596
596
|
// src/verify.ts
|
|
597
597
|
const XMLDSIG_NS = "http://www.w3.org/2000/09/xmldsig#";
|
|
598
|
+
const TSL_NS = "http://uri.etsi.org/02231/v2#";
|
|
599
|
+
const XADES_NS = "http://uri.etsi.org/01903/v1.3.2#";
|
|
600
|
+
const SIGNED_PROPERTIES_TYPE = "http://uri.etsi.org/01903#SignedProperties";
|
|
601
|
+
/** Canonicalization methods: exclusive C14N, C14N 1.0 and C14N 1.1, with and without comments. */
|
|
602
|
+
const CANONICALIZATIONS = /* @__PURE__ */ new Set([
|
|
603
|
+
"http://www.w3.org/2001/10/xml-exc-c14n#",
|
|
604
|
+
"http://www.w3.org/2001/10/xml-exc-c14n#WithComments",
|
|
605
|
+
"http://www.w3.org/TR/2001/REC-xml-c14n-20010315",
|
|
606
|
+
"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments",
|
|
607
|
+
"http://www.w3.org/2006/12/xml-c14n11",
|
|
608
|
+
"http://www.w3.org/2006/12/xml-c14n11#WithComments"
|
|
609
|
+
]);
|
|
610
|
+
const ENVELOPED_SIGNATURE = "http://www.w3.org/2000/09/xmldsig#enveloped-signature";
|
|
611
|
+
/** Transforms of a reference: the enveloped signature and canonicalization. */
|
|
612
|
+
const TRANSFORMS = /* @__PURE__ */ new Set([ENVELOPED_SIGNATURE, ...CANONICALIZATIONS]);
|
|
613
|
+
/** The elements with this `Id`, `ID` or `id`: the attributes by which xmldsigjs resolves a `#` reference. */
|
|
614
|
+
function elementsWithId(doc, id) {
|
|
615
|
+
return Array.from(doc.getElementsByTagName("*")).filter((element) => [
|
|
616
|
+
"Id",
|
|
617
|
+
"ID",
|
|
618
|
+
"id"
|
|
619
|
+
].some((name) => element.hasAttribute(name) && element.getAttribute(name) === id));
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* Check the signature against the profile of ETSI TS 119 612 before xmldsigjs verifies it.
|
|
623
|
+
*
|
|
624
|
+
* xmldsigjs applies the transforms of every reference to the document before it checks the signature value, so whoever
|
|
625
|
+
* serves the list chooses what runs: the XPath transform, evaluated once per node, takes quadratic time on a large
|
|
626
|
+
* list (XML Signature Best Practices section 2.1). Only the enveloped-signature transform and canonicalization are
|
|
627
|
+
* accepted, each at most once per reference, as each runs on the whole referenced element, and xmldsigjs searches the
|
|
628
|
+
* whole document for the target of each `#` reference.
|
|
629
|
+
*
|
|
630
|
+
* ETSI TS 119 612 V2.4.1 Annex B.1.0: the signature references the `TrustServiceStatusList` that envelops it. A `#`
|
|
631
|
+
* reference resolves to any element with that `Id`, so a list signed by reference to another element, or with an `Id`
|
|
632
|
+
* that occurs twice, could be wrapped into another root, whose content `parseTrustedList` would then read (XML
|
|
633
|
+
* Signature Best Practices section 3.1). So one reference is `URI=""` or the `Id` of the root, which no other element
|
|
634
|
+
* has, and at most one other reference is to the XAdES `SignedProperties` of the signature.
|
|
635
|
+
*/
|
|
636
|
+
function assertSignatureProfile(doc, signature) {
|
|
637
|
+
const root = doc.documentElement;
|
|
638
|
+
if (root?.namespaceURI !== TSL_NS || root.localName !== "TrustServiceStatusList" || doc.getElementsByTagNameNS(TSL_NS, "TrustServiceStatusList").length !== 1) throw new TrustedListSignatureError("The trusted list must be the root and the only TrustServiceStatusList");
|
|
639
|
+
for (const method of Array.from(signature.getElementsByTagNameNS(XMLDSIG_NS, "CanonicalizationMethod"))) {
|
|
640
|
+
const algorithm = method.getAttribute("Algorithm") ?? "";
|
|
641
|
+
if (!CANONICALIZATIONS.has(algorithm)) throw new TrustedListSignatureError(`Trusted list signature uses the canonicalization ${JSON.stringify(algorithm)}, which is not allowed`);
|
|
642
|
+
}
|
|
643
|
+
for (const transform of Array.from(signature.getElementsByTagNameNS(XMLDSIG_NS, "Transform"))) {
|
|
644
|
+
const algorithm = transform.getAttribute("Algorithm") ?? "";
|
|
645
|
+
if (!TRANSFORMS.has(algorithm)) throw new TrustedListSignatureError(`Trusted list signature uses the transform ${JSON.stringify(algorithm)}, which is not allowed`);
|
|
646
|
+
}
|
|
647
|
+
const signedInfo = Array.from(signature.childNodes).find((node) => node.namespaceURI === XMLDSIG_NS && node.localName === "SignedInfo");
|
|
648
|
+
const references = Array.from(signedInfo?.getElementsByTagNameNS(XMLDSIG_NS, "Reference") ?? []);
|
|
649
|
+
if (references.length > 2) throw new TrustedListSignatureError("Trusted list signature has more than two references");
|
|
650
|
+
const rootId = root.getAttribute("Id");
|
|
651
|
+
let referencesList = false;
|
|
652
|
+
for (const reference of references) {
|
|
653
|
+
const algorithms = Array.from(reference.getElementsByTagNameNS(XMLDSIG_NS, "Transform")).map((transform) => transform.getAttribute("Algorithm"));
|
|
654
|
+
if (algorithms.filter((algorithm) => algorithm === ENVELOPED_SIGNATURE).length > 1 || algorithms.filter((algorithm) => algorithm && CANONICALIZATIONS.has(algorithm)).length > 1) throw new TrustedListSignatureError("Trusted list signature applies the enveloped-signature transform or a canonicalization twice to a reference");
|
|
655
|
+
const uri = reference.getAttribute("URI");
|
|
656
|
+
if (uri === "" || rootId && uri === `#${rootId}` && elementsWithId(doc, rootId).length === 1) {
|
|
657
|
+
if (referencesList) throw new TrustedListSignatureError("Trusted list signature references the list twice");
|
|
658
|
+
referencesList = true;
|
|
659
|
+
continue;
|
|
660
|
+
}
|
|
661
|
+
const targets = reference.getAttribute("Type") === SIGNED_PROPERTIES_TYPE && uri?.startsWith("#") ? elementsWithId(doc, uri.slice(1)) : [];
|
|
662
|
+
if (targets.length !== 1 || targets[0].namespaceURI !== XADES_NS || targets[0].localName !== "SignedProperties") throw new TrustedListSignatureError(`Trusted list signature references ${JSON.stringify(uri)}, which is neither the list nor its signed properties`);
|
|
663
|
+
}
|
|
664
|
+
if (!referencesList) throw new TrustedListSignatureError("Trusted list signature does not reference the list");
|
|
665
|
+
}
|
|
598
666
|
let nodeDependenciesInitialized = false;
|
|
599
667
|
let installedCrypto;
|
|
600
668
|
/**
|
|
@@ -662,9 +730,10 @@ var SignerCertificateSignedXml = class extends xadesjs.SignedXml {
|
|
|
662
730
|
/**
|
|
663
731
|
* Verify the enveloped XAdES/XMLDSig signature of an ETSI TS 119 612 Trusted
|
|
664
732
|
* List. Throws {@link TrustedListSignatureError} when the signature is
|
|
665
|
-
* missing, invalid, not the only `ds:Signature` of the list,
|
|
666
|
-
*
|
|
667
|
-
*
|
|
733
|
+
* missing, invalid, not the only `ds:Signature` of the list, uses a transform
|
|
734
|
+
* other than the enveloped signature and canonicalization, does not reference
|
|
735
|
+
* the list itself, or (with `trustAnchors`) is not verified by the key of a
|
|
736
|
+
* pinned scheme operator certificate.
|
|
668
737
|
*
|
|
669
738
|
* Verified against a standard eIDAS national trusted list (RSA-SHA512,
|
|
670
739
|
* exclusive C14N, XAdES SignedProperties).
|
|
@@ -680,6 +749,7 @@ async function verifyTrustedListSignature(xml, options = {}) {
|
|
|
680
749
|
const signatures = doc.getElementsByTagNameNS(XMLDSIG_NS, "Signature");
|
|
681
750
|
if (signatures.length === 0) throw new TrustedListSignatureError("No ds:Signature found in the trusted list");
|
|
682
751
|
if (signatures.length > 1 || signatures[0].parentNode !== doc.documentElement) throw new TrustedListSignatureError("The trusted list must have exactly one ds:Signature, as a child of its root");
|
|
752
|
+
assertSignatureProfile(doc, signatures[0]);
|
|
683
753
|
const signedXml = new SignerCertificateSignedXml(doc);
|
|
684
754
|
signedXml.LoadXml(signatures[0]);
|
|
685
755
|
const certificates = signedXml.keyInfoCertificates();
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/constants.ts","../src/eu-lotl-anchors.ts","../src/trusted-list-error.ts","../src/types.ts","../src/validate.ts","../src/parse.ts","../src/profiles.ts","../src/verify.ts","../src/eu-lotl.ts","../src/index.ts"],"sourcesContent":["/**\n * Well-known ETSI TS 119 612 URIs.\n *\n * These are the standard values used by eIDAS national trusted lists. Profiled\n * lists may use their own profile-specific URIs (validated via a caller-supplied\n * {@link ProfileRule}); this library's parser is agnostic to both.\n */\n\n/** Standard `TSLType` values (TS 119 612 clause 5.3.3). */\nexport const TslType = {\n EUgeneric: 'http://uri.etsi.org/TrstSvc/TrustedList/TSLType/EUgeneric',\n EUlistofthelists: 'http://uri.etsi.org/TrstSvc/TrustedList/TSLType/EUlistofthelists',\n} as const\n\n/** Standard `ServiceStatus` values (TS 119 612 clause 5.5.4). */\nexport const ServiceStatus = {\n Granted: 'http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/granted',\n Withdrawn: 'http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/withdrawn',\n UnderSupervision: 'http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/undersupervision',\n SupervisionCeased: 'http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/supervisionceased',\n SupervisionInCessation: 'http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/supervisionincessation',\n Accredited: 'http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/accredited',\n AccreditationCeased: 'http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/accreditationceased',\n AccreditationRevoked: 'http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/accreditationrevoked',\n SetByNationalLaw: 'http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/setbynationallaw',\n RecognisedAtNationalLevel: 'http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/recognisedatnationallevel',\n DeprecatedAtNationalLevel: 'http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/deprecatedatnationallevel',\n} as const\n\n/**\n * Service statuses that denote a currently active / trustworthy service under\n * TS 119 612. Use as the `serviceStatus` filter when extracting trust anchors\n * from a standard eIDAS list; withdrawn/ceased services are excluded.\n */\nexport const ACTIVE_SERVICE_STATUSES: string[] = [\n ServiceStatus.Granted,\n ServiceStatus.UnderSupervision,\n ServiceStatus.Accredited,\n ServiceStatus.SetByNationalLaw,\n ServiceStatus.RecognisedAtNationalLevel,\n]\n\n/** Common standard `ServiceTypeIdentifier` values (TS 119 612 Annex D). */\nexport const ServiceType = {\n /** Qualified certificate CA. */\n CA_QC: 'http://uri.etsi.org/TrstSvc/Svctype/CA/QC',\n /** Public key certificate CA. */\n CA_PKC: 'http://uri.etsi.org/TrstSvc/Svctype/CA/PKC',\n /** Qualified timestamping authority. */\n TSA_QTST: 'http://uri.etsi.org/TrstSvc/Svctype/TSA/QTST',\n /** Qualified electronic delivery service. */\n EDS_Q: 'http://uri.etsi.org/TrstSvc/Svctype/EDS/Q',\n /** Qualified registered electronic mail delivery service. */\n EDS_REM_Q: 'http://uri.etsi.org/TrstSvc/Svctype/EDS/REM/Q',\n /** Qualified preservation service for electronic signatures/seals. */\n PSES_Q: 'http://uri.etsi.org/TrstSvc/Svctype/PSES/Q',\n /** Qualified validation service for qualified electronic signatures. */\n QESValidation_Q: 'http://uri.etsi.org/TrstSvc/Svctype/QESValidation/Q',\n /** OCSP responder for qualified certificates. */\n OCSP_QC: 'http://uri.etsi.org/TrstSvc/Svctype/Certstatus/OCSP/QC',\n} as const\n","/**\n * EU List of Trusted Lists (LOTL) signing certificates — GENERATED by\n * `scripts/refresh-lotl-anchors.mts`, do not edit by hand.\n *\n * These are the certificates the European Commission publishes as the signers\n * of the LOTL. They are the out-of-band trust anchor of the whole eIDAS trusted\n * list hierarchy: the set cannot be derived from the LOTL alone (a forged list\n * would carry a forged self-pointer), so it is pinned here and cross-checked\n * against the Official Journal publication referenced below.\n *\n * Source list: https://ec.europa.eu/tools/lotl/eu-lotl.xml\n * Official Journal: https://eur-lex.europa.eu/eli/C/2026/1944/oj\n */\n\n/** One certificate the European Commission publishes as a LOTL signer. */\nexport interface EuLotlSigningCertificate {\n /** base64-encoded DER. */\n certificate: string\n /** Subject distinguished name, for human review of the pinned set. */\n subject: string\n /** Lowercase-hex SHA-256 of the DER, for out-of-band cross-checking. */\n fingerprintSha256: string\n /** Certificate expiry (ISO 8601). */\n notAfter: string\n}\n\n/**\n * The signing certificates published by the LOTL identified in\n * {@link EU_LOTL_ANCHORS_PROVENANCE}. Any of them may sign a future issue of the\n * list, so the whole published set is pinned, not just the current signer.\n */\nexport const EU_LOTL_SIGNING_CERTIFICATES: readonly EuLotlSigningCertificate[] = [\n {\n certificate:\n 'MIIIljCCBn6gAwIBAgIUMkdxaYjTAuT2WRKfmeup7zDClNgwDQYJKoZIhvcNAQENBQAwXzELMAkGA1UEBhMCUFQxKjAoBgNVBAoMIURpZ2l0YWxTaWduIENlcnRpZmljYWRvcmEgRGlnaXRhbDEkMCIGA1UEAwwbRElHSVRBTFNJR04gUVVBTElGSUVEIENBIEcxMB4XDTI1MTIxNzE0MzE1NFoXDTI5MTIxNzE0MzE1NFowggEMMQswCQYDVQQGEwJMVTFDMEEGA1UECww6Q2VydGlmaWNhdGUgUHJvZmlsZSAtIFF1YWxpZmllZCBDZXJ0aWZpY2F0ZSAtIE9yZ2FuaXphdGlvbjExMC8GA1UECwwoRGlyZWN0b3JhdGUtR2VuZXJhbCBmb3IgRGlnaXRhbCBTZXJ2aWNlczEjMCEGA1UEYQwaTEVJWEctMjU0OTAwWk5ZQTFGTFVROVUzOTMxHDAaBgNVBAoME0VVUk9QRUFOIENPTU1JU1NJT04xJDAiBgkqhkiG9w0BCQEWFUVVLVRSVVNUQGVjLmV1cm9wYS5ldTEcMBoGA1UEAwwTRVVST1BFQU4gQ09NTUlTU0lPTjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKJguyStfry/iDbqvGbthdtVqpIyQ3p04V5hVtzWWKERnp5zN4AU3E1ljqKzUFvEtUyzql6c30ntDIJS9LnbCqd7B+YVy+Ad/YXkSx1SNNcwrKMy9WiE/xxGBw3CgM4PI1Xe0wNtLEdV2Ds82ELVnE59vefFC1zN5g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OU=Certificate Profile - Qualified Certificate - Organization, OU=Directorate-General for Digital Services, 2.5.4.97=LEIXG-254900ZNYA1FLUQ9U393, O=EUROPEAN COMMISSION, E=EU-TRUST@ec.europa.eu, CN=EUROPEAN COMMISSION',\n fingerprintSha256: '236103f03a8031ae8f47f9059bf8de38564cdbfebedde4a597d50f8980aa653b',\n notAfter: '2029-12-17T14:31:54.000Z',\n },\n {\n certificate:\n 'MIIH9DCCBdygAwIBAgIUYymXhglnqt2gI4PHVh4juzinht8wDQYJKoZIhvcNAQENBQAwXzELMAkGA1UEBhMCUFQxKjAoBgNVBAoMIURpZ2l0YWxTaWduIENlcnRpZmljYWRvcmEgRGlnaXRhbDEkMCIGA1UEAwwbRElHSVRBTFNJR04gUVVBTElGSUVEIENBIEcxMB4XDTI0MDQyNjEyNDkyMloXDTI3MDQyNjEyNDkyMlowggFKMQswCQYDVQQGEwJHUjE9MDsGA1UECww0Q2VydGlmaWNhdGUgUHJvZmlsZSAtIFF1YWxpZmllZCBDZXJ0aWZpY2F0ZSAtIE1lbWJlcjEjMCEGA1UEYQwaTEVJWEctMjU0OTAwWk5ZQTFGTFVROVUzOTMxHDAaBgNVBAoME0VVUk9QRUFOIENPTU1JU1NJT04xKTAnBgNVBAsMIEVudGl0bGVtZW50IC0gRUMgU1RBVFVUT1JZIFNUQUZGMS0wKwYJKoZIhvcNAQkBFh5hcG9zdG9sb3MuYXBsYWRhc0BlYy5ldXJvcGEuZXUxEDAOBgNVBAQMB0FQTEFEQVMxEjAQBgNVBCoMCUFQT1NUT0xPUzEdMBsGA1UECwwUUmVtb3RlUVNDRE1hbmFnZW1lbnQxGjAYBgNVBAMMEUFQT1NUT0xPUyBBUExBREFTMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsILa9o3bgz0l/dR1R01MhItrd6BLkxakJxlqpnlc1hhT8R3uYGvSVwfsmjQei/YkbjMoNzakjo4voPhUIJBa907TJLGwZSghfkp0+vcg4yeCLodAQatG7iE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nbi5wdC9QRFNfZW4ucGRmEwJlbjAVBggrBgEFBQcLAjAJBgcEAIvsSQEBMBUGCCsGAQUFBwsCMAkGBwQAi+xJAQIwDQYJKoZIhvcNAQENBQADggIBALUt37pV7w5ZwRxBB5PdTGTC+XcWytkuyuRJlVu+hVD5yVC2E+4+EPB2mRUzkjeE2M/3iMpzdwaNHe2YU9lCkoUFtD7VLIEdilfGO0MnXde2BAQN1VAt0s8xLwr3DNATsrtYPbtkQ73WCNqQwuNlg4LCFXHHpzvsKzYmYz+hYgkA8daRZRJdnZx/eX05iYFtShbbz8VamNb+A1L/KmqSrt5iG8d9SLSSq9SbNrntxSLaYDJfOITjhW5KOwlXBJPA+sQDYPngHur1nLWUJg6QB8fo/YwMOTmyIciurp8QzktxfJU1wSZEpd/xZKoDWVDNjJa8p0RFbQs/l7DpP/s57p8PKcntDOvQkYCajpRFLKl/69gKdVkB6nOKHFQCTmAeCDapWsI9+jPCnriywN60ep+MMqedZ/lV8LecbJ/1E+kw6PhC6Rs4MlwmHHCe6BB/9oTK7SWW/CtIZh8ygtJ0+5JlDS/83b0F0JdnZUV2qhlZJlVOROcQljcWs7kYS8vWAqBbccAhYNpaaUh1rnKGqo2jpOo5HXhgSVHNRrC+CylNNDUGAhpgPsAD93ui6JQCjdlSzDkraWZA/GtmdpId0b7IR6HfRBs/QzeA4Rj7ChMMOFxDZPp2t6kEyPb1UOshC79fmoNRkBxmGKqMCPakQiiUoIg/BkLIUVYClIoQ8zsk',\n subject:\n 'C=GR, OU=Certificate Profile - Qualified Certificate - Member, 2.5.4.97=LEIXG-254900ZNYA1FLUQ9U393, O=EUROPEAN COMMISSION, OU=Entitlement - EC STATUTORY STAFF, E=apostolos.apladas@ec.europa.eu, SN=APLADAS, G=APOSTOLOS, OU=RemoteQSCDManagement, CN=APOSTOLOS APLADAS',\n fingerprintSha256: 'b63d416744e7098bf9ec2caa596a93bc2468e37f8284ba65ecc061711bcbaa18',\n notAfter: '2027-04-26T12:49:22.000Z',\n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yyK2F16erDoOWKDV40vxgGEfSwgin6GUhHmzuRDPBQhUW4C7btUFMoAr05UT+v03d9RrnlA5bpKSlKaf2J3EGAfGR1DvvFJ+ZCFaVo+8rtcLpySS3f8ZPCqz3axaO3KeyK4LuJbdZqGArKIF0vNKGR94rr7Pq7OIIHJBuOW9LGQG0r5e8kb/KRLZBsPlHpgPVZc8M3EimqYmIg6hgPf0k+Mxhw5/IC4rikFsMTNa43yBeGrk2pvM8cIZoenmQMgf/1L0+A9Pwol+7CUQfe4Bpj0fr1Acnx/4oPnAKmMDKvXnx91fMW2b7Uen2y11TcijxYuXftq03bx8w/ms/giXYLGciDcwCF7XCXNnGuATW/GxPvOxOwu56ZDrm/oG3zfa4l/tF/S5swoFrzmTDIIM05UzHDUuQAln103BGfEYKo7vw4bNfouHfS28qGWbotUSNzHfOEqeC4LrdN7JmE8q0hZRXLFOIsPtG/S0rEkuoNl3znZPmk8oAy/xa1+3XnH1nJCVmTK0XQYaTPinAAEnDbTqUjD97zmUFEd+ecOctica4DFhQoHtUDYUOzKEKfKHVEG0ApI3dpHzcLiuLXIQl0DBvfy3wspy6HL3A==',\n subject:\n 'C=GR, OU=Certificate Profile - Qualified Certificate - Member, 2.5.4.97=LEIXG-254900ZNYA1FLUQ9U393, O=EUROPEAN COMMISSION, OU=Entitlement - EC STATUTORY STAFF, E=Ioanna.KALOGEROPOULOU@ec.europa.eu, SN=KALOGEROPOULOU, G=IOANNA, OU=RemoteQSCDManagement, CN=IOANNA KALOGEROPOULOU',\n fingerprintSha256: 'c0641c4f7d56c431b1c924742db7fce9c1eef7d7fd212113a2768486b3abcdc5',\n notAfter: '2029-11-23T09:56:41.000Z',\n },\n {\n certificate:\n 'MIIG7zCCBNegAwIBAgIQEAAAAAAAnuXHXttK9Tyf2zANBgkqhkiG9w0BAQsFADBkMQswCQYDVQQGEwJCRTERMA8GA1UEBxMIQnJ1c3NlbHMxHDAaBgNVBAoTE0NlcnRpcG9zdCBOLlYuL1MuQS4xEzARBg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xGIpXLGaJXbzQGSTtyNEYrdENlh71I3OeYdw3xmzU2B3tbaWREOXtj2xjyW2tIv+vvHG6sloR1QkIkGMFfzsT7W5U6ILetv',\n subject: 'C=BE, CN=Patrick Kremer (Signature), SN=Kremer, G=Patrick Jean, 2.5.4.5=72020329970',\n fingerprintSha256: 'd2064fdd70f6982dcc516b86d9d5c56aea939417c624b2e478c0b29de54f8474',\n notAfter: '2028-05-30T23:59:59.000Z',\n },\n {\n certificate:\n 'MIIICDCCBfCgAwIBAgIUSOnGJxOHWc5N+Nk12eZPPCwr7ZYwDQYJKoZIhvcNAQENBQAwXzELMAkGA1UEBhMCUFQxKjAoBgNVBAoMIURpZ2l0YWxTaWduIENlcnRpZmljYWRvcmEgRGlnaXRhbDEkMCIGA1UEAwwbRElHSVRBTFNJR04gUVVBTElGSUVEIENBIEcxMB4XDTI0MDUwNjEyNDUxNloXDTI3MDUwNjEyNDUxNlowggFZMQswCQYDVQQGEwJFUzE9MDsGA1UECww0Q2VydGlmaWNhdGUgUHJvZmlsZSAtIFF1YWxpZmllZCBDZXJ0aWZpY2F0ZSAtIE1lbWJlcjEjMCEGA1UEYQwaTEVJWEctMjU0OTAwWk5ZQTFGTFVROVUzOTMxHDAaBgNVBAoME0VVUk9QRUFOIENPTU1JU1NJT04xKTAnBgNVBAsMIEVudGl0bGVtZW50IC0gRUMgU1RBVFVUT1JZIFNUQUZGMTIwMAYJKoZIhvcNAQkBFiN2aWNlbnRlLmFuZHJldS1uYXZhcnJvQGVjLmV1cm9wYS5ldTEXMBUGA1UEBAwOQU5EUkVVIE5BVkFSUk8xEDAOBgNVBCoMB1ZJQ0VOVEUxHTAbBgNVBAsMFFJlbW90ZVFTQ0RNYW5hZ2VtZW50MR8wHQYDVQQDDBZWSUNFTlRFIEFORFJFVSBOQVZBUlJPMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAveJV7goW3mvqJq2kMT0cnrkFAnT/lyzbgaHVvd5jEMHy6RyoI1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WcxLmRpZ2l0YWxzaWduLnB0L1BEU19wdC5wZGYTAnB0MC4WKGh0dHBzOi8vcWNhLWcxLmRpZ2l0YWxzaWduLnB0L1BEU19lbi5wZGYTAmVuMBUGCCsGAQUFBwsCMAkGBwQAi+xJAQEwFQYIKwYBBQUHCwIwCQYHBACL7EkBAjANBgkqhkiG9w0BAQ0FAAOCAgEAHBjW4N8NKNCiJot414m/L76pB/15LKiGDi1/2V7MHe8u2GcplR1IjESrSEhhwUAW1hwDIK9xJrJ/hdDUMIQcKScSiJCqTCb0Yk39yj/gfOYaN/3fqw8Pjh9k++3Ox7KnvY3R/foFvGJlyiuqaai/JgBmc4qDBHSIDyo5gRw6v70osRPDR5sJs4Xh3FOJn9Y0JZPLF/skYtLrNVysL/4A4bbAxB2DcJ5MpoIegh/fnJ5s2BOVq2Xq8ADpeJoLFYbtlbP7NwsGgew2wKiDW963MlJL/Xa2AqcPVE/UnXFkIBCwZH+covxSEQH2iVcF8cEDHBiYHGERaSmL/uHK/F8soDO9VQwtKNxsiIKAWsQHTYcKfEgVuweyLj7TsCmh6T4pIHqaNDqWvrgEIo0ZwuBmfXVEd+JMSzSgIcJ2bPR2KNoJ14MO4FFYdAAnVlfdhipErsK6R23hlto7b3XKiMRUt9xrvPUjuEJdGI5hPm9CqGK1GxlRoKLewyX7A+OIcPMPu1KfuuUTUn+3hLJJZO5H9k4uVMJ/FOhwzc2VhRpyvNjfmFZksFvseFGvMl5EWIqp3JCo0ItkOBG59ulBwg/99Y0pT6LW9cviTzKIwDtHmQrIgYLa+lCYwWdGhIidXynvLpWiVRZJvYrPIGpzQCRcw9V2i8zT7nksj7QF9v88kto=',\n subject:\n 'C=ES, OU=Certificate Profile - Qualified Certificate - Member, 2.5.4.97=LEIXG-254900ZNYA1FLUQ9U393, O=EUROPEAN COMMISSION, OU=Entitlement - EC STATUTORY STAFF, E=vicente.andreu-navarro@ec.europa.eu, SN=ANDREU NAVARRO, G=VICENTE, OU=RemoteQSCDManagement, CN=VICENTE ANDREU NAVARRO',\n fingerprintSha256: 'df7e29360c34b2b8d6d5f40325c1d4d12c9922cecd33b7407674a74b2b3ca1e5',\n notAfter: '2027-05-06T12:45:16.000Z',\n },\n {\n certificate:\n 'MIIIoDCCBoigAwIBAgIUc8IcSUtVEKAMMvHm9QWU05kXsPUwDQYJKoZIhvcNAQENBQAwXzELMAkGA1UEBhMCUFQxKjAoBgNVBAoMIURpZ2l0YWxTaWduIENlcnRpZmljYWRvcmEgRGlnaXRhbDEkMCIGA1UEAwwbRElHSVRBTFNJR04gUVVBTElGSUVEIENBIEcxMB4XDTIzMTExNzEwMTE0NloXDTI3MTExNzEwMTE0NlowggEVMQswCQYDVQQGEwJMVTFDMEEGA1UECww6Q2VydGlmaWNhdGUgUHJvZmlsZSAtIFF1YWxpZmllZCBDZXJ0aWZpY2F0ZSAtIE9yZ2FuaXphdGlvbjE5MDcGA1UECwwwRGlyZWN0b3JhdGUtR2VuZXJhbCBmb3IgRGlnaXRhbCBTZXJ2aWNlcyAoRElHSVQpMSMwIQYDVQRhDBpMRUlYRy0yNTQ5MDBaTllBMUZMVVE5VTM5MzEcMBoGA1UECgwTRVVST1BFQU4gQ09NTUlTU0lPTjElMCMGCSqGSIb3DQEJARYWZGlnaXQtZG1vQGVjLmV1cm9wYS5ldTEcMBoGA1UEAwwTRVVST1BFQU4gQ09NTUlTU0lPTjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKWYeBA9kYARElGnHoJRNpbby44G+TSJcgHI9QtyXlYjB234hSAYyJvW+gKvoownskrogfUP6GOmQgEFZX335Y0sBwfppVemEoe9H9Aj/cpT14IqdB05V4a88ASRfR0Va1xmQJrDsBZWqZHx0EEHBctIF5BjyTMAcQybha+4AOIotp3dF/7ZA3Cu4GYbN9BuQyyqfqrjMduDzzDjVwKC17aEsLev60C1FnIJ/FVEda3lJSGilD5JyUceTaRcot1rw6gjKrOVhwP/UHfevJ3JCsQsuAzkf7ivzHzYuPPPR9Ussecwr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xY2EtZzEuZGlnaXRhbHNpZ24ucHQvUERTX3B0LnBkZhMCcHQwSwYDVR0fBEQwQjBAoD6gPIY6aHR0cHM6Ly9xY2EtZzEuZGlnaXRhbHNpZ24ucHQvRElHSVRBTFNJR05RVUFMSUZJRURDQUcxLmNybDAdBgNVHQ4EFgQUlO5hwcl9/63issm59r+TIHeJSZwwDgYDVR0PAQH/BAQDAgZAMA0GCSqGSIb3DQEBDQUAA4ICAQCn8qjJhTe3SsD7cB8S8kDzt+CBnJJm7bOFc9t9IU6iKntVtjPU4T+cYiPk8TnT+/w7dBphRzjZCL1sDfSJGQ5JPBw+hBPuvzEqP4xVi5i4Jhg/GpYSaa2+dkFXlKe6Sd+ii/RnwBSnfqVfNZtasj7yX+oujGau5LSUPIkQxDrMie8KjsNtlkFjQDoioGAx8b0u6WyhAuqwEacCznft20Dim3sC7XJw8GHumrnW52rUzl4sbXoTBAt8F1zPCbEbjU0oc8SbFNPIChh+9sHUorEmHIlcg30LBHihkDCx4mK8J60Jybk57D4U2RO29VsJfDmnvNxfJZxfLHEJ2tkh+AMqlJXPDlvXQ+rZ1NmLHrbXkcHOlqR3F8BakTi2Mi5AZZfkfjZjkigEStN6Enaq6gwF7EsslqEKmhSQ8XlhxWSRqljK/cnEUw+NhrvR4WuKlvYmxlCLQj6q89Hh121aUGUhL2L2WCVBjVXqux7s4mvECDzrucl5ilaVT32HO3g8qNLGD5lum53U5v/Nv68ItyHH96unztwBebmgox8giVRdzPhmPrpSfbmeNNDKj1p9SCeOvd3P9jCUvChVvH2P2ZUjc24tWe+tzclsCJi7GbKr6kjHc1jFudjehflAbm1IZAYdDNrhXamnsRVsz7iSH20eygCArlwSQ//WIQZPFrRffg==',\n subject:\n 'C=LU, OU=Certificate Profile - Qualified Certificate - Organization, OU=Directorate-General for Digital Services (DIGIT), 2.5.4.97=LEIXG-254900ZNYA1FLUQ9U393, O=EUROPEAN COMMISSION, E=digit-dmo@ec.europa.eu, CN=EUROPEAN COMMISSION',\n fingerprintSha256: 'e0a620fbb6747362bb933ac44169d676a553444716cf5f31605f12a22b8396b1',\n notAfter: '2027-11-17T10:11:46.000Z',\n },\n]\n\n/** Where this set came from, so the pin can be audited without re-running the script. */\nexport const EU_LOTL_ANCHORS_PROVENANCE = {\n /** The list the certificates were read from. */\n source: 'https://ec.europa.eu/tools/lotl/eu-lotl.xml',\n /** The Official Journal act the LOTL itself references for its signers. */\n officialJournal: 'https://eur-lex.europa.eu/eli/C/2026/1944/oj',\n /** `TSLSequenceNumber` of that list. */\n tslSequenceNumber: 390,\n /** `ListIssueDateTime` of that list. */\n listIssueDateTime: '2026-08-03T13:16:38Z',\n /** Earliest expiry in the set: refresh before this date. */\n earliestNotAfter: '2027-04-26T12:49:22.000Z',\n} as const\n","import { IdentityError, ValidationError } from '@owf/identity-common'\nimport type { TrustedListValidationIssue } from './validate'\n\n/**\n * Base error for all trusted-list processing failures.\n *\n * Extends `IdentityError`, the base every error in these packages shares.\n */\nexport class TrustedListError extends IdentityError {\n // NOTE: declared explicitly rather than passing `{ cause }` to `super`, as the\n // project targets ES2020 and `Error.cause` was only added in ES2022.\n public readonly cause?: unknown\n\n constructor(message: string, options?: { cause?: unknown }) {\n super(message)\n this.name = new.target.name\n this.cause = options?.cause\n }\n}\n\n/**\n * The XML could not be parsed as an ETSI TS 119 612 `TrustServiceStatusList`.\n */\nexport class TrustedListParseError extends TrustedListError {\n constructor(message: string, options?: { cause?: unknown }) {\n super(message, options)\n this.name = 'TrustedListParseError'\n }\n}\n\n/**\n * The parsed list does not conform to the TS 119 612 schema or to a profile, with the\n * `issues` of the validation. The message lists the errors among them.\n */\nexport class TrustedListValidationError extends ValidationError<TrustedListValidationIssue> {}\n\n/**\n * The trusted list's own XAdES/XMLDSig signature is missing, invalid, or does\n * not match a configured trust anchor. Callers MUST treat this as fail-closed:\n * a trusted list whose authenticity cannot be established must not be used to\n * trust credentials.\n */\nexport class TrustedListSignatureError extends TrustedListError {\n constructor(message: string, options?: { cause?: unknown }) {\n super(message, options)\n this.name = 'TrustedListSignatureError'\n }\n}\n","import { z } from 'zod'\n\n/**\n * A service's digital identity (TS 119 612 `ServiceDigitalIdentity`): the\n * `DigitalId` children (X509Certificate, X509SubjectName, X509SKI) that describe\n * one entity are merged here. A standard list may identify a service by subject\n * name and/or key identifier without embedding the full certificate.\n */\nexport const zDigitalIdentity = z.object({\n /** base64-encoded DER of the certificate, when embedded (`X509Certificate`). */\n certificate: z.string().optional(),\n /** `X509SubjectName`, when present. */\n subjectName: z.string().optional(),\n /**\n * Lowercase-hex SubjectKeyIdentifier — derived from the certificate when one\n * is embedded, otherwise from the `X509SKI` element. This is the value a\n * verifier sends to a wallet as an `aki` trusted authority (HAIP).\n */\n subjectKeyIdentifier: z.string().optional(),\n})\nexport type DigitalIdentity = z.infer<typeof zDigitalIdentity>\n\n/** A past status entry for a service (`ServiceHistoryInstance`). */\nexport const zServiceHistoryInstance = z.object({\n serviceTypeIdentifier: z.string().optional(),\n serviceStatus: z.string(),\n statusStartingTime: z.string().optional(),\n})\nexport type ServiceHistoryInstance = z.infer<typeof zServiceHistoryInstance>\n\n/**\n * A trust service (TSPService) entry: its type, status, digital identities,\n * qualifiers, and status history.\n */\nexport const zTrustedListService = z.object({\n /** `ServiceTypeIdentifier` URI. */\n serviceTypeIdentifier: z.string(),\n /** Current `ServiceStatus` URI. */\n serviceStatus: z.string(),\n /** Human-readable service name, if present. */\n serviceName: z.string().optional(),\n /** One entry per `ServiceDigitalIdentity`. */\n digitalIdentities: z.array(zDigitalIdentity),\n /** Qualifier URIs from `Qualifications/QualificationElement/Qualifiers`. */\n qualifiers: z.array(z.string()).optional(),\n /** Prior status entries from `ServiceHistory`. */\n history: z.array(zServiceHistoryInstance).optional(),\n})\nexport type TrustedListService = z.infer<typeof zTrustedListService>\n\n/** A Trust Service Provider (TSP) and the services it operates. */\nexport const zTrustServiceProvider = z.object({\n name: z.string().optional(),\n services: z.array(zTrustedListService),\n})\nexport type TrustServiceProvider = z.infer<typeof zTrustServiceProvider>\n\n/** A pointer to another trusted list (`OtherTSLPointer`), e.g. the EU LOTL. */\nexport const zTrustedListPointer = z.object({\n /** `TSLLocation` URL. */\n location: z.string(),\n /** Pointed-to list `TSLType`, when advertised. */\n tslType: z.string().optional(),\n /** `SchemeTerritory` (country code), when advertised. */\n schemeTerritory: z.string().optional(),\n /**\n * The pointer's `ServiceDigitalIdentities`: the certificates with which the\n * pointed-to list is signed. This is how a list distributes the trust anchors\n * of the lists it points to — the EU LOTL carries, for every national list,\n * the certificate(s) of its scheme operator, so a verifier that trusts the\n * LOTL does not need to pin each national list separately.\n */\n digitalIdentities: z.array(zDigitalIdentity).default([]),\n})\nexport type TrustedListPointer = z.infer<typeof zTrustedListPointer>\n\n/** A parsed ETSI TS 119 612 Trusted List (`TrustServiceStatusList`). */\nexport const zTrustedList = z.object({\n /** `TSLType` URI. */\n tslType: z.string().optional(),\n /** `SchemeOperatorName` (English name when available). */\n schemeOperatorName: z.string().optional(),\n /** `SchemeTerritory`, the country code of the list (e.g. `ES`), or `EU` for the LOTL. */\n schemeTerritory: z.string().optional(),\n /** `TSLSequenceNumber`. */\n sequenceNumber: z.number().optional(),\n /** `ListIssueDateTime` (ISO 8601). */\n listIssueDateTime: z.string().optional(),\n /** `NextUpdate` (ISO 8601), when present. */\n nextUpdate: z.string().optional(),\n providers: z.array(zTrustServiceProvider),\n /** `PointersToOtherTSL` entries (e.g. the EU LOTL). Not followed by v1. */\n pointersToOtherLists: z.array(zTrustedListPointer).optional(),\n})\nexport type TrustedList = z.infer<typeof zTrustedList>\n\n/**\n * A flattened trust anchor: one digital identity with the service context it was\n * published under. The normalized unit both certificate-chain validation and AKI\n * emission consume — the ETSI TS 119 612 counterpart of a `@owf/eudi-lote`\n * TrustedEntity service certificate.\n */\nexport const zTrustAnchor = z.object({\n /** base64 DER certificate, when the identity embeds one. */\n certificate: z.string().optional(),\n subjectName: z.string().optional(),\n subjectKeyIdentifier: z.string().optional(),\n serviceTypeIdentifier: z.string(),\n serviceStatus: z.string(),\n providerName: z.string().optional(),\n})\nexport type TrustAnchor = z.infer<typeof zTrustAnchor>\n","import {\n type ValidationResult as CommonValidationResult,\n parseWithSchema,\n type SchemaValidationCode,\n toValidationResult,\n type ValidationIssueOf,\n ValidationIssues,\n} from '@owf/identity-common'\nimport { TrustedListValidationError } from './trusted-list-error'\nimport { type TrustedList, zTrustedList } from './types'\n\n/**\n * Codes for the profile checks, beyond schema parsing, whose issues have a code of\n * `SCHEMA_VALIDATION_CODES` instead.\n */\nexport const TRUSTED_LIST_VALIDATION_CODES = {\n /** `TSLType` differs from the one of the profile */\n UNEXPECTED_TSL_TYPE: 'unexpected_tsl_type',\n /** A service type identifier the profile does not permit */\n UNEXPECTED_SERVICE_TYPE: 'unexpected_service_type',\n /** A service status the profile does not permit */\n UNEXPECTED_SERVICE_STATUS: 'unexpected_service_status',\n} as const\n\n/** A profile validation code emitted by this validator */\nexport type TrustedListValidationCode =\n (typeof TRUSTED_LIST_VALIDATION_CODES)[keyof typeof TRUSTED_LIST_VALIDATION_CODES]\n\n/** An issue of a trusted list validation, with a code of `SCHEMA_VALIDATION_CODES` for schema issues */\nexport type TrustedListValidationIssue = ValidationIssueOf<TrustedListValidationCode | SchemaValidationCode>\n\n/** Result of a validation, the same as `@owf/eudi-lote`'s ValidationResult */\nexport type ValidationResult = CommonValidationResult<TrustedListValidationIssue>\n\nconst parseTrustedListSchema = (value: unknown) =>\n parseWithSchema(zTrustedList, value, { codes: TRUSTED_LIST_VALIDATION_CODES })\n\n/**\n * Structurally validate an object against the ETSI TS 119 612 trusted-list\n * schema (the same zod-based approach `@owf/eudi-lote` uses for TS 119 602).\n * For XML input, parse it first with `parseTrustedList` (XML → object), then\n * validate the object here.\n */\nexport function validateTrustedList(value: unknown): ValidationResult {\n const result = parseTrustedListSchema(value)\n return toValidationResult(result.success ? [] : result.issues)\n}\n\n/**\n * Structurally validate and return the typed trusted list, throwing\n * {@link TrustedListValidationError} when it does not conform to the schema.\n */\nexport function assertValidTrustedList(value: unknown): TrustedList {\n const result = parseTrustedListSchema(value)\n if (!result.success) throw new TrustedListValidationError('Invalid trusted list', result.issues)\n return result.data\n}\n\n/**\n * A profile constraint set for a trusted list: the expected `TSLType` and the\n * service type / status URIs the profile permits. The zod-based structural\n * schema ({@link validateTrustedList}) is checked first; a profile then narrows\n * a conforming list to a specific ecosystem. Rules are supplied by the caller,\n * so the library stays profile-agnostic (mirrors `@owf/eudi-lote`'s approach).\n */\nexport interface ProfileRule {\n /** Optional label used in error messages. */\n name?: string\n /** Expected `TSLType` (compared scheme-insensitively). */\n tslType: string\n /** Service type URIs the profile permits (scheme-insensitive). */\n serviceTypes: string[]\n /** Service status URIs the profile permits (scheme-insensitive). */\n serviceStatuses: string[]\n}\n\n/**\n * Compare ETSI URIs scheme-insensitively: deployed lists have published the\n * same URI over both `http` and `https`. Internal helper, not part of the\n * package's public API.\n */\nexport const stripScheme = (uri: string | undefined): string => (uri ?? '').replace(/^https?:\\/\\//, '')\n\nfunction profileErrors(trustedList: TrustedList, rule: ProfileRule): TrustedListValidationIssue[] {\n const label = rule.name ?? 'profile'\n const issues = new ValidationIssues<TrustedListValidationCode>()\n const add = (code: TrustedListValidationCode, path: (string | number)[], message: string) =>\n issues.add({ code, path, message: `[${label}] ${message}` })\n\n if (stripScheme(trustedList.tslType) !== stripScheme(rule.tslType)) {\n add(\n TRUSTED_LIST_VALIDATION_CODES.UNEXPECTED_TSL_TYPE,\n ['tslType'],\n `expected TSLType ${rule.tslType}, got ${trustedList.tslType ?? 'none'}`\n )\n }\n\n const allowedTypes = new Set(rule.serviceTypes.map(stripScheme))\n const allowedStatuses = new Set(rule.serviceStatuses.map(stripScheme))\n trustedList.providers.forEach((provider, pi) => {\n provider.services.forEach((service, si) => {\n const servicePath = ['providers', pi, 'services', si]\n if (!allowedTypes.has(stripScheme(service.serviceTypeIdentifier))) {\n add(\n TRUSTED_LIST_VALIDATION_CODES.UNEXPECTED_SERVICE_TYPE,\n [...servicePath, 'serviceTypeIdentifier'],\n `unexpected service type ${service.serviceTypeIdentifier}`\n )\n }\n if (!allowedStatuses.has(stripScheme(service.serviceStatus))) {\n add(\n TRUSTED_LIST_VALIDATION_CODES.UNEXPECTED_SERVICE_STATUS,\n [...servicePath, 'serviceStatus'],\n `unexpected service status ${service.serviceStatus}`\n )\n }\n })\n })\n\n return issues.issues\n}\n\n/**\n * Validate that a trusted list conforms to one (or any, given several) of the\n * supplied profile rules — structural schema first, then profile-specific\n * constraints. Mirrors `@owf/eudi-lote`'s profile validation.\n */\nexport function validateTrustedListProfile(value: unknown, rule: ProfileRule | ProfileRule[]): ValidationResult {\n const structural = validateTrustedList(value)\n if (!structural.valid) return structural\n\n const trustedList = value as TrustedList\n const rules = Array.isArray(rule) ? rule : [rule]\n const perRule = rules.map((r) => profileErrors(trustedList, r))\n return toValidationResult(perRule.some((errors) => errors.length === 0) ? [] : perRule.flat())\n}\n","import { base64, hexEncode } from '@owf/identity-common'\nimport { AsnConvert, type IAsnParseOptions } from '@peculiar/asn1-schema'\nimport { Certificate, id_ce_subjectKeyIdentifier, SubjectKeyIdentifier } from '@peculiar/asn1-x509'\nimport { DOMParser, type Element } from '@xmldom/xmldom'\nimport { TrustedListParseError } from './trusted-list-error'\nimport type {\n DigitalIdentity,\n ServiceHistoryInstance,\n TrustAnchor,\n TrustedList,\n TrustedListPointer,\n TrustedListService,\n TrustServiceProvider,\n} from './types'\nimport { assertValidTrustedList, stripScheme } from './validate'\n\nconst TSL_NS = 'http://uri.etsi.org/02231/v2#'\nconst SIE_NS = 'http://uri.etsi.org/TrstSvc/SvcInfoExt/eSigDir-1999-93-EC-TrustedList/#'\n\nfunction descendants(el: Element, name: string, ns = TSL_NS): Element[] {\n return Array.from(el.getElementsByTagNameNS(ns, name))\n}\n\nfunction firstDescendant(el: Element, name: string, ns = TSL_NS): Element | undefined {\n return descendants(el, name, ns)[0]\n}\n\n/** The direct child elements with the name, so nested elements of the same name are not taken */\nfunction children(el: Element | undefined, name: string, ns = TSL_NS): Element[] {\n return Array.from(el?.childNodes ?? []).filter(\n (n): n is Element => (n as Element).namespaceURI === ns && (n as Element).localName === name\n )\n}\n\n/** The first direct child element with the name, so a nested element of the same name is not taken */\nfunction child(el: Element, name: string, ns = TSL_NS): Element | undefined {\n return children(el, name, ns)[0]\n}\n\nfunction textOf(el: Element | undefined): string | undefined {\n const t = el?.textContent?.trim()\n return t ? t : undefined\n}\n\n/**\n * Localized `Name`: prefer the English entry, else the first, searched only\n * among the direct `Name` children of the given parent.\n */\nfunction localizedName(parent: Element | undefined): string | undefined {\n if (!parent) return undefined\n const names = Array.from(parent.childNodes).filter(\n (n): n is Element => (n as Element).namespaceURI === TSL_NS && (n as Element).localName === 'Name'\n )\n if (names.length === 0) return undefined\n const en = names.find((n) => n.getAttribute('xml:lang') === 'en')\n return textOf(en ?? names[0])\n}\n\n/** Lowercase-hex SubjectKeyIdentifier from a certificate, best-effort. */\nfunction skiFromCertificate(certBase64: string, options?: IAsnParseOptions): string | undefined {\n try {\n const cert = AsnConvert.parse(base64.decode(certBase64), Certificate, options)\n const extension = cert.tbsCertificate.extensions?.find((e) => e.extnID === id_ce_subjectKeyIdentifier)\n if (extension) {\n const ski = AsnConvert.parse(extension.extnValue, SubjectKeyIdentifier, options)\n return hexEncode(new Uint8Array(ski.buffer))\n }\n } catch {\n // Malformed extensions (seen in some reference certificates) — caller\n // falls back to the published X509SKI element if any.\n }\n return undefined\n}\n\n/**\n * One {@link DigitalIdentity} per `ServiceDigitalIdentity`, merging its\n * `DigitalId` children (X509Certificate / X509SubjectName / X509SKI) — a\n * standard list may identify a service without embedding the full certificate.\n */\nfunction parseDigitalIdentities(container: Element, certificateParseOptions?: IAsnParseOptions): DigitalIdentity[] {\n const identities: DigitalIdentity[] = []\n for (const sdi of descendants(container, 'ServiceDigitalIdentity')) {\n let certificate: string | undefined\n let subjectName: string | undefined\n let x509SkiHex: string | undefined\n for (const digitalId of descendants(sdi, 'DigitalId')) {\n certificate ??= textOf(firstDescendant(digitalId, 'X509Certificate'))?.replace(/\\s/g, '')\n subjectName ??= textOf(firstDescendant(digitalId, 'X509SubjectName'))\n const ski = textOf(firstDescendant(digitalId, 'X509SKI'))\n if (ski && !x509SkiHex) {\n x509SkiHex = hexEncode(base64.decode(ski.replace(/\\s/g, '')))\n }\n }\n if (!certificate && !subjectName && !x509SkiHex) continue\n identities.push({\n certificate,\n subjectName,\n subjectKeyIdentifier: certificate\n ? (skiFromCertificate(certificate, certificateParseOptions) ?? x509SkiHex)\n : x509SkiHex,\n })\n }\n return identities\n}\n\nfunction parseQualifiers(serviceInfo: Element): string[] | undefined {\n const uris = descendants(serviceInfo, 'Qualifier', SIE_NS)\n .map((q) => q.getAttribute('uri') ?? '')\n .filter((u) => u.length > 0)\n return uris.length > 0 ? uris : undefined\n}\n\nfunction parseHistory(service: Element): ServiceHistoryInstance[] | undefined {\n const history: ServiceHistoryInstance[] = []\n for (const instance of descendants(service, 'ServiceHistoryInstance')) {\n const serviceStatus = textOf(firstDescendant(instance, 'ServiceStatus'))\n if (!serviceStatus) continue\n history.push({\n serviceTypeIdentifier: textOf(firstDescendant(instance, 'ServiceTypeIdentifier')),\n serviceStatus,\n statusStartingTime: textOf(firstDescendant(instance, 'StatusStartingTime')),\n })\n }\n return history.length > 0 ? history : undefined\n}\n\nfunction parsePointers(\n schemeInfo: Element,\n certificateParseOptions?: IAsnParseOptions\n): TrustedListPointer[] | undefined {\n const pointers: TrustedListPointer[] = []\n for (const pointer of descendants(schemeInfo, 'OtherTSLPointer')) {\n const location = textOf(firstDescendant(pointer, 'TSLLocation'))\n if (!location) continue\n pointers.push({\n location,\n tslType: textOf(firstDescendant(pointer, 'TSLType')),\n schemeTerritory: textOf(firstDescendant(pointer, 'SchemeTerritory')),\n // The pointer's own ServiceDigitalIdentities: the certificate(s) the\n // pointed-to list is signed with.\n digitalIdentities: parseDigitalIdentities(pointer, certificateParseOptions),\n })\n }\n return pointers.length > 0 ? pointers : undefined\n}\n\nexport interface ParseTrustedListOptions {\n /**\n * ASN.1 parse options for the X.509 certificates embedded in the list —\n * `asn1js.fromBER` resource limits (`maxDepth`, `maxNodes`,\n * `maxContentLength`) with which to bound the work done on untrusted input.\n * When omitted, the asn1js defaults apply (maxDepth 100, maxNodes 10000,\n * maxContentLength 16MB).\n *\n * A certificate that exceeds the limits fails to parse like any other\n * malformed one: its `subjectKeyIdentifier` falls back to the `X509SKI`\n * element published alongside it, if any.\n */\n certificateParseOptions?: IAsnParseOptions\n}\n\n/**\n * Parse an ETSI TS 119 612 `TrustServiceStatusList` XML into a normalized\n * {@link TrustedList}. This does NOT verify the list signature — call\n * {@link verifyTrustedListSignature} first (or use {@link loadTrustedList}).\n */\nexport function parseTrustedList(xml: string, options: ParseTrustedListOptions = {}): TrustedList {\n const doc = new DOMParser().parseFromString(xml, 'application/xml')\n const root: Element | null = doc.documentElement\n if (root?.localName !== 'TrustServiceStatusList') {\n throw new TrustedListParseError('Root element is not a TS 119 612 TrustServiceStatusList')\n }\n\n // The signature in the list does not sign its own KeyInfo and ds:Object, apart from the signed properties, so the\n // scheme information and the providers are only read from their place in the list (ETSI TS 119 612 clause 5)\n const schemeInfo = child(root, 'SchemeInformation')\n const sequenceText = textOf(schemeInfo && firstDescendant(schemeInfo, 'TSLSequenceNumber'))\n const nextUpdate = schemeInfo && firstDescendant(schemeInfo, 'NextUpdate')\n\n const providers: TrustServiceProvider[] = []\n for (const tsp of children(child(root, 'TrustServiceProviderList'), 'TrustServiceProvider')) {\n const services: TrustedListService[] = []\n for (const service of descendants(tsp, 'TSPService')) {\n const info = firstDescendant(service, 'ServiceInformation')\n if (!info) continue\n const serviceTypeIdentifier = textOf(firstDescendant(info, 'ServiceTypeIdentifier'))\n const serviceStatus = textOf(firstDescendant(info, 'ServiceStatus'))\n if (!serviceTypeIdentifier || !serviceStatus) continue\n services.push({\n serviceTypeIdentifier,\n serviceStatus,\n serviceName: localizedName(firstDescendant(info, 'ServiceName')),\n digitalIdentities: parseDigitalIdentities(info, options.certificateParseOptions),\n qualifiers: parseQualifiers(info),\n history: parseHistory(service),\n })\n }\n providers.push({\n name: localizedName(firstDescendant(tsp, 'TSPName')),\n services,\n })\n }\n\n // Validate the constructed object through the zod schema, so parsing is\n // schema-driven (the same approach @owf/eudi-lote uses for TS 119 602 JSON).\n return assertValidTrustedList({\n tslType: textOf(schemeInfo && firstDescendant(schemeInfo, 'TSLType')),\n schemeOperatorName: localizedName(schemeInfo && firstDescendant(schemeInfo, 'SchemeOperatorName')),\n // A pointer to another list has a SchemeTerritory as well, so only a direct child is the list's own\n schemeTerritory: textOf(schemeInfo && child(schemeInfo, 'SchemeTerritory')),\n sequenceNumber: sequenceText ? Number(sequenceText) : undefined,\n listIssueDateTime: textOf(schemeInfo && firstDescendant(schemeInfo, 'ListIssueDateTime')),\n nextUpdate: textOf(nextUpdate && firstDescendant(nextUpdate, 'dateTime')),\n providers,\n pointersToOtherLists: schemeInfo ? parsePointers(schemeInfo, options.certificateParseOptions) : undefined,\n })\n}\n\n/** Selects `PointersToOtherTSL` entries in {@link getPointerSigningCertificates}. */\nexport interface TrustedListPointerFilter {\n /** `SchemeTerritory` of the pointed-to list (e.g. `ES`), case-insensitive. */\n schemeTerritory?: string\n /** `TSLType` of the pointed-to list, compared scheme-insensitively. */\n tslType?: string\n /** Exact `TSLLocation` URL of the pointed-to list. */\n location?: string\n}\n\n/**\n * The DER-encoded certificates a list publishes for the lists it points to —\n * i.e. the trust anchors with which those lists are signed, ready to be passed\n * as `trustAnchors` to `verifyTrustedListSignature`.\n *\n * This is the mechanism by which a trusted list distributes trust downwards: a\n * verifier that has established trust in one list (for the EU LOTL, by pinning\n * its signing certificates out of band) obtains the anchors of every list it\n * points to without pinning them individually.\n *\n * ```ts\n * const lotl = await loadTrustedList(lotlXml, { trustAnchors: getEuLotlTrustAnchors() })\n * const esAnchors = getPointerSigningCertificates(lotl, { schemeTerritory: 'ES' })\n * const esList = await loadTrustedList(esXml, { trustAnchors: esAnchors })\n * ```\n *\n * Passing `{ tslType: TslType.EUlistofthelists }` returns the LOTL's own\n * currently published signing certificates (from its self-pointer), which is\n * how a deployment refreshes its pinned set as the scheme operator rotates keys.\n */\nexport function getPointerSigningCertificates(\n trustedList: TrustedList,\n filter: TrustedListPointerFilter = {}\n): Uint8Array[] {\n const certificates: Uint8Array[] = []\n const seen = new Set<string>()\n for (const pointer of trustedList.pointersToOtherLists ?? []) {\n if (filter.location && pointer.location !== filter.location) continue\n if (filter.schemeTerritory && pointer.schemeTerritory?.toUpperCase() !== filter.schemeTerritory.toUpperCase()) {\n continue\n }\n if (filter.tslType && stripScheme(pointer.tslType) !== stripScheme(filter.tslType)) continue\n for (const identity of pointer.digitalIdentities) {\n if (!identity.certificate || seen.has(identity.certificate)) continue\n seen.add(identity.certificate)\n certificates.push(base64.decode(identity.certificate))\n }\n }\n return certificates\n}\n\nexport interface TrustAnchorFilter {\n /**\n * When set, only include services whose `serviceStatus` is in this list\n * (e.g. `ACTIVE_SERVICE_STATUSES`). Withdrawn/deprecated services are\n * excluded.\n */\n serviceStatus?: string[]\n /** When set, only include services whose `serviceTypeIdentifier` matches. */\n serviceTypeIdentifier?: string[]\n /**\n * When true, only include anchors that embed an X.509 certificate (i.e. the\n * ones usable for certificate-chain validation). Defaults to false, which\n * also returns SubjectName/SKI-only identities (useful for AKI queries).\n */\n requireCertificate?: boolean\n}\n\n/**\n * Flatten a {@link TrustedList} into individual {@link TrustAnchor} entries —\n * the normalized unit consumed by certificate-chain validation and AKI\n * emission.\n */\nexport function getTrustAnchors(trustedList: TrustedList, filter: TrustAnchorFilter = {}): TrustAnchor[] {\n const anchors: TrustAnchor[] = []\n for (const provider of trustedList.providers) {\n for (const service of provider.services) {\n if (filter.serviceStatus && !filter.serviceStatus.includes(service.serviceStatus)) {\n continue\n }\n if (filter.serviceTypeIdentifier && !filter.serviceTypeIdentifier.includes(service.serviceTypeIdentifier)) {\n continue\n }\n for (const identity of service.digitalIdentities) {\n if (filter.requireCertificate && !identity.certificate) {\n continue\n }\n anchors.push({\n certificate: identity.certificate,\n subjectName: identity.subjectName,\n subjectKeyIdentifier: identity.subjectKeyIdentifier,\n serviceTypeIdentifier: service.serviceTypeIdentifier,\n serviceStatus: service.serviceStatus,\n providerName: provider.name,\n })\n }\n }\n }\n return anchors\n}\n","import { ServiceStatus, ServiceType, TslType } from './constants'\nimport type { ProfileRule } from './validate'\n\n/** Every standard TS 119 612 service status (clause 5.5.4). */\nconst ALL_SERVICE_STATUSES: string[] = Object.values(ServiceStatus)\n\n/** The standard qualified `ServiceTypeIdentifier` values (Annex D). */\nconst QUALIFIED_SERVICE_TYPES: string[] = Object.values(ServiceType)\n\n/**\n * Ready-made {@link ProfileRule}s for common ETSI ecosystems, so callers don't\n * have to hand-write the URIs. The engine ({@link validateTrustedListProfile})\n * stays profile-agnostic; these are just convenience constants you pass into it.\n *\n * A profile is an allowlist: the structural schema is checked first, then the\n * list's `TSLType` must match and every service's type/status must be permitted.\n * That fits homogeneous, curated lists well (e.g. Age Verification). For a full\n * eIDAS national list — which legitimately carries withdrawn/ceased services and\n * a broad mix of qualified service types — {@link euGeneric} therefore permits\n * all standard ETSI statuses and qualified service types: it asserts \"this is a\n * well-formed EU generic list using standard ETSI URIs\", not \"only currently\n * active CAs\". Narrow further with your own {@link ProfileRule} when you need to.\n */\nexport const TrustedListProfiles = {\n /**\n * EU List of Trusted Lists (LOTL). Its `TSLType` is `EUlistofthelists` and it\n * carries pointers to national lists rather than trust-service providers, so\n * no service type/status is permitted (a conforming LOTL has no TSP services).\n */\n euLotl: {\n name: 'eu-lotl',\n tslType: TslType.EUlistofthelists,\n serviceTypes: [],\n serviceStatuses: [],\n },\n /**\n * A generic EU (eIDAS national) trusted list: `TSLType` `EUgeneric`, any\n * standard qualified service type, any standard service status (including\n * withdrawn/ceased entries that national lists retain for history).\n */\n euGeneric: {\n name: 'eu-generic',\n tslType: TslType.EUgeneric,\n serviceTypes: QUALIFIED_SERVICE_TYPES,\n serviceStatuses: ALL_SERVICE_STATUSES,\n },\n /**\n * EU Age Verification trusted list, per the European Commission's \"AV Trusted\n * List Specifications\" (DIGIT.B.3). The `TSLType` (clause 5.3.3), the single\n * Proof of Age Attestation service type (`paa`, clause 5.5.1) and the two\n * permitted service statuses (clause 5.5.4) are fixed by that specification —\n * which states the statuses \"may be used to the exclusion of any other\", so\n * the allowlist model captures the AV profile exactly. Deployed lists have\n * used `https` for the `TSLType`; the profile compares scheme-insensitively.\n */\n ageVerification: {\n name: 'eu-age-verification',\n tslType: 'http://trust.tech.ec.europa.eu/lists/age-verification/tsl-type',\n serviceTypes: ['http://trust.tech.ec.europa.eu/lists/age-verification/service-type/paa'],\n serviceStatuses: [\n 'http://trust.tech.ec.europa.eu/lists/age-verification/service-status/recognized',\n 'http://trust.tech.ec.europa.eu/lists/age-verification/service-status/deprecated',\n ],\n },\n} satisfies Record<string, ProfileRule>\n","import { base64, compareBytes } from '@owf/identity-common'\nimport { DOMParser, XMLSerializer } from '@xmldom/xmldom'\nimport * as xadesjs from 'xadesjs'\nimport * as xpath from 'xpath'\nimport { TrustedListSignatureError } from './trusted-list-error'\n\nconst XMLDSIG_NS = 'http://www.w3.org/2000/09/xmldsig#'\n\nlet nodeDependenciesInitialized = false\nlet installedCrypto: Crypto | undefined\n\n/**\n * Outside the browser, xml-core resolves DOM/XPath implementations through\n * `setNodeDependencies`. Set lazily and once, so importing this package has no\n * side effects until a signature is actually processed.\n */\nfunction ensureNodeDependencies(): void {\n if (nodeDependenciesInitialized) return\n xadesjs.setNodeDependencies({ DOMParser, XMLSerializer, xpath })\n nodeDependenciesInitialized = true\n}\n\n/**\n * Install the WebCrypto implementation used to verify trusted list signatures\n * (\"bring your own crypto\"), for callers that must route verification through a\n * reviewed or policy-constrained engine. Call it once during start-up, before\n * verifying; without it, the global Web Crypto API (`globalThis.crypto`,\n * available in Node >= 20 and browsers) is used.\n *\n * Process-wide by necessity, not by design: xadesjs exposes a single global\n * crypto engine rather than a per-call context\n * (see {@link https://github.com/PeculiarVentures/xmldsigjs/issues/119}).\n * A per-invocation option would look isolated while still swapping that global,\n * so concurrent verifications with different engines would race; it is\n * deliberately not offered. Should upstream gain per-call crypto, accepting it\n * as a verification option is an additive, non-breaking change.\n */\nexport function setTrustedListCrypto(crypto: Crypto): void {\n ensureNodeDependencies()\n xadesjs.Application.setEngine('eudi-tl', crypto)\n installedCrypto = crypto\n}\n\n/**\n * Make sure a crypto engine is installed before verifying. A caller-installed\n * engine is never replaced — falling back to `globalThis.crypto` on every call\n * that does not opt in would silently undo {@link setTrustedListCrypto}.\n */\nfunction ensureXmlSignatureEngine(): void {\n ensureNodeDependencies()\n if (!installedCrypto) setTrustedListCrypto(globalThis.crypto)\n}\n\nexport interface VerifyTrustedListOptions {\n /**\n * DER-encoded certificates the trusted list's signer certificate must match.\n * When provided, verification fails closed unless the signature verifies\n * with the key of one of these anchors — establishing that the list was\n * signed by the expected scheme operator, not merely by *some* key. An empty\n * list fails closed too.\n *\n * When omitted, only the cryptographic validity of the enveloped signature\n * is checked; that proves integrity, NOT trust. Production callers should\n * always pin the scheme operator certificate(s).\n */\n trustAnchors?: Uint8Array[]\n}\n\nexport interface VerifyTrustedListResult {\n /** base64-encoded DER of the signer certificate from the signature KeyInfo, whose key verified the signature. */\n signerCertificateBase64: string\n}\n\n/** A certificate of the signature KeyInfo, as xmldsigjs parses it. */\ninterface KeyInfoCertificate {\n GetRaw(): Uint8Array\n exportKey(algorithm: Algorithm): Promise<CryptoKey>\n}\n\n/**\n * xmldsigjs accepts a signature that any key in the KeyInfo verifies, but the KeyInfo is not signed: whoever passes\n * the list can add their own key next to a pinned certificate. So the signature is verified with the key of the\n * `signerCertificate` only.\n */\nclass SignerCertificateSignedXml extends xadesjs.SignedXml {\n signerCertificate?: KeyInfoCertificate\n\n /** The certificates of the X509Data elements in the KeyInfo. */\n keyInfoCertificates(): KeyInfoCertificate[] {\n return this.XmlSignature.KeyInfo.GetIterator().flatMap(\n (clause) => (clause as { Certificates?: KeyInfoCertificate[] }).Certificates ?? []\n )\n }\n\n protected override async GetPublicKeys(): Promise<CryptoKey[]> {\n if (!this.signerCertificate || !this.Algorithm) return []\n // exportKey sets the namedCurve of an ECDSA algorithm on the object it is given\n const key = await this.signerCertificate.exportKey({ ...this.Algorithm })\n if (!key.algorithm.name.startsWith('RSA')) return [key]\n // As in xmldsigjs, an RSA key is imported again with the hash of the signature algorithm\n const subtle = xadesjs.Application.crypto.subtle\n const spki = await subtle.exportKey('spki', key)\n return [await subtle.importKey('spki', spki, this.Algorithm as RsaHashedImportParams, true, ['verify'])]\n }\n}\n\n/**\n * Verify the enveloped XAdES/XMLDSig signature of an ETSI TS 119 612 Trusted\n * List. Throws {@link TrustedListSignatureError} when the signature is\n * missing, invalid, not the only `ds:Signature` of the list, or (with\n * `trustAnchors`) not verified by the key of a pinned scheme operator\n * certificate.\n *\n * Verified against a standard eIDAS national trusted list (RSA-SHA512,\n * exclusive C14N, XAdES SignedProperties).\n *\n * Verification runs on the global Web Crypto API unless another implementation\n * was installed with {@link setTrustedListCrypto}.\n */\nexport async function verifyTrustedListSignature(\n xml: string,\n options: VerifyTrustedListOptions = {}\n): Promise<VerifyTrustedListResult> {\n ensureXmlSignatureEngine()\n\n const { trustAnchors } = options\n if (trustAnchors?.length === 0) {\n throw new TrustedListSignatureError('No trust anchors are configured, so no signer certificate can be trusted')\n }\n\n const doc = new DOMParser().parseFromString(xml, 'application/xml')\n const signatures = doc.getElementsByTagNameNS(XMLDSIG_NS, 'Signature')\n if (signatures.length === 0) {\n throw new TrustedListSignatureError('No ds:Signature found in the trusted list')\n }\n // ETSI TS 119 612 clause 5.7.1: one enveloped signature. The enveloped-signature transform leaves out every\n // ds:Signature child of the root, so the content of another one would not be signed.\n if (signatures.length > 1 || signatures[0].parentNode !== doc.documentElement) {\n throw new TrustedListSignatureError('The trusted list must have exactly one ds:Signature, as a child of its root')\n }\n\n // xadesjs is typed against the lib.dom DOM; @xmldom implements the same\n // shape at runtime, so bridge the two nominal types at this boundary only.\n const signedXml = new SignerCertificateSignedXml(doc as unknown as Document)\n signedXml.LoadXml(signatures[0] as unknown as Element)\n\n const certificates = signedXml.keyInfoCertificates()\n if (certificates.length === 0) {\n throw new TrustedListSignatureError('Trusted list signature has no X509Certificate in KeyInfo')\n }\n const candidates = trustAnchors\n ? certificates.filter((certificate) => trustAnchors.some((anchor) => compareBytes(anchor, certificate.GetRaw())))\n : certificates.slice(0, 1)\n if (candidates.length === 0) {\n throw new TrustedListSignatureError('Trusted list signer certificate is not among the configured trust anchors')\n }\n\n for (const candidate of candidates) {\n signedXml.signerCertificate = candidate\n let valid: boolean\n try {\n valid = await signedXml.Verify()\n } catch (error) {\n throw new TrustedListSignatureError(\n `Trusted list signature could not be verified: ${error instanceof Error ? error.message : String(error)}`,\n { cause: error }\n )\n }\n if (valid) return { signerCertificateBase64: base64.encode(candidate.GetRaw()) }\n }\n\n throw new TrustedListSignatureError('Trusted list signature is invalid')\n}\n","import { base64 } from '@owf/identity-common'\nimport { EU_LOTL_SIGNING_CERTIFICATES } from './eu-lotl-anchors'\nimport { type ParseTrustedListOptions, parseTrustedList } from './parse'\nimport { TrustedListProfiles } from './profiles'\nimport { TrustedListValidationError } from './trusted-list-error'\nimport type { TrustedList } from './types'\nimport { validateTrustedListProfile } from './validate'\nimport { type VerifyTrustedListOptions, type VerifyTrustedListResult, verifyTrustedListSignature } from './verify'\n\n/**\n * The LOTL signing certificates shipped with this package, as DER bytes ready\n * to pass as `trustAnchors`.\n *\n * This pinned set is the root of the eIDAS trusted-list hierarchy and cannot be\n * bootstrapped from the LOTL itself — a forged list would carry a forged\n * self-pointer. It is published by the European Commission in the Official\n * Journal; see {@link EU_LOTL_ANCHORS_PROVENANCE} for the exact act, list issue\n * and expiry of the shipped set.\n *\n * Certificates rotate (historically every 6–24 months), so a deployment has\n * three ways to stay current without waiting for a release of this package:\n *\n * 1. pass its own `trustAnchors`, e.g. from configuration;\n * 2. after verifying a LOTL, read the currently published set from its own\n * self-pointer with `getPointerSigningCertificates(lotl, { tslType:\n * TslType.EUlistofthelists })` and persist it — rotation is announced in a\n * list still signed by the previous generation of keys;\n * 3. follow the pivot LOTLs advertised in the list's `SchemeInformationURI`\n * when the pinned set has fallen behind entirely.\n */\nexport function getEuLotlTrustAnchors(): Uint8Array[] {\n return EU_LOTL_SIGNING_CERTIFICATES.map((entry) => base64.decode(entry.certificate))\n}\n\n/**\n * Verify the signature of the EU List of Trusted Lists against the shipped\n * signing certificates. Identical to {@link verifyTrustedListSignature} except\n * that `trustAnchors` defaults to {@link getEuLotlTrustAnchors} instead of to\n * \"integrity only\" — pass your own to override.\n */\nexport function verifyEuLotlSignature(\n xml: string,\n options: VerifyTrustedListOptions = {}\n): Promise<VerifyTrustedListResult> {\n return verifyTrustedListSignature(xml, { ...options, trustAnchors: options.trustAnchors ?? getEuLotlTrustAnchors() })\n}\n\n/**\n * Verify, parse and profile-check the EU List of Trusted Lists in one step: the\n * safe entry point for the top of the hierarchy. The returned list carries the\n * `PointersToOtherTSL` entries from which national list anchors are derived\n * with `getPointerSigningCertificates`.\n */\nexport async function loadEuLotl(\n xml: string,\n options: VerifyTrustedListOptions & ParseTrustedListOptions = {}\n): Promise<TrustedList> {\n await verifyEuLotlSignature(xml, options)\n const lotl = parseTrustedList(xml, options)\n const profile = validateTrustedListProfile(lotl, TrustedListProfiles.euLotl)\n if (!profile.valid) throw new TrustedListValidationError('Not a conforming EU List of Trusted Lists', profile.issues)\n return lotl\n}\n","/**\n * @owf/eudi-tl\n *\n * Parse and verify ETSI TS 119 612 XML Trusted Lists and expose normalized\n * trust anchors. Companion to `@owf/eudi-lote` (ETSI TS 119 602, JSON): both\n * resolve to the same normalized notion of a trust anchor, so a verifier can\n * consume either format and, for example, derive AKIs to send to a wallet.\n */\nexport {\n ACTIVE_SERVICE_STATUSES,\n ServiceStatus,\n ServiceType,\n TslType,\n} from './constants'\nexport {\n getEuLotlTrustAnchors,\n loadEuLotl,\n verifyEuLotlSignature,\n} from './eu-lotl'\nexport {\n EU_LOTL_ANCHORS_PROVENANCE,\n EU_LOTL_SIGNING_CERTIFICATES,\n type EuLotlSigningCertificate,\n} from './eu-lotl-anchors'\nexport {\n getPointerSigningCertificates,\n getTrustAnchors,\n type ParseTrustedListOptions,\n parseTrustedList,\n type TrustAnchorFilter,\n type TrustedListPointerFilter,\n} from './parse'\nexport { TrustedListProfiles } from './profiles'\nexport {\n TrustedListError,\n TrustedListParseError,\n TrustedListSignatureError,\n TrustedListValidationError,\n} from './trusted-list-error'\nexport {\n type DigitalIdentity,\n type ServiceHistoryInstance,\n type TrustAnchor,\n type TrustedList,\n type TrustedListPointer,\n type TrustedListService,\n type TrustServiceProvider,\n zDigitalIdentity,\n zServiceHistoryInstance,\n zTrustAnchor,\n zTrustedList,\n zTrustedListPointer,\n zTrustedListService,\n zTrustServiceProvider,\n} from './types'\nexport {\n assertValidTrustedList,\n type ProfileRule,\n TRUSTED_LIST_VALIDATION_CODES,\n type TrustedListValidationCode,\n type TrustedListValidationIssue,\n type ValidationResult,\n validateTrustedList,\n validateTrustedListProfile,\n} from './validate'\nexport {\n setTrustedListCrypto,\n type VerifyTrustedListOptions,\n type VerifyTrustedListResult,\n verifyTrustedListSignature,\n} from './verify'\n\nimport { type ParseTrustedListOptions, parseTrustedList } from './parse'\nimport { TrustedListSignatureError } from './trusted-list-error'\nimport type { TrustedList } from './types'\nimport { type VerifyTrustedListOptions, verifyTrustedListSignature } from './verify'\n\n/**\n * Verify the trusted list signature against the `trustAnchors` and, only if it\n * is valid, parse it. This is the safe entry point: it never returns a\n * {@link TrustedList} whose authenticity has not been established.\n *\n * @throws TrustedListSignatureError when `trustAnchors` is missing or empty, or the signature is not valid.\n */\nexport async function loadTrustedList(\n xml: string,\n options: Required<VerifyTrustedListOptions> & ParseTrustedListOptions\n): Promise<TrustedList> {\n // Without them, the signature check would only establish the integrity of the list\n if (!options?.trustAnchors) {\n throw new TrustedListSignatureError('loadTrustedList needs the trustAnchors of the scheme operator')\n }\n await verifyTrustedListSignature(xml, options)\n return parseTrustedList(xml, options)\n}\n"],"mappings":";;;;;;;;;;;;;;;;AASA,MAAa,UAAU;CACrB,WAAW;CACX,kBAAkB;AACpB;;AAGA,MAAa,gBAAgB;CAC3B,SAAS;CACT,WAAW;CACX,kBAAkB;CAClB,mBAAmB;CACnB,wBAAwB;CACxB,YAAY;CACZ,qBAAqB;CACrB,sBAAsB;CACtB,kBAAkB;CAClB,2BAA2B;CAC3B,2BAA2B;AAC7B;;;;;;AAOA,MAAa,0BAAoC;CAC/C,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;AAChB;;AAGA,MAAa,cAAc;;CAEzB,OAAO;;CAEP,QAAQ;;CAER,UAAU;;CAEV,OAAO;;CAEP,WAAW;;CAEX,QAAQ;;CAER,iBAAiB;;CAEjB,SAAS;AACX;;;;;;;AC7BA,MAAa,+BAAoE;CAC/E;EACE,aACE;EACF,SACE;EACF,mBAAmB;EACnB,UAAU;CACZ;CACA;EACE,aACE;EACF,SACE;EACF,mBAAmB;EACnB,UAAU;CACZ;CACA;EACE,aACE;EACF,SACE;EACF,mBAAmB;EACnB,UAAU;CACZ;CACA;EACE,aACE;EACF,SAAS;EACT,mBAAmB;EACnB,UAAU;CACZ;CACA;EACE,aACE;EACF,SACE;EACF,mBAAmB;EACnB,UAAU;CACZ;CACA;EACE,aACE;EACF,SACE;EACF,mBAAmB;EACnB,UAAU;CACZ;AACF;;AAGA,MAAa,6BAA6B;;CAExC,QAAQ;;CAER,iBAAiB;;CAEjB,mBAAmB;;CAEnB,mBAAmB;;CAEnB,kBAAkB;AACpB;;;;;;;ACrFA,IAAa,mBAAb,cAAsC,cAAc;CAKlD,YAAY,SAAiB,SAA+B;EAC1D,MAAM,OAAO;EACb,KAAK,OAAO,WAAW;EACvB,KAAK,QAAQ,SAAS;CACxB;AACF;;;;AAKA,IAAa,wBAAb,cAA2C,iBAAiB;CAC1D,YAAY,SAAiB,SAA+B;EAC1D,MAAM,SAAS,OAAO;EAC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B,KAAK,OAAO;AACtC"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["TSL_NS"],"sources":["../src/constants.ts","../src/eu-lotl-anchors.ts","../src/trusted-list-error.ts","../src/types.ts","../src/validate.ts","../src/parse.ts","../src/profiles.ts","../src/verify.ts","../src/eu-lotl.ts","../src/index.ts"],"sourcesContent":["/**\n * Well-known ETSI TS 119 612 URIs.\n *\n * These are the standard values used by eIDAS national trusted lists. Profiled\n * lists may use their own profile-specific URIs (validated via a caller-supplied\n * {@link ProfileRule}); this library's parser is agnostic to both.\n */\n\n/** Standard `TSLType` values (TS 119 612 clause 5.3.3). */\nexport const TslType = {\n EUgeneric: 'http://uri.etsi.org/TrstSvc/TrustedList/TSLType/EUgeneric',\n EUlistofthelists: 'http://uri.etsi.org/TrstSvc/TrustedList/TSLType/EUlistofthelists',\n} as const\n\n/** Standard `ServiceStatus` values (TS 119 612 clause 5.5.4). */\nexport const ServiceStatus = {\n Granted: 'http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/granted',\n Withdrawn: 'http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/withdrawn',\n UnderSupervision: 'http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/undersupervision',\n SupervisionCeased: 'http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/supervisionceased',\n SupervisionInCessation: 'http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/supervisionincessation',\n Accredited: 'http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/accredited',\n AccreditationCeased: 'http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/accreditationceased',\n AccreditationRevoked: 'http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/accreditationrevoked',\n SetByNationalLaw: 'http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/setbynationallaw',\n RecognisedAtNationalLevel: 'http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/recognisedatnationallevel',\n DeprecatedAtNationalLevel: 'http://uri.etsi.org/TrstSvc/TrustedList/Svcstatus/deprecatedatnationallevel',\n} as const\n\n/**\n * Service statuses that denote a currently active / trustworthy service under\n * TS 119 612. Use as the `serviceStatus` filter when extracting trust anchors\n * from a standard eIDAS list; withdrawn/ceased services are excluded.\n */\nexport const ACTIVE_SERVICE_STATUSES: string[] = [\n ServiceStatus.Granted,\n ServiceStatus.UnderSupervision,\n ServiceStatus.Accredited,\n ServiceStatus.SetByNationalLaw,\n ServiceStatus.RecognisedAtNationalLevel,\n]\n\n/** Common standard `ServiceTypeIdentifier` values (TS 119 612 Annex D). */\nexport const ServiceType = {\n /** Qualified certificate CA. */\n CA_QC: 'http://uri.etsi.org/TrstSvc/Svctype/CA/QC',\n /** Public key certificate CA. */\n CA_PKC: 'http://uri.etsi.org/TrstSvc/Svctype/CA/PKC',\n /** Qualified timestamping authority. */\n TSA_QTST: 'http://uri.etsi.org/TrstSvc/Svctype/TSA/QTST',\n /** Qualified electronic delivery service. */\n EDS_Q: 'http://uri.etsi.org/TrstSvc/Svctype/EDS/Q',\n /** Qualified registered electronic mail delivery service. */\n EDS_REM_Q: 'http://uri.etsi.org/TrstSvc/Svctype/EDS/REM/Q',\n /** Qualified preservation service for electronic signatures/seals. */\n PSES_Q: 'http://uri.etsi.org/TrstSvc/Svctype/PSES/Q',\n /** Qualified validation service for qualified electronic signatures. */\n QESValidation_Q: 'http://uri.etsi.org/TrstSvc/Svctype/QESValidation/Q',\n /** OCSP responder for qualified certificates. */\n OCSP_QC: 'http://uri.etsi.org/TrstSvc/Svctype/Certstatus/OCSP/QC',\n} as const\n","/**\n * EU List of Trusted Lists (LOTL) signing certificates — GENERATED by\n * `scripts/refresh-lotl-anchors.mts`, do not edit by hand.\n *\n * These are the certificates the European Commission publishes as the signers\n * of the LOTL. They are the out-of-band trust anchor of the whole eIDAS trusted\n * list hierarchy: the set cannot be derived from the LOTL alone (a forged list\n * would carry a forged self-pointer), so it is pinned here and cross-checked\n * against the Official Journal publication referenced below.\n *\n * Source list: https://ec.europa.eu/tools/lotl/eu-lotl.xml\n * Official Journal: https://eur-lex.europa.eu/eli/C/2026/1944/oj\n */\n\n/** One certificate the European Commission publishes as a LOTL signer. */\nexport interface EuLotlSigningCertificate {\n /** base64-encoded DER. */\n certificate: string\n /** Subject distinguished name, for human review of the pinned set. */\n subject: string\n /** Lowercase-hex SHA-256 of the DER, for out-of-band cross-checking. */\n fingerprintSha256: string\n /** Certificate expiry (ISO 8601). */\n notAfter: string\n}\n\n/**\n * The signing certificates published by the LOTL identified in\n * {@link EU_LOTL_ANCHORS_PROVENANCE}. Any of them may sign a future issue of the\n * list, so the whole published set is pinned, not just the current signer.\n */\nexport const EU_LOTL_SIGNING_CERTIFICATES: readonly EuLotlSigningCertificate[] = [\n {\n certificate:\n 'MIIIljCCBn6gAwIBAgIUMkdxaYjTAuT2WRKfmeup7zDClNgwDQYJKoZIhvcNAQENBQAwXzELMAkGA1UEBhMCUFQxKjAoBgNVBAoMIURpZ2l0YWxTaWduIENlcnRpZmljYWRvcmEgRGlnaXRhbDEkMCIGA1UEAwwbRElHSVRBTFNJR04gUVVBTElGSUVEIENBIEcxMB4XDTI1MTIxNzE0MzE1NFoXDTI5MTIxNzE0MzE1NFowggEMMQswCQYDVQQGEwJMVTFDMEEGA1UECww6Q2VydGlmaWNhdGUgUHJvZmlsZSAtIFF1YWxpZmllZCBDZXJ0aWZpY2F0ZSAtIE9yZ2FuaXphdGlvbjExMC8GA1UECwwoRGlyZWN0b3JhdGUtR2VuZXJhbCBmb3IgRGlnaXRhbCBTZXJ2aWNlczEjMCEGA1UEYQwaTEVJWEctMjU0OTAwWk5ZQTFGTFVROVUzOTMxHDAaBgNVBAoME0VVUk9QRUFOIENPTU1JU1NJT04xJDAiBgkqhkiG9w0BCQEWFUVVLVRSVVNUQGVjLmV1cm9wYS5ldTEcMBoGA1UEAwwTRVVST1BFQU4gQ09NTUlTU0lPTjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKJguyStfry/iDbqvGbth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nutj9xm2jAWThELxoNKmluSSf1uPsh3GrxIeH8gbmvKsOWG4CCU+MW+bLufFsx1ZRHzytphb6LNVHtgaJ7aUTuZHYBGI3SdZ+ogB/fjo9NM/unYnlfSRXesA8lJP+S5qt',\n subject:\n 'C=LU, OU=Certificate Profile - Qualified Certificate - Organization, OU=Directorate-General for Digital Services, 2.5.4.97=LEIXG-254900ZNYA1FLUQ9U393, O=EUROPEAN COMMISSION, E=EU-TRUST@ec.europa.eu, CN=EUROPEAN COMMISSION',\n fingerprintSha256: '236103f03a8031ae8f47f9059bf8de38564cdbfebedde4a597d50f8980aa653b',\n notAfter: '2029-12-17T14:31:54.000Z',\n },\n {\n certificate:\n 'MIIH9DCCBdygAwIBAgIUYymXhglnqt2gI4PHVh4juzinht8wDQYJKoZIhvcNAQENBQAwXzELMAkGA1UEBhMCUFQxKjAoBgNVBAoMIURpZ2l0YWxTaWduIENlcnRpZmljYWRvcmEgRGlnaXRhbDEkMCIGA1UEAwwbRElHSVRBTFNJR04gUVVBTElGSUVEIENBIEcxMB4XDTI0MDQyNjEyNDkyMloXDTI3MDQyNjEyNDkyMlowggFKMQswCQYDVQQGEwJHUjE9MDsGA1UECww0Q2VydGlmaWNhdGUgUHJvZmlsZSAtIFF1YWxpZmllZCBDZXJ0aWZpY2F0ZSAtIE1lbWJlcjEjMCEGA1UEYQwaTEVJWEctMjU0OTAwWk5ZQTFGTFVROVUzOTMxHDAaBgNVBAoME0VVUk9QRUFOIENPTU1JU1NJT04xKTAnBgNVBAsMIEVudGl0bGVtZW50IC0gRUMgU1RBVFVUT1JZIFNUQUZGMS0wKwYJKoZIhvcNAQkBFh5hcG9zdG9sb3MuYXBsYWRhc0BlYy5ldXJvcGEuZXUxEDAOBgNVBAQMB0FQTEFEQVMxEjAQBgNVBCoMCUFQT1NUT0xPUzEdMBsGA1UECwwUUmVtb3RlUVNDRE1hbmFnZW1lbnQxGjAYBgNVBAMMEUFQT1NUT0xPUyBBUExBREFTMIIBIjANBgkqhk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jkYBBDATBgYEAI5GAQYwCQYHBACORgEGATBqBgYEAI5GAQUwYDAuFihodHRwczovL3FjYS1nMS5kaWdpdGFsc2lnbi5wdC9QRFNfcHQucGRmEwJwdDAuFihodHRwczovL3FjYS1nMS5kaWdpdGFsc2lnbi5wdC9QRFNfZW4ucGRmEwJlbjAVBggrBgEFBQcLAjAJBgcEAIvsSQEBMBUGCCsGAQUFBwsCMAkGBwQAi+xJAQIwDQYJKoZIhvcNAQENBQADggIBALUt37pV7w5ZwRxBB5PdTGTC+XcWytkuyuRJlVu+hVD5yVC2E+4+EPB2mRUzkjeE2M/3iMpzdwaNHe2YU9lCkoUFtD7VLIEdilfGO0MnXde2BAQN1VAt0s8xLwr3DNATsrtYPbtkQ73WCNqQwuNlg4LCFXHHpzvsKzYmYz+hYgkA8daRZRJdnZx/eX05iYFtShbbz8VamNb+A1L/KmqSrt5iG8d9SLSSq9SbNrntxSLaYDJfOITjhW5KOwlXBJPA+sQDYPngHur1nLWUJg6QB8fo/YwMOTmyIciurp8QzktxfJU1wSZEpd/xZKoDWVDNjJa8p0RFbQs/l7DpP/s57p8PKcntDOvQkYCajpRFLKl/69gKdVkB6nOKHFQCTmAeCDapWsI9+jPCnriywN60ep+MMqedZ/lV8LecbJ/1E+kw6PhC6Rs4MlwmHHCe6BB/9oTK7SWW/CtIZh8ygtJ0+5JlDS/83b0F0JdnZUV2qhlZJlVOROcQljcWs7kYS8vWAqBbccAhYNpaaUh1rnKGqo2jpOo5HXhgSVHNRrC+CylNNDUGAhpgPsAD93ui6JQCjdlSzDkraWZA/GtmdpId0b7IR6HfRBs/QzeA4Rj7ChMMOFxDZPp2t6kEyPb1UOshC79fmoNRkBxmGKqMCPakQiiUoIg/BkLIUVYClIoQ8zsk',\n subject:\n 'C=GR, OU=Certificate Profile - Qualified Certificate - Member, 2.5.4.97=LEIXG-254900ZNYA1FLUQ9U393, O=EUROPEAN COMMISSION, OU=Entitlement - EC STATUTORY STAFF, E=apostolos.apladas@ec.europa.eu, SN=APLADAS, G=APOSTOLOS, OU=RemoteQSCDManagement, CN=APOSTOLOS APLADAS',\n fingerprintSha256: 'b63d416744e7098bf9ec2caa596a93bc2468e37f8284ba65ecc061711bcbaa18',\n notAfter: '2027-04-26T12:49:22.000Z',\n },\n {\n certificate:\n 'MIIIBDCCBeygAwIBAgIUcMz/PU9hyZj1+vaAghkzK31AkUswDQYJKoZIhvcNAQENBQAwXzELMAkGA1UEBhMCUFQxKjAoBgNVBAoMIURpZ2l0YWxTaWduIENlcnRpZmljYWRvcmEgRGlnaXRhbDEkMCIGA1UEAwwbRElHSVRBTFNJR04gUVVBTElGSUVEIENBIEcxMB4XDTI1MTEyNDA5NTY0MVoXDTI5MTEyMzA5NTY0MVowggFWMQswCQYDVQQGEwJHUjE9MDsGA1UECww0Q2VydGlmaWNhdGUgUHJvZmlsZSAtIFF1YWxpZmllZCBDZXJ0aWZpY2F0ZSAtIE1lbWJlcjEjMCEGA1UEYQwaTEVJWEctMjU0OTAwWk5ZQTFGTFVROVUzOTMxHDAaBgNVBAoME0VVUk9QRUFOIENPTU1JU1NJT04xKTAnBgNVBAsMIEVudGl0bGVtZW50IC0gRUMgU1RBVFVUT1JZIFNUQUZGMTEwLwYJKoZIhvcNAQkBFiJJb2FubmEuS0FMT0dFUk9QT1VMT1VAZWMuZXVyb3BhLmV1MRcwFQYDVQQEDA5LQUxPR0VST1BPVUxPVTEPMA0GA1UEKgwGSU9BTk5BMR0wGwYDVQQLDBRSZW1vdGVRU0NETWFuYWdlbWVudDEeMBwGA1UEAwwVSU9BTk5BIEtBTE9HRVJPUE9VTE9VMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAswjmtemrpGlPsoCM1tVfVICYiyK0eIodby6nK00KfkS8K9gEou+OZjJ5B85VmEC7u889RAG1DUr6k+7Setz9E/qYdFhz/3GJw10XsEuRcwdzafvKM9DrXFFkGYRqKSkJ67/sKq1JKE7bCkbMZ/B8SDRUJ2veSoRS/oC5Gh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IwCQYHBACL7EkBATAVBggrBgEFBQcLAjAJBgcEAIvsSQECMA0GCSqGSIb3DQEBDQUAA4ICAQBXav52/+LXYZAgA0MjuEI/+NacJC9E9VRIkIIvrLzAHcj2KQ2GLR1fL8C2UIJ6u2+LwG2mIyyK2F16erDoOWKDV40vxgGEfSwgin6GUhHmzuRDPBQhUW4C7btUFMoAr05UT+v03d9RrnlA5bpKSlKaf2J3EGAfGR1DvvFJ+ZCFaVo+8rtcLpySS3f8ZPCqz3axaO3KeyK4LuJbdZqGArKIF0vNKGR94rr7Pq7OIIHJBuOW9LGQG0r5e8kb/KRLZBsPlHpgPVZc8M3EimqYmIg6hgPf0k+Mxhw5/IC4rikFsMTNa43yBeGrk2pvM8cIZoenmQMgf/1L0+A9Pwol+7CUQfe4Bpj0fr1Acnx/4oPnAKmMDKvXnx91fMW2b7Uen2y11TcijxYuXftq03bx8w/ms/giXYLGciDcwCF7XCXNnGuATW/GxPvOxOwu56ZDrm/oG3zfa4l/tF/S5swoFrzmTDIIM05UzHDUuQAln103BGfEYKo7vw4bNfouHfS28qGWbotUSNzHfOEqeC4LrdN7JmE8q0hZRXLFOIsPtG/S0rEkuoNl3znZPmk8oAy/xa1+3XnH1nJCVmTK0XQYaTPinAAEnDbTqUjD97zmUFEd+ecOctica4DFhQoHtUDYUOzKEKfKHVEG0ApI3dpHzcLiuLXIQl0DBvfy3wspy6HL3A==',\n subject:\n 'C=GR, OU=Certificate Profile - Qualified Certificate - Member, 2.5.4.97=LEIXG-254900ZNYA1FLUQ9U393, O=EUROPEAN COMMISSION, OU=Entitlement - EC STATUTORY STAFF, E=Ioanna.KALOGEROPOULOU@ec.europa.eu, SN=KALOGEROPOULOU, G=IOANNA, OU=RemoteQSCDManagement, CN=IOANNA KALOGEROPOULOU',\n fingerprintSha256: 'c0641c4f7d56c431b1c924742db7fce9c1eef7d7fd212113a2768486b3abcdc5',\n notAfter: '2029-11-23T09:56:41.000Z',\n },\n {\n certificate:\n 'MIIG7zCCBNeg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AcdPauWmbxtJV93H46pFptsR8zXo+IJn5m2P9QPZ3mvDkzldNTGLG+ukhN7IF2CCcagt/WoVZLq3qKC35WVcqeoSMEE/XeSrf3/mIJ1OyFQm+tsfhTceOFDXuUgl3E86bR/f8Ur/bapwXpWpFxGIpXLGaJXbzQGSTtyNEYrdENlh71I3OeYdw3xmzU2B3tbaWREOXtj2xjyW2tIv+vvHG6sloR1QkIkGMFfzsT7W5U6ILetv',\n subject: 'C=BE, CN=Patrick Kremer (Signature), SN=Kremer, G=Patrick Jean, 2.5.4.5=72020329970',\n fingerprintSha256: 'd2064fdd70f6982dcc516b86d9d5c56aea939417c624b2e478c0b29de54f8474',\n notAfter: '2028-05-30T23:59:59.000Z',\n },\n {\n certificate:\n 'MIIICDCCBfCgAwIBAgIUSOnGJxOHWc5N+Nk12eZPPCwr7ZYwDQYJKoZIhvcNAQENBQAwXzELMAkGA1UEBhMCUFQxKjAoBgNVBAoMIURpZ2l0YWxTaWduIENlcnRpZmljYWRvcmEgRGlnaXRhbDEkMCIGA1UEAwwbRElHSVRBTFNJR04gUVVBTElGSUVEIENBIEcxMB4XDTI0MDUwNjEyNDUxNloXDTI3MDUwNjEyNDUxNlowggFZMQswCQYDVQQGEwJFUzE9MDsGA1UECww0Q2VydGlmaWNhdGUgUHJvZmlsZSAtIFF1YWxpZmllZCBDZXJ0aWZpY2F0ZSAtIE1lbWJlcjEjMCEGA1UEYQwaTEVJWEctMjU0OTAwWk5ZQTFGTFVROVUzOTMxHDAaBgNVBAoME0VVUk9QRUFOIENPTU1JU1NJT04xKTAnBgNVBAsMIEVudGl0bGVtZW50IC0gRUMgU1RBVFVUT1JZIFNUQUZGMTIwMAYJKoZIhvcNAQkBFiN2aWNlbnRlLmFuZHJldS1uYXZhcnJvQGVjLmV1cm9wYS5ldTEXMBUGA1UEBAwOQU5EUkVVIE5BVkFSUk8xEDAOBgNVBCoMB1ZJQ0VOVEUxHTAbBgNVBAsMFFJlbW90ZVFTQ0RNYW5hZ2Vt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member, 2.5.4.97=LEIXG-254900ZNYA1FLUQ9U393, O=EUROPEAN COMMISSION, OU=Entitlement - EC STATUTORY STAFF, E=vicente.andreu-navarro@ec.europa.eu, SN=ANDREU NAVARRO, G=VICENTE, OU=RemoteQSCDManagement, CN=VICENTE ANDREU NAVARRO',\n fingerprintSha256: 'df7e29360c34b2b8d6d5f40325c1d4d12c9922cecd33b7407674a74b2b3ca1e5',\n notAfter: '2027-05-06T12:45:16.000Z',\n },\n {\n certificate:\n 'MIIIoDCCBoigAwIBAgIUc8IcSUtVEKAMMvHm9QWU05kXsPUwDQYJKoZIhvcNAQENBQAwXzELMAkGA1UEBhMCUFQxKjAoBgNVBAoMIURpZ2l0YWxTaWduIENlcnRpZmljYWRvcmEgRGlnaXRhbDEkMCIGA1UEAwwbRElHSVRBTFNJR04gUVVBTElGSUVEIENBIEcxMB4XDTIzMTExNzEwMTE0NloXDTI3MTExNzEwMTE0NlowggEVMQswCQYDVQQGEwJMVTFDMEEGA1UECww6Q2VydGlmaWNhdGUgUHJvZmlsZSAtIFF1YWxpZmllZCBDZXJ0aWZpY2F0ZSAtIE9yZ2FuaXphdGlvbjE5MDcGA1UECwwwRGlyZWN0b3JhdGUtR2VuZXJhbCBmb3IgRGlnaXRhbCBTZXJ2aWNlcyAoRElHSVQpMSMwIQYDVQRhDBpMRUlYRy0yNTQ5MDBaTllBMUZMVVE5VTM5MzEcMBoGA1UECgwTRVVST1BFQU4gQ09NTUlTU0lPTjElMCMGCSqGSIb3DQEJARYWZGlnaXQtZG1vQGVjLmV1cm9wYS5ldTEcMBoGA1UEAwwTRVVST1BFQU4gQ09NTUlTU0lPTjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKWYeBA9kYARElGnHoJRNpbby44G+TSJcgHI9QtyXlYjB234hSAYyJvW+gKvoownskrogfUP6GOmQgEFZX335Y0sBwfppVemEoe9H9Aj/cpT14IqdB05V4a88ASRfR0Va1xmQJrDsBZWqZHx0EEHBctIF5BjyT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C=LU, OU=Certificate Profile - Qualified Certificate - Organization, OU=Directorate-General for Digital Services (DIGIT), 2.5.4.97=LEIXG-254900ZNYA1FLUQ9U393, O=EUROPEAN COMMISSION, E=digit-dmo@ec.europa.eu, CN=EUROPEAN COMMISSION',\n fingerprintSha256: 'e0a620fbb6747362bb933ac44169d676a553444716cf5f31605f12a22b8396b1',\n notAfter: '2027-11-17T10:11:46.000Z',\n },\n]\n\n/** Where this set came from, so the pin can be audited without re-running the script. */\nexport const EU_LOTL_ANCHORS_PROVENANCE = {\n /** The list the certificates were read from. */\n source: 'https://ec.europa.eu/tools/lotl/eu-lotl.xml',\n /** The Official Journal act the LOTL itself references for its signers. */\n officialJournal: 'https://eur-lex.europa.eu/eli/C/2026/1944/oj',\n /** `TSLSequenceNumber` of that list. */\n tslSequenceNumber: 390,\n /** `ListIssueDateTime` of that list. */\n listIssueDateTime: '2026-08-03T13:16:38Z',\n /** Earliest expiry in the set: refresh before this date. */\n earliestNotAfter: '2027-04-26T12:49:22.000Z',\n} as const\n","import { IdentityError, ValidationError } from '@owf/identity-common'\nimport type { TrustedListValidationIssue } from './validate'\n\n/**\n * Base error for all trusted-list processing failures.\n *\n * Extends `IdentityError`, the base every error in these packages shares.\n */\nexport class TrustedListError extends IdentityError {\n // NOTE: declared explicitly rather than passing `{ cause }` to `super`, as the\n // project targets ES2020 and `Error.cause` was only added in ES2022.\n public readonly cause?: unknown\n\n constructor(message: string, options?: { cause?: unknown }) {\n super(message)\n this.name = new.target.name\n this.cause = options?.cause\n }\n}\n\n/**\n * The XML could not be parsed as an ETSI TS 119 612 `TrustServiceStatusList`.\n */\nexport class TrustedListParseError extends TrustedListError {\n constructor(message: string, options?: { cause?: unknown }) {\n super(message, options)\n this.name = 'TrustedListParseError'\n }\n}\n\n/**\n * The parsed list does not conform to the TS 119 612 schema or to a profile, with the\n * `issues` of the validation. The message lists the errors among them.\n */\nexport class TrustedListValidationError extends ValidationError<TrustedListValidationIssue> {}\n\n/**\n * The trusted list's own XAdES/XMLDSig signature is missing, invalid, or does\n * not match a configured trust anchor. Callers MUST treat this as fail-closed:\n * a trusted list whose authenticity cannot be established must not be used to\n * trust credentials.\n */\nexport class TrustedListSignatureError extends TrustedListError {\n constructor(message: string, options?: { cause?: unknown }) {\n super(message, options)\n this.name = 'TrustedListSignatureError'\n }\n}\n","import { z } from 'zod'\n\n/**\n * A service's digital identity (TS 119 612 `ServiceDigitalIdentity`): the\n * `DigitalId` children (X509Certificate, X509SubjectName, X509SKI) that describe\n * one entity are merged here. A standard list may identify a service by subject\n * name and/or key identifier without embedding the full certificate.\n */\nexport const zDigitalIdentity = z.object({\n /** base64-encoded DER of the certificate, when embedded (`X509Certificate`). */\n certificate: z.string().optional(),\n /** `X509SubjectName`, when present. */\n subjectName: z.string().optional(),\n /**\n * Lowercase-hex SubjectKeyIdentifier — derived from the certificate when one\n * is embedded, otherwise from the `X509SKI` element. This is the value a\n * verifier sends to a wallet as an `aki` trusted authority (HAIP).\n */\n subjectKeyIdentifier: z.string().optional(),\n})\nexport type DigitalIdentity = z.infer<typeof zDigitalIdentity>\n\n/** A past status entry for a service (`ServiceHistoryInstance`). */\nexport const zServiceHistoryInstance = z.object({\n serviceTypeIdentifier: z.string().optional(),\n serviceStatus: z.string(),\n statusStartingTime: z.string().optional(),\n})\nexport type ServiceHistoryInstance = z.infer<typeof zServiceHistoryInstance>\n\n/**\n * A trust service (TSPService) entry: its type, status, digital identities,\n * qualifiers, and status history.\n */\nexport const zTrustedListService = z.object({\n /** `ServiceTypeIdentifier` URI. */\n serviceTypeIdentifier: z.string(),\n /** Current `ServiceStatus` URI. */\n serviceStatus: z.string(),\n /** Human-readable service name, if present. */\n serviceName: z.string().optional(),\n /** One entry per `ServiceDigitalIdentity`. */\n digitalIdentities: z.array(zDigitalIdentity),\n /** Qualifier URIs from `Qualifications/QualificationElement/Qualifiers`. */\n qualifiers: z.array(z.string()).optional(),\n /** Prior status entries from `ServiceHistory`. */\n history: z.array(zServiceHistoryInstance).optional(),\n})\nexport type TrustedListService = z.infer<typeof zTrustedListService>\n\n/** A Trust Service Provider (TSP) and the services it operates. */\nexport const zTrustServiceProvider = z.object({\n name: z.string().optional(),\n services: z.array(zTrustedListService),\n})\nexport type TrustServiceProvider = z.infer<typeof zTrustServiceProvider>\n\n/** A pointer to another trusted list (`OtherTSLPointer`), e.g. the EU LOTL. */\nexport const zTrustedListPointer = z.object({\n /** `TSLLocation` URL. */\n location: z.string(),\n /** Pointed-to list `TSLType`, when advertised. */\n tslType: z.string().optional(),\n /** `SchemeTerritory` (country code), when advertised. */\n schemeTerritory: z.string().optional(),\n /**\n * The pointer's `ServiceDigitalIdentities`: the certificates with which the\n * pointed-to list is signed. This is how a list distributes the trust anchors\n * of the lists it points to — the EU LOTL carries, for every national list,\n * the certificate(s) of its scheme operator, so a verifier that trusts the\n * LOTL does not need to pin each national list separately.\n */\n digitalIdentities: z.array(zDigitalIdentity).default([]),\n})\nexport type TrustedListPointer = z.infer<typeof zTrustedListPointer>\n\n/** A parsed ETSI TS 119 612 Trusted List (`TrustServiceStatusList`). */\nexport const zTrustedList = z.object({\n /** `TSLType` URI. */\n tslType: z.string().optional(),\n /** `SchemeOperatorName` (English name when available). */\n schemeOperatorName: z.string().optional(),\n /** `SchemeTerritory`, the country code of the list (e.g. `ES`), or `EU` for the LOTL. */\n schemeTerritory: z.string().optional(),\n /** `TSLSequenceNumber`. */\n sequenceNumber: z.number().optional(),\n /** `ListIssueDateTime` (ISO 8601). */\n listIssueDateTime: z.string().optional(),\n /** `NextUpdate` (ISO 8601), when present. */\n nextUpdate: z.string().optional(),\n providers: z.array(zTrustServiceProvider),\n /** `PointersToOtherTSL` entries (e.g. the EU LOTL). Not followed by v1. */\n pointersToOtherLists: z.array(zTrustedListPointer).optional(),\n})\nexport type TrustedList = z.infer<typeof zTrustedList>\n\n/**\n * A flattened trust anchor: one digital identity with the service context it was\n * published under. The normalized unit both certificate-chain validation and AKI\n * emission consume — the ETSI TS 119 612 counterpart of a `@owf/eudi-lote`\n * TrustedEntity service certificate.\n */\nexport const zTrustAnchor = z.object({\n /** base64 DER certificate, when the identity embeds one. */\n certificate: z.string().optional(),\n subjectName: z.string().optional(),\n subjectKeyIdentifier: z.string().optional(),\n serviceTypeIdentifier: z.string(),\n serviceStatus: z.string(),\n providerName: z.string().optional(),\n})\nexport type TrustAnchor = z.infer<typeof zTrustAnchor>\n","import {\n type ValidationResult as CommonValidationResult,\n parseWithSchema,\n type SchemaValidationCode,\n toValidationResult,\n type ValidationIssueOf,\n ValidationIssues,\n} from '@owf/identity-common'\nimport { TrustedListValidationError } from './trusted-list-error'\nimport { type TrustedList, zTrustedList } from './types'\n\n/**\n * Codes for the profile checks, beyond schema parsing, whose issues have a code of\n * `SCHEMA_VALIDATION_CODES` instead.\n */\nexport const TRUSTED_LIST_VALIDATION_CODES = {\n /** `TSLType` differs from the one of the profile */\n UNEXPECTED_TSL_TYPE: 'unexpected_tsl_type',\n /** A service type identifier the profile does not permit */\n UNEXPECTED_SERVICE_TYPE: 'unexpected_service_type',\n /** A service status the profile does not permit */\n UNEXPECTED_SERVICE_STATUS: 'unexpected_service_status',\n} as const\n\n/** A profile validation code emitted by this validator */\nexport type TrustedListValidationCode =\n (typeof TRUSTED_LIST_VALIDATION_CODES)[keyof typeof TRUSTED_LIST_VALIDATION_CODES]\n\n/** An issue of a trusted list validation, with a code of `SCHEMA_VALIDATION_CODES` for schema issues */\nexport type TrustedListValidationIssue = ValidationIssueOf<TrustedListValidationCode | SchemaValidationCode>\n\n/** Result of a validation, the same as `@owf/eudi-lote`'s ValidationResult */\nexport type ValidationResult = CommonValidationResult<TrustedListValidationIssue>\n\nconst parseTrustedListSchema = (value: unknown) =>\n parseWithSchema(zTrustedList, value, { codes: TRUSTED_LIST_VALIDATION_CODES })\n\n/**\n * Structurally validate an object against the ETSI TS 119 612 trusted-list\n * schema (the same zod-based approach `@owf/eudi-lote` uses for TS 119 602).\n * For XML input, parse it first with `parseTrustedList` (XML → object), then\n * validate the object here.\n */\nexport function validateTrustedList(value: unknown): ValidationResult {\n const result = parseTrustedListSchema(value)\n return toValidationResult(result.success ? [] : result.issues)\n}\n\n/**\n * Structurally validate and return the typed trusted list, throwing\n * {@link TrustedListValidationError} when it does not conform to the schema.\n */\nexport function assertValidTrustedList(value: unknown): TrustedList {\n const result = parseTrustedListSchema(value)\n if (!result.success) throw new TrustedListValidationError('Invalid trusted list', result.issues)\n return result.data\n}\n\n/**\n * A profile constraint set for a trusted list: the expected `TSLType` and the\n * service type / status URIs the profile permits. The zod-based structural\n * schema ({@link validateTrustedList}) is checked first; a profile then narrows\n * a conforming list to a specific ecosystem. Rules are supplied by the caller,\n * so the library stays profile-agnostic (mirrors `@owf/eudi-lote`'s approach).\n */\nexport interface ProfileRule {\n /** Optional label used in error messages. */\n name?: string\n /** Expected `TSLType` (compared scheme-insensitively). */\n tslType: string\n /** Service type URIs the profile permits (scheme-insensitive). */\n serviceTypes: string[]\n /** Service status URIs the profile permits (scheme-insensitive). */\n serviceStatuses: string[]\n}\n\n/**\n * Compare ETSI URIs scheme-insensitively: deployed lists have published the\n * same URI over both `http` and `https`. Internal helper, not part of the\n * package's public API.\n */\nexport const stripScheme = (uri: string | undefined): string => (uri ?? '').replace(/^https?:\\/\\//, '')\n\nfunction profileErrors(trustedList: TrustedList, rule: ProfileRule): TrustedListValidationIssue[] {\n const label = rule.name ?? 'profile'\n const issues = new ValidationIssues<TrustedListValidationCode>()\n const add = (code: TrustedListValidationCode, path: (string | number)[], message: string) =>\n issues.add({ code, path, message: `[${label}] ${message}` })\n\n if (stripScheme(trustedList.tslType) !== stripScheme(rule.tslType)) {\n add(\n TRUSTED_LIST_VALIDATION_CODES.UNEXPECTED_TSL_TYPE,\n ['tslType'],\n `expected TSLType ${rule.tslType}, got ${trustedList.tslType ?? 'none'}`\n )\n }\n\n const allowedTypes = new Set(rule.serviceTypes.map(stripScheme))\n const allowedStatuses = new Set(rule.serviceStatuses.map(stripScheme))\n trustedList.providers.forEach((provider, pi) => {\n provider.services.forEach((service, si) => {\n const servicePath = ['providers', pi, 'services', si]\n if (!allowedTypes.has(stripScheme(service.serviceTypeIdentifier))) {\n add(\n TRUSTED_LIST_VALIDATION_CODES.UNEXPECTED_SERVICE_TYPE,\n [...servicePath, 'serviceTypeIdentifier'],\n `unexpected service type ${service.serviceTypeIdentifier}`\n )\n }\n if (!allowedStatuses.has(stripScheme(service.serviceStatus))) {\n add(\n TRUSTED_LIST_VALIDATION_CODES.UNEXPECTED_SERVICE_STATUS,\n [...servicePath, 'serviceStatus'],\n `unexpected service status ${service.serviceStatus}`\n )\n }\n })\n })\n\n return issues.issues\n}\n\n/**\n * Validate that a trusted list conforms to one (or any, given several) of the\n * supplied profile rules — structural schema first, then profile-specific\n * constraints. Mirrors `@owf/eudi-lote`'s profile validation.\n */\nexport function validateTrustedListProfile(value: unknown, rule: ProfileRule | ProfileRule[]): ValidationResult {\n const structural = validateTrustedList(value)\n if (!structural.valid) return structural\n\n const trustedList = value as TrustedList\n const rules = Array.isArray(rule) ? rule : [rule]\n const perRule = rules.map((r) => profileErrors(trustedList, r))\n return toValidationResult(perRule.some((errors) => errors.length === 0) ? [] : perRule.flat())\n}\n","import { base64, hexEncode } from '@owf/identity-common'\nimport { AsnConvert, type IAsnParseOptions } from '@peculiar/asn1-schema'\nimport { Certificate, id_ce_subjectKeyIdentifier, SubjectKeyIdentifier } from '@peculiar/asn1-x509'\nimport { DOMParser, type Element } from '@xmldom/xmldom'\nimport { TrustedListParseError } from './trusted-list-error'\nimport type {\n DigitalIdentity,\n ServiceHistoryInstance,\n TrustAnchor,\n TrustedList,\n TrustedListPointer,\n TrustedListService,\n TrustServiceProvider,\n} from './types'\nimport { assertValidTrustedList, stripScheme } from './validate'\n\nconst TSL_NS = 'http://uri.etsi.org/02231/v2#'\nconst SIE_NS = 'http://uri.etsi.org/TrstSvc/SvcInfoExt/eSigDir-1999-93-EC-TrustedList/#'\n\nfunction descendants(el: Element, name: string, ns = TSL_NS): Element[] {\n return Array.from(el.getElementsByTagNameNS(ns, name))\n}\n\nfunction firstDescendant(el: Element, name: string, ns = TSL_NS): Element | undefined {\n return descendants(el, name, ns)[0]\n}\n\n/** The direct child elements with the name, so nested elements of the same name are not taken */\nfunction children(el: Element | undefined, name: string, ns = TSL_NS): Element[] {\n return Array.from(el?.childNodes ?? []).filter(\n (n): n is Element => (n as Element).namespaceURI === ns && (n as Element).localName === name\n )\n}\n\n/** The first direct child element with the name, so a nested element of the same name is not taken */\nfunction child(el: Element, name: string, ns = TSL_NS): Element | undefined {\n return children(el, name, ns)[0]\n}\n\nfunction textOf(el: Element | undefined): string | undefined {\n const t = el?.textContent?.trim()\n return t ? t : undefined\n}\n\n/**\n * Localized `Name`: prefer the English entry, else the first, searched only\n * among the direct `Name` children of the given parent.\n */\nfunction localizedName(parent: Element | undefined): string | undefined {\n if (!parent) return undefined\n const names = Array.from(parent.childNodes).filter(\n (n): n is Element => (n as Element).namespaceURI === TSL_NS && (n as Element).localName === 'Name'\n )\n if (names.length === 0) return undefined\n const en = names.find((n) => n.getAttribute('xml:lang') === 'en')\n return textOf(en ?? names[0])\n}\n\n/** Lowercase-hex SubjectKeyIdentifier from a certificate, best-effort. */\nfunction skiFromCertificate(certBase64: string, options?: IAsnParseOptions): string | undefined {\n try {\n const cert = AsnConvert.parse(base64.decode(certBase64), Certificate, options)\n const extension = cert.tbsCertificate.extensions?.find((e) => e.extnID === id_ce_subjectKeyIdentifier)\n if (extension) {\n const ski = AsnConvert.parse(extension.extnValue, SubjectKeyIdentifier, options)\n return hexEncode(new Uint8Array(ski.buffer))\n }\n } catch {\n // Malformed extensions (seen in some reference certificates) — caller\n // falls back to the published X509SKI element if any.\n }\n return undefined\n}\n\n/**\n * One {@link DigitalIdentity} per `ServiceDigitalIdentity`, merging its\n * `DigitalId` children (X509Certificate / X509SubjectName / X509SKI) — a\n * standard list may identify a service without embedding the full certificate.\n */\nfunction parseDigitalIdentities(container: Element, certificateParseOptions?: IAsnParseOptions): DigitalIdentity[] {\n const identities: DigitalIdentity[] = []\n for (const sdi of descendants(container, 'ServiceDigitalIdentity')) {\n let certificate: string | undefined\n let subjectName: string | undefined\n let x509SkiHex: string | undefined\n for (const digitalId of descendants(sdi, 'DigitalId')) {\n certificate ??= textOf(firstDescendant(digitalId, 'X509Certificate'))?.replace(/\\s/g, '')\n subjectName ??= textOf(firstDescendant(digitalId, 'X509SubjectName'))\n const ski = textOf(firstDescendant(digitalId, 'X509SKI'))\n if (ski && !x509SkiHex) {\n x509SkiHex = hexEncode(base64.decode(ski.replace(/\\s/g, '')))\n }\n }\n if (!certificate && !subjectName && !x509SkiHex) continue\n identities.push({\n certificate,\n subjectName,\n subjectKeyIdentifier: certificate\n ? (skiFromCertificate(certificate, certificateParseOptions) ?? x509SkiHex)\n : x509SkiHex,\n })\n }\n return identities\n}\n\nfunction parseQualifiers(serviceInfo: Element): string[] | undefined {\n const uris = descendants(serviceInfo, 'Qualifier', SIE_NS)\n .map((q) => q.getAttribute('uri') ?? '')\n .filter((u) => u.length > 0)\n return uris.length > 0 ? uris : undefined\n}\n\nfunction parseHistory(service: Element): ServiceHistoryInstance[] | undefined {\n const history: ServiceHistoryInstance[] = []\n for (const instance of descendants(service, 'ServiceHistoryInstance')) {\n const serviceStatus = textOf(firstDescendant(instance, 'ServiceStatus'))\n if (!serviceStatus) continue\n history.push({\n serviceTypeIdentifier: textOf(firstDescendant(instance, 'ServiceTypeIdentifier')),\n serviceStatus,\n statusStartingTime: textOf(firstDescendant(instance, 'StatusStartingTime')),\n })\n }\n return history.length > 0 ? history : undefined\n}\n\nfunction parsePointers(\n schemeInfo: Element,\n certificateParseOptions?: IAsnParseOptions\n): TrustedListPointer[] | undefined {\n const pointers: TrustedListPointer[] = []\n for (const pointer of descendants(schemeInfo, 'OtherTSLPointer')) {\n const location = textOf(firstDescendant(pointer, 'TSLLocation'))\n if (!location) continue\n pointers.push({\n location,\n tslType: textOf(firstDescendant(pointer, 'TSLType')),\n schemeTerritory: textOf(firstDescendant(pointer, 'SchemeTerritory')),\n // The pointer's own ServiceDigitalIdentities: the certificate(s) the\n // pointed-to list is signed with.\n digitalIdentities: parseDigitalIdentities(pointer, certificateParseOptions),\n })\n }\n return pointers.length > 0 ? pointers : undefined\n}\n\nexport interface ParseTrustedListOptions {\n /**\n * ASN.1 parse options for the X.509 certificates embedded in the list —\n * `asn1js.fromBER` resource limits (`maxDepth`, `maxNodes`,\n * `maxContentLength`) with which to bound the work done on untrusted input.\n * When omitted, the asn1js defaults apply (maxDepth 100, maxNodes 10000,\n * maxContentLength 16MB).\n *\n * A certificate that exceeds the limits fails to parse like any other\n * malformed one: its `subjectKeyIdentifier` falls back to the `X509SKI`\n * element published alongside it, if any.\n */\n certificateParseOptions?: IAsnParseOptions\n}\n\n/**\n * Parse an ETSI TS 119 612 `TrustServiceStatusList` XML into a normalized\n * {@link TrustedList}. This does NOT verify the list signature — call\n * {@link verifyTrustedListSignature} first (or use {@link loadTrustedList}).\n */\nexport function parseTrustedList(xml: string, options: ParseTrustedListOptions = {}): TrustedList {\n const doc = new DOMParser().parseFromString(xml, 'application/xml')\n const root: Element | null = doc.documentElement\n if (root?.localName !== 'TrustServiceStatusList') {\n throw new TrustedListParseError('Root element is not a TS 119 612 TrustServiceStatusList')\n }\n\n // The signature in the list does not sign its own KeyInfo and ds:Object, apart from the signed properties, so the\n // scheme information and the providers are only read from their place in the list (ETSI TS 119 612 clause 5)\n const schemeInfo = child(root, 'SchemeInformation')\n const sequenceText = textOf(schemeInfo && firstDescendant(schemeInfo, 'TSLSequenceNumber'))\n const nextUpdate = schemeInfo && firstDescendant(schemeInfo, 'NextUpdate')\n\n const providers: TrustServiceProvider[] = []\n for (const tsp of children(child(root, 'TrustServiceProviderList'), 'TrustServiceProvider')) {\n const services: TrustedListService[] = []\n for (const service of descendants(tsp, 'TSPService')) {\n const info = firstDescendant(service, 'ServiceInformation')\n if (!info) continue\n const serviceTypeIdentifier = textOf(firstDescendant(info, 'ServiceTypeIdentifier'))\n const serviceStatus = textOf(firstDescendant(info, 'ServiceStatus'))\n if (!serviceTypeIdentifier || !serviceStatus) continue\n services.push({\n serviceTypeIdentifier,\n serviceStatus,\n serviceName: localizedName(firstDescendant(info, 'ServiceName')),\n digitalIdentities: parseDigitalIdentities(info, options.certificateParseOptions),\n qualifiers: parseQualifiers(info),\n history: parseHistory(service),\n })\n }\n providers.push({\n name: localizedName(firstDescendant(tsp, 'TSPName')),\n services,\n })\n }\n\n // Validate the constructed object through the zod schema, so parsing is\n // schema-driven (the same approach @owf/eudi-lote uses for TS 119 602 JSON).\n return assertValidTrustedList({\n tslType: textOf(schemeInfo && firstDescendant(schemeInfo, 'TSLType')),\n schemeOperatorName: localizedName(schemeInfo && firstDescendant(schemeInfo, 'SchemeOperatorName')),\n // A pointer to another list has a SchemeTerritory as well, so only a direct child is the list's own\n schemeTerritory: textOf(schemeInfo && child(schemeInfo, 'SchemeTerritory')),\n sequenceNumber: sequenceText ? Number(sequenceText) : undefined,\n listIssueDateTime: textOf(schemeInfo && firstDescendant(schemeInfo, 'ListIssueDateTime')),\n nextUpdate: textOf(nextUpdate && firstDescendant(nextUpdate, 'dateTime')),\n providers,\n pointersToOtherLists: schemeInfo ? parsePointers(schemeInfo, options.certificateParseOptions) : undefined,\n })\n}\n\n/** Selects `PointersToOtherTSL` entries in {@link getPointerSigningCertificates}. */\nexport interface TrustedListPointerFilter {\n /** `SchemeTerritory` of the pointed-to list (e.g. `ES`), case-insensitive. */\n schemeTerritory?: string\n /** `TSLType` of the pointed-to list, compared scheme-insensitively. */\n tslType?: string\n /** Exact `TSLLocation` URL of the pointed-to list. */\n location?: string\n}\n\n/**\n * The DER-encoded certificates a list publishes for the lists it points to —\n * i.e. the trust anchors with which those lists are signed, ready to be passed\n * as `trustAnchors` to `verifyTrustedListSignature`.\n *\n * This is the mechanism by which a trusted list distributes trust downwards: a\n * verifier that has established trust in one list (for the EU LOTL, by pinning\n * its signing certificates out of band) obtains the anchors of every list it\n * points to without pinning them individually.\n *\n * ```ts\n * const lotl = await loadTrustedList(lotlXml, { trustAnchors: getEuLotlTrustAnchors() })\n * const esAnchors = getPointerSigningCertificates(lotl, { schemeTerritory: 'ES' })\n * const esList = await loadTrustedList(esXml, { trustAnchors: esAnchors })\n * ```\n *\n * Passing `{ tslType: TslType.EUlistofthelists }` returns the LOTL's own\n * currently published signing certificates (from its self-pointer), which is\n * how a deployment refreshes its pinned set as the scheme operator rotates keys.\n */\nexport function getPointerSigningCertificates(\n trustedList: TrustedList,\n filter: TrustedListPointerFilter = {}\n): Uint8Array[] {\n const certificates: Uint8Array[] = []\n const seen = new Set<string>()\n for (const pointer of trustedList.pointersToOtherLists ?? []) {\n if (filter.location && pointer.location !== filter.location) continue\n if (filter.schemeTerritory && pointer.schemeTerritory?.toUpperCase() !== filter.schemeTerritory.toUpperCase()) {\n continue\n }\n if (filter.tslType && stripScheme(pointer.tslType) !== stripScheme(filter.tslType)) continue\n for (const identity of pointer.digitalIdentities) {\n if (!identity.certificate || seen.has(identity.certificate)) continue\n seen.add(identity.certificate)\n certificates.push(base64.decode(identity.certificate))\n }\n }\n return certificates\n}\n\nexport interface TrustAnchorFilter {\n /**\n * When set, only include services whose `serviceStatus` is in this list\n * (e.g. `ACTIVE_SERVICE_STATUSES`). Withdrawn/deprecated services are\n * excluded.\n */\n serviceStatus?: string[]\n /** When set, only include services whose `serviceTypeIdentifier` matches. */\n serviceTypeIdentifier?: string[]\n /**\n * When true, only include anchors that embed an X.509 certificate (i.e. the\n * ones usable for certificate-chain validation). Defaults to false, which\n * also returns SubjectName/SKI-only identities (useful for AKI queries).\n */\n requireCertificate?: boolean\n}\n\n/**\n * Flatten a {@link TrustedList} into individual {@link TrustAnchor} entries —\n * the normalized unit consumed by certificate-chain validation and AKI\n * emission.\n */\nexport function getTrustAnchors(trustedList: TrustedList, filter: TrustAnchorFilter = {}): TrustAnchor[] {\n const anchors: TrustAnchor[] = []\n for (const provider of trustedList.providers) {\n for (const service of provider.services) {\n if (filter.serviceStatus && !filter.serviceStatus.includes(service.serviceStatus)) {\n continue\n }\n if (filter.serviceTypeIdentifier && !filter.serviceTypeIdentifier.includes(service.serviceTypeIdentifier)) {\n continue\n }\n for (const identity of service.digitalIdentities) {\n if (filter.requireCertificate && !identity.certificate) {\n continue\n }\n anchors.push({\n certificate: identity.certificate,\n subjectName: identity.subjectName,\n subjectKeyIdentifier: identity.subjectKeyIdentifier,\n serviceTypeIdentifier: service.serviceTypeIdentifier,\n serviceStatus: service.serviceStatus,\n providerName: provider.name,\n })\n }\n }\n }\n return anchors\n}\n","import { ServiceStatus, ServiceType, TslType } from './constants'\nimport type { ProfileRule } from './validate'\n\n/** Every standard TS 119 612 service status (clause 5.5.4). */\nconst ALL_SERVICE_STATUSES: string[] = Object.values(ServiceStatus)\n\n/** The standard qualified `ServiceTypeIdentifier` values (Annex D). */\nconst QUALIFIED_SERVICE_TYPES: string[] = Object.values(ServiceType)\n\n/**\n * Ready-made {@link ProfileRule}s for common ETSI ecosystems, so callers don't\n * have to hand-write the URIs. The engine ({@link validateTrustedListProfile})\n * stays profile-agnostic; these are just convenience constants you pass into it.\n *\n * A profile is an allowlist: the structural schema is checked first, then the\n * list's `TSLType` must match and every service's type/status must be permitted.\n * That fits homogeneous, curated lists well (e.g. Age Verification). For a full\n * eIDAS national list — which legitimately carries withdrawn/ceased services and\n * a broad mix of qualified service types — {@link euGeneric} therefore permits\n * all standard ETSI statuses and qualified service types: it asserts \"this is a\n * well-formed EU generic list using standard ETSI URIs\", not \"only currently\n * active CAs\". Narrow further with your own {@link ProfileRule} when you need to.\n */\nexport const TrustedListProfiles = {\n /**\n * EU List of Trusted Lists (LOTL). Its `TSLType` is `EUlistofthelists` and it\n * carries pointers to national lists rather than trust-service providers, so\n * no service type/status is permitted (a conforming LOTL has no TSP services).\n */\n euLotl: {\n name: 'eu-lotl',\n tslType: TslType.EUlistofthelists,\n serviceTypes: [],\n serviceStatuses: [],\n },\n /**\n * A generic EU (eIDAS national) trusted list: `TSLType` `EUgeneric`, any\n * standard qualified service type, any standard service status (including\n * withdrawn/ceased entries that national lists retain for history).\n */\n euGeneric: {\n name: 'eu-generic',\n tslType: TslType.EUgeneric,\n serviceTypes: QUALIFIED_SERVICE_TYPES,\n serviceStatuses: ALL_SERVICE_STATUSES,\n },\n /**\n * EU Age Verification trusted list, per the European Commission's \"AV Trusted\n * List Specifications\" (DIGIT.B.3). The `TSLType` (clause 5.3.3), the single\n * Proof of Age Attestation service type (`paa`, clause 5.5.1) and the two\n * permitted service statuses (clause 5.5.4) are fixed by that specification —\n * which states the statuses \"may be used to the exclusion of any other\", so\n * the allowlist model captures the AV profile exactly. Deployed lists have\n * used `https` for the `TSLType`; the profile compares scheme-insensitively.\n */\n ageVerification: {\n name: 'eu-age-verification',\n tslType: 'http://trust.tech.ec.europa.eu/lists/age-verification/tsl-type',\n serviceTypes: ['http://trust.tech.ec.europa.eu/lists/age-verification/service-type/paa'],\n serviceStatuses: [\n 'http://trust.tech.ec.europa.eu/lists/age-verification/service-status/recognized',\n 'http://trust.tech.ec.europa.eu/lists/age-verification/service-status/deprecated',\n ],\n },\n} satisfies Record<string, ProfileRule>\n","import { base64, compareBytes } from '@owf/identity-common'\nimport { DOMParser, XMLSerializer, type Document as XmlDocument, type Element as XmlElement } from '@xmldom/xmldom'\nimport * as xadesjs from 'xadesjs'\nimport * as xpath from 'xpath'\nimport { TrustedListSignatureError } from './trusted-list-error'\n\nconst XMLDSIG_NS = 'http://www.w3.org/2000/09/xmldsig#'\nconst TSL_NS = 'http://uri.etsi.org/02231/v2#'\nconst XADES_NS = 'http://uri.etsi.org/01903/v1.3.2#'\nconst SIGNED_PROPERTIES_TYPE = 'http://uri.etsi.org/01903#SignedProperties'\n\n/** Canonicalization methods: exclusive C14N, C14N 1.0 and C14N 1.1, with and without comments. */\nconst CANONICALIZATIONS = new Set([\n 'http://www.w3.org/2001/10/xml-exc-c14n#',\n 'http://www.w3.org/2001/10/xml-exc-c14n#WithComments',\n 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315',\n 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments',\n 'http://www.w3.org/2006/12/xml-c14n11',\n 'http://www.w3.org/2006/12/xml-c14n11#WithComments',\n])\n\nconst ENVELOPED_SIGNATURE = 'http://www.w3.org/2000/09/xmldsig#enveloped-signature'\n\n/** Transforms of a reference: the enveloped signature and canonicalization. */\nconst TRANSFORMS = new Set([ENVELOPED_SIGNATURE, ...CANONICALIZATIONS])\n\n/** The elements with this `Id`, `ID` or `id`: the attributes by which xmldsigjs resolves a `#` reference. */\nfunction elementsWithId(doc: XmlDocument, id: string): XmlElement[] {\n return Array.from(doc.getElementsByTagName('*')).filter((element) =>\n ['Id', 'ID', 'id'].some((name) => element.hasAttribute(name) && element.getAttribute(name) === id)\n )\n}\n\n/**\n * Check the signature against the profile of ETSI TS 119 612 before xmldsigjs verifies it.\n *\n * xmldsigjs applies the transforms of every reference to the document before it checks the signature value, so whoever\n * serves the list chooses what runs: the XPath transform, evaluated once per node, takes quadratic time on a large\n * list (XML Signature Best Practices section 2.1). Only the enveloped-signature transform and canonicalization are\n * accepted, each at most once per reference, as each runs on the whole referenced element, and xmldsigjs searches the\n * whole document for the target of each `#` reference.\n *\n * ETSI TS 119 612 V2.4.1 Annex B.1.0: the signature references the `TrustServiceStatusList` that envelops it. A `#`\n * reference resolves to any element with that `Id`, so a list signed by reference to another element, or with an `Id`\n * that occurs twice, could be wrapped into another root, whose content `parseTrustedList` would then read (XML\n * Signature Best Practices section 3.1). So one reference is `URI=\"\"` or the `Id` of the root, which no other element\n * has, and at most one other reference is to the XAdES `SignedProperties` of the signature.\n */\nfunction assertSignatureProfile(doc: XmlDocument, signature: XmlElement): void {\n const root = doc.documentElement\n if (\n root?.namespaceURI !== TSL_NS ||\n root.localName !== 'TrustServiceStatusList' ||\n doc.getElementsByTagNameNS(TSL_NS, 'TrustServiceStatusList').length !== 1\n ) {\n throw new TrustedListSignatureError('The trusted list must be the root and the only TrustServiceStatusList')\n }\n\n for (const method of Array.from(signature.getElementsByTagNameNS(XMLDSIG_NS, 'CanonicalizationMethod'))) {\n const algorithm = method.getAttribute('Algorithm') ?? ''\n if (!CANONICALIZATIONS.has(algorithm)) {\n throw new TrustedListSignatureError(\n `Trusted list signature uses the canonicalization ${JSON.stringify(algorithm)}, which is not allowed`\n )\n }\n }\n for (const transform of Array.from(signature.getElementsByTagNameNS(XMLDSIG_NS, 'Transform'))) {\n const algorithm = transform.getAttribute('Algorithm') ?? ''\n if (!TRANSFORMS.has(algorithm)) {\n throw new TrustedListSignatureError(\n `Trusted list signature uses the transform ${JSON.stringify(algorithm)}, which is not allowed`\n )\n }\n }\n\n const signedInfo = Array.from(signature.childNodes).find(\n (node): node is XmlElement =>\n (node as XmlElement).namespaceURI === XMLDSIG_NS && (node as XmlElement).localName === 'SignedInfo'\n )\n const references = Array.from(signedInfo?.getElementsByTagNameNS(XMLDSIG_NS, 'Reference') ?? [])\n if (references.length > 2) {\n throw new TrustedListSignatureError('Trusted list signature has more than two references')\n }\n const rootId = root.getAttribute('Id')\n let referencesList = false\n for (const reference of references) {\n const algorithms = Array.from(reference.getElementsByTagNameNS(XMLDSIG_NS, 'Transform')).map((transform) =>\n transform.getAttribute('Algorithm')\n )\n if (\n algorithms.filter((algorithm) => algorithm === ENVELOPED_SIGNATURE).length > 1 ||\n algorithms.filter((algorithm) => algorithm && CANONICALIZATIONS.has(algorithm)).length > 1\n ) {\n throw new TrustedListSignatureError(\n 'Trusted list signature applies the enveloped-signature transform or a canonicalization twice to a reference'\n )\n }\n\n const uri = reference.getAttribute('URI')\n if (uri === '' || (rootId && uri === `#${rootId}` && elementsWithId(doc, rootId).length === 1)) {\n if (referencesList) throw new TrustedListSignatureError('Trusted list signature references the list twice')\n referencesList = true\n continue\n }\n const targets =\n reference.getAttribute('Type') === SIGNED_PROPERTIES_TYPE && uri?.startsWith('#')\n ? elementsWithId(doc, uri.slice(1))\n : []\n if (targets.length !== 1 || targets[0].namespaceURI !== XADES_NS || targets[0].localName !== 'SignedProperties') {\n throw new TrustedListSignatureError(\n `Trusted list signature references ${JSON.stringify(uri)}, which is neither the list nor its signed properties`\n )\n }\n }\n if (!referencesList) {\n throw new TrustedListSignatureError('Trusted list signature does not reference the list')\n }\n}\n\nlet nodeDependenciesInitialized = false\nlet installedCrypto: Crypto | undefined\n\n/**\n * Outside the browser, xml-core resolves DOM/XPath implementations through\n * `setNodeDependencies`. Set lazily and once, so importing this package has no\n * side effects until a signature is actually processed.\n */\nfunction ensureNodeDependencies(): void {\n if (nodeDependenciesInitialized) return\n xadesjs.setNodeDependencies({ DOMParser, XMLSerializer, xpath })\n nodeDependenciesInitialized = true\n}\n\n/**\n * Install the WebCrypto implementation used to verify trusted list signatures\n * (\"bring your own crypto\"), for callers that must route verification through a\n * reviewed or policy-constrained engine. Call it once during start-up, before\n * verifying; without it, the global Web Crypto API (`globalThis.crypto`,\n * available in Node >= 20 and browsers) is used.\n *\n * Process-wide by necessity, not by design: xadesjs exposes a single global\n * crypto engine rather than a per-call context\n * (see {@link https://github.com/PeculiarVentures/xmldsigjs/issues/119}).\n * A per-invocation option would look isolated while still swapping that global,\n * so concurrent verifications with different engines would race; it is\n * deliberately not offered. Should upstream gain per-call crypto, accepting it\n * as a verification option is an additive, non-breaking change.\n */\nexport function setTrustedListCrypto(crypto: Crypto): void {\n ensureNodeDependencies()\n xadesjs.Application.setEngine('eudi-tl', crypto)\n installedCrypto = crypto\n}\n\n/**\n * Make sure a crypto engine is installed before verifying. A caller-installed\n * engine is never replaced — falling back to `globalThis.crypto` on every call\n * that does not opt in would silently undo {@link setTrustedListCrypto}.\n */\nfunction ensureXmlSignatureEngine(): void {\n ensureNodeDependencies()\n if (!installedCrypto) setTrustedListCrypto(globalThis.crypto)\n}\n\nexport interface VerifyTrustedListOptions {\n /**\n * DER-encoded certificates the trusted list's signer certificate must match.\n * When provided, verification fails closed unless the signature verifies\n * with the key of one of these anchors — establishing that the list was\n * signed by the expected scheme operator, not merely by *some* key. An empty\n * list fails closed too.\n *\n * When omitted, only the cryptographic validity of the enveloped signature\n * is checked; that proves integrity, NOT trust. Production callers should\n * always pin the scheme operator certificate(s).\n */\n trustAnchors?: Uint8Array[]\n}\n\nexport interface VerifyTrustedListResult {\n /** base64-encoded DER of the signer certificate from the signature KeyInfo, whose key verified the signature. */\n signerCertificateBase64: string\n}\n\n/** A certificate of the signature KeyInfo, as xmldsigjs parses it. */\ninterface KeyInfoCertificate {\n GetRaw(): Uint8Array\n exportKey(algorithm: Algorithm): Promise<CryptoKey>\n}\n\n/**\n * xmldsigjs accepts a signature that any key in the KeyInfo verifies, but the KeyInfo is not signed: whoever passes\n * the list can add their own key next to a pinned certificate. So the signature is verified with the key of the\n * `signerCertificate` only.\n */\nclass SignerCertificateSignedXml extends xadesjs.SignedXml {\n signerCertificate?: KeyInfoCertificate\n\n /** The certificates of the X509Data elements in the KeyInfo. */\n keyInfoCertificates(): KeyInfoCertificate[] {\n return this.XmlSignature.KeyInfo.GetIterator().flatMap(\n (clause) => (clause as { Certificates?: KeyInfoCertificate[] }).Certificates ?? []\n )\n }\n\n protected override async GetPublicKeys(): Promise<CryptoKey[]> {\n if (!this.signerCertificate || !this.Algorithm) return []\n // exportKey sets the namedCurve of an ECDSA algorithm on the object it is given\n const key = await this.signerCertificate.exportKey({ ...this.Algorithm })\n if (!key.algorithm.name.startsWith('RSA')) return [key]\n // As in xmldsigjs, an RSA key is imported again with the hash of the signature algorithm\n const subtle = xadesjs.Application.crypto.subtle\n const spki = await subtle.exportKey('spki', key)\n return [await subtle.importKey('spki', spki, this.Algorithm as RsaHashedImportParams, true, ['verify'])]\n }\n}\n\n/**\n * Verify the enveloped XAdES/XMLDSig signature of an ETSI TS 119 612 Trusted\n * List. Throws {@link TrustedListSignatureError} when the signature is\n * missing, invalid, not the only `ds:Signature` of the list, uses a transform\n * other than the enveloped signature and canonicalization, does not reference\n * the list itself, or (with `trustAnchors`) is not verified by the key of a\n * pinned scheme operator certificate.\n *\n * Verified against a standard eIDAS national trusted list (RSA-SHA512,\n * exclusive C14N, XAdES SignedProperties).\n *\n * Verification runs on the global Web Crypto API unless another implementation\n * was installed with {@link setTrustedListCrypto}.\n */\nexport async function verifyTrustedListSignature(\n xml: string,\n options: VerifyTrustedListOptions = {}\n): Promise<VerifyTrustedListResult> {\n ensureXmlSignatureEngine()\n\n const { trustAnchors } = options\n if (trustAnchors?.length === 0) {\n throw new TrustedListSignatureError('No trust anchors are configured, so no signer certificate can be trusted')\n }\n\n const doc = new DOMParser().parseFromString(xml, 'application/xml')\n const signatures = doc.getElementsByTagNameNS(XMLDSIG_NS, 'Signature')\n if (signatures.length === 0) {\n throw new TrustedListSignatureError('No ds:Signature found in the trusted list')\n }\n // ETSI TS 119 612 clause 5.7.1: one enveloped signature. The enveloped-signature transform leaves out every\n // ds:Signature child of the root, so the content of another one would not be signed.\n if (signatures.length > 1 || signatures[0].parentNode !== doc.documentElement) {\n throw new TrustedListSignatureError('The trusted list must have exactly one ds:Signature, as a child of its root')\n }\n assertSignatureProfile(doc, signatures[0])\n\n // xadesjs is typed against the lib.dom DOM; @xmldom implements the same\n // shape at runtime, so bridge the two nominal types at this boundary only.\n const signedXml = new SignerCertificateSignedXml(doc as unknown as Document)\n signedXml.LoadXml(signatures[0] as unknown as Element)\n\n const certificates = signedXml.keyInfoCertificates()\n if (certificates.length === 0) {\n throw new TrustedListSignatureError('Trusted list signature has no X509Certificate in KeyInfo')\n }\n const candidates = trustAnchors\n ? certificates.filter((certificate) => trustAnchors.some((anchor) => compareBytes(anchor, certificate.GetRaw())))\n : certificates.slice(0, 1)\n if (candidates.length === 0) {\n throw new TrustedListSignatureError('Trusted list signer certificate is not among the configured trust anchors')\n }\n\n for (const candidate of candidates) {\n signedXml.signerCertificate = candidate\n let valid: boolean\n try {\n valid = await signedXml.Verify()\n } catch (error) {\n throw new TrustedListSignatureError(\n `Trusted list signature could not be verified: ${error instanceof Error ? error.message : String(error)}`,\n { cause: error }\n )\n }\n if (valid) return { signerCertificateBase64: base64.encode(candidate.GetRaw()) }\n }\n\n throw new TrustedListSignatureError('Trusted list signature is invalid')\n}\n","import { base64 } from '@owf/identity-common'\nimport { EU_LOTL_SIGNING_CERTIFICATES } from './eu-lotl-anchors'\nimport { type ParseTrustedListOptions, parseTrustedList } from './parse'\nimport { TrustedListProfiles } from './profiles'\nimport { TrustedListValidationError } from './trusted-list-error'\nimport type { TrustedList } from './types'\nimport { validateTrustedListProfile } from './validate'\nimport { type VerifyTrustedListOptions, type VerifyTrustedListResult, verifyTrustedListSignature } from './verify'\n\n/**\n * The LOTL signing certificates shipped with this package, as DER bytes ready\n * to pass as `trustAnchors`.\n *\n * This pinned set is the root of the eIDAS trusted-list hierarchy and cannot be\n * bootstrapped from the LOTL itself — a forged list would carry a forged\n * self-pointer. It is published by the European Commission in the Official\n * Journal; see {@link EU_LOTL_ANCHORS_PROVENANCE} for the exact act, list issue\n * and expiry of the shipped set.\n *\n * Certificates rotate (historically every 6–24 months), so a deployment has\n * three ways to stay current without waiting for a release of this package:\n *\n * 1. pass its own `trustAnchors`, e.g. from configuration;\n * 2. after verifying a LOTL, read the currently published set from its own\n * self-pointer with `getPointerSigningCertificates(lotl, { tslType:\n * TslType.EUlistofthelists })` and persist it — rotation is announced in a\n * list still signed by the previous generation of keys;\n * 3. follow the pivot LOTLs advertised in the list's `SchemeInformationURI`\n * when the pinned set has fallen behind entirely.\n */\nexport function getEuLotlTrustAnchors(): Uint8Array[] {\n return EU_LOTL_SIGNING_CERTIFICATES.map((entry) => base64.decode(entry.certificate))\n}\n\n/**\n * Verify the signature of the EU List of Trusted Lists against the shipped\n * signing certificates. Identical to {@link verifyTrustedListSignature} except\n * that `trustAnchors` defaults to {@link getEuLotlTrustAnchors} instead of to\n * \"integrity only\" — pass your own to override.\n */\nexport function verifyEuLotlSignature(\n xml: string,\n options: VerifyTrustedListOptions = {}\n): Promise<VerifyTrustedListResult> {\n return verifyTrustedListSignature(xml, { ...options, trustAnchors: options.trustAnchors ?? getEuLotlTrustAnchors() })\n}\n\n/**\n * Verify, parse and profile-check the EU List of Trusted Lists in one step: the\n * safe entry point for the top of the hierarchy. The returned list carries the\n * `PointersToOtherTSL` entries from which national list anchors are derived\n * with `getPointerSigningCertificates`.\n */\nexport async function loadEuLotl(\n xml: string,\n options: VerifyTrustedListOptions & ParseTrustedListOptions = {}\n): Promise<TrustedList> {\n await verifyEuLotlSignature(xml, options)\n const lotl = parseTrustedList(xml, options)\n const profile = validateTrustedListProfile(lotl, TrustedListProfiles.euLotl)\n if (!profile.valid) throw new TrustedListValidationError('Not a conforming EU List of Trusted Lists', profile.issues)\n return lotl\n}\n","/**\n * @owf/eudi-tl\n *\n * Parse and verify ETSI TS 119 612 XML Trusted Lists and expose normalized\n * trust anchors. Companion to `@owf/eudi-lote` (ETSI TS 119 602, JSON): both\n * resolve to the same normalized notion of a trust anchor, so a verifier can\n * consume either format and, for example, derive AKIs to send to a wallet.\n */\nexport {\n ACTIVE_SERVICE_STATUSES,\n ServiceStatus,\n ServiceType,\n TslType,\n} from './constants'\nexport {\n getEuLotlTrustAnchors,\n loadEuLotl,\n verifyEuLotlSignature,\n} from './eu-lotl'\nexport {\n EU_LOTL_ANCHORS_PROVENANCE,\n EU_LOTL_SIGNING_CERTIFICATES,\n type EuLotlSigningCertificate,\n} from './eu-lotl-anchors'\nexport {\n getPointerSigningCertificates,\n getTrustAnchors,\n type ParseTrustedListOptions,\n parseTrustedList,\n type TrustAnchorFilter,\n type TrustedListPointerFilter,\n} from './parse'\nexport { TrustedListProfiles } from './profiles'\nexport {\n TrustedListError,\n TrustedListParseError,\n TrustedListSignatureError,\n TrustedListValidationError,\n} from './trusted-list-error'\nexport {\n type DigitalIdentity,\n type ServiceHistoryInstance,\n type TrustAnchor,\n type TrustedList,\n type TrustedListPointer,\n type TrustedListService,\n type TrustServiceProvider,\n zDigitalIdentity,\n zServiceHistoryInstance,\n zTrustAnchor,\n zTrustedList,\n zTrustedListPointer,\n zTrustedListService,\n zTrustServiceProvider,\n} from './types'\nexport {\n assertValidTrustedList,\n type ProfileRule,\n TRUSTED_LIST_VALIDATION_CODES,\n type TrustedListValidationCode,\n type TrustedListValidationIssue,\n type ValidationResult,\n validateTrustedList,\n validateTrustedListProfile,\n} from './validate'\nexport {\n setTrustedListCrypto,\n type VerifyTrustedListOptions,\n type VerifyTrustedListResult,\n verifyTrustedListSignature,\n} from './verify'\n\nimport { type ParseTrustedListOptions, parseTrustedList } from './parse'\nimport { TrustedListSignatureError } from './trusted-list-error'\nimport type { TrustedList } from './types'\nimport { type VerifyTrustedListOptions, verifyTrustedListSignature } from './verify'\n\n/**\n * Verify the trusted list signature against the `trustAnchors` and, only if it\n * is valid, parse it. This is the safe entry point: it never returns a\n * {@link TrustedList} whose authenticity has not been established.\n *\n * @throws TrustedListSignatureError when `trustAnchors` is missing or empty, or the signature is not valid.\n */\nexport async function loadTrustedList(\n xml: string,\n options: Required<VerifyTrustedListOptions> & ParseTrustedListOptions\n): Promise<TrustedList> {\n // Without them, the signature check would only establish the integrity of the list\n if (!options?.trustAnchors) {\n throw new TrustedListSignatureError('loadTrustedList needs the trustAnchors of the scheme operator')\n }\n await verifyTrustedListSignature(xml, options)\n return parseTrustedList(xml, options)\n}\n"],"mappings":";;;;;;;;;;;;;;;;AASA,MAAa,UAAU;CACrB,WAAW;CACX,kBAAkB;AACpB;;AAGA,MAAa,gBAAgB;CAC3B,SAAS;CACT,WAAW;CACX,kBAAkB;CAClB,mBAAmB;CACnB,wBAAwB;CACxB,YAAY;CACZ,qBAAqB;CACrB,sBAAsB;CACtB,kBAAkB;CAClB,2BAA2B;CAC3B,2BAA2B;AAC7B;;;;;;AAOA,MAAa,0BAAoC;CAC/C,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;AAChB;;AAGA,MAAa,cAAc;;CAEzB,OAAO;;CAEP,QAAQ;;CAER,UAAU;;CAEV,OAAO;;CAEP,WAAW;;CAEX,QAAQ;;CAER,iBAAiB;;CAEjB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MAAM,WAAW,CAAC;AACrF;;;;;;;AAQA,SAAgB,sBACd,KACA,UAAoC,CAAC,GACH;CAClC,OAAO,2BAA2B,KAAK;EAAE,GAAG;EAAS,cAAc,QAAQ,gBAAgB,sBAAsB;CAAE,CAAC;AACtH;;;;;;;AAQA,eAAsB,WACpB,KACA,UAA8D,CAAC,GACzC;CACtB,MAAM,sBAAsB,KAAK,OAAO;CACxC,MAAM,OAAO,iBAAiB,KAAK,OAAO;CAC1C,MAAM,UAAU,2BAA2B,MAAM,oBAAoB,MAAM;CAC3E,IAAI,CAAC,QAAQ,OAAO,MAAM,IAAI,2BAA2B,6CAA6C,QAAQ,MAAM;CACpH,OAAO;AACT;;;;;;;;;ACsBA,eAAsB,gBACpB,KACA,SACsB;CAEtB,IAAI,CAAC,SAAS,cACZ,MAAM,IAAI,0BAA0B,+DAA+D;CAErG,MAAM,2BAA2B,KAAK,OAAO;CAC7C,OAAO,iBAAiB,KAAK,OAAO;AACtC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owf/eudi-tl",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1-alpha-20261117104856",
|
|
4
4
|
"description": "Parse and verify ETSI TS 119 612 XML Trusted Lists, exposing normalized trust anchors",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"xadesjs": "^3.1.0",
|
|
41
41
|
"xpath": "^0.0.36",
|
|
42
42
|
"zod": "^4.6.7",
|
|
43
|
-
"@owf/identity-common": "^0.8.
|
|
43
|
+
"@owf/identity-common": "^0.8.1-alpha-20261117104856"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "tsdown src/index.ts --format esm --dts --sourcemap"
|