edockit 0.4.0-dev.0 → 0.4.0-dev.1

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.
Files changed (49) hide show
  1. package/dist/{certificate-c46e14a0.js → certificate-3c9dcdac.js} +16 -27
  2. package/dist/certificate-3c9dcdac.js.map +1 -0
  3. package/dist/{certificate-fc0e06f7.js → certificate-c7123a37.js} +37 -27
  4. package/dist/certificate-c7123a37.js.map +1 -0
  5. package/dist/identity-c9e5052e.js +410 -0
  6. package/dist/identity-c9e5052e.js.map +1 -0
  7. package/dist/identity-fca881b1.js +406 -0
  8. package/dist/identity-fca881b1.js.map +1 -0
  9. package/dist/index.cjs.js +40 -1244
  10. package/dist/index.cjs.js.map +1 -1
  11. package/dist/index.esm.js +36 -1240
  12. package/dist/index.esm.js.map +1 -1
  13. package/dist/index.umd.js +23 -17
  14. package/dist/index.umd.js.map +1 -1
  15. package/dist/{loader-43d8e17a.js → loader-7a0f771f.js} +2 -2
  16. package/dist/{loader-43d8e17a.js.map → loader-7a0f771f.js.map} +1 -1
  17. package/dist/{loader-1ac52e12.js → loader-ad1a5051.js} +2 -2
  18. package/dist/{loader-1ac52e12.js.map → loader-ad1a5051.js.map} +1 -1
  19. package/dist/normalize-50862581.js +456 -0
  20. package/dist/normalize-50862581.js.map +1 -0
  21. package/dist/normalize-9626be7c.js +479 -0
  22. package/dist/normalize-9626be7c.js.map +1 -0
  23. package/dist/{reference-provider-1cd85b7b.js → reference-provider-3838ebfb.js} +4 -4
  24. package/dist/{reference-provider-1cd85b7b.js.map → reference-provider-3838ebfb.js.map} +1 -1
  25. package/dist/{reference-provider-53240217.js → reference-provider-9bbbaab8.js} +4 -4
  26. package/dist/{reference-provider-53240217.js.map → reference-provider-9bbbaab8.js.map} +1 -1
  27. package/dist/trusted-list-build.cjs.js +8 -3
  28. package/dist/trusted-list-build.cjs.js.map +1 -1
  29. package/dist/trusted-list-build.esm.js +8 -3
  30. package/dist/trusted-list-build.esm.js.map +1 -1
  31. package/dist/trusted-list-bundled.cjs.js +7 -4
  32. package/dist/trusted-list-bundled.cjs.js.map +1 -1
  33. package/dist/trusted-list-bundled.esm.js +7 -4
  34. package/dist/trusted-list-bundled.esm.js.map +1 -1
  35. package/dist/trusted-list.cjs.js +7 -4
  36. package/dist/trusted-list.cjs.js.map +1 -1
  37. package/dist/trusted-list.esm.js +7 -4
  38. package/dist/trusted-list.esm.js.map +1 -1
  39. package/package.json +1 -1
  40. package/dist/certificate-c46e14a0.js.map +0 -1
  41. package/dist/certificate-fc0e06f7.js.map +0 -1
  42. package/dist/identity-1a3dddc3.js +0 -902
  43. package/dist/identity-1a3dddc3.js.map +0 -1
  44. package/dist/identity-b3a70fc1.js +0 -897
  45. package/dist/identity-b3a70fc1.js.map +0 -1
  46. package/dist/normalize-60f2d7e6.js +0 -6270
  47. package/dist/normalize-60f2d7e6.js.map +0 -1
  48. package/dist/normalize-70da6516.js +0 -6214
  49. package/dist/normalize-70da6516.js.map +0 -1
package/dist/index.cjs.js CHANGED
@@ -8,9 +8,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
8
8
 
9
9
  var fflate = require('fflate');
10
10
  var x509 = require('@peculiar/x509');
11
- var certificate = require('./certificate-fc0e06f7.js');
12
- var identity = require('./identity-1a3dddc3.js');
13
- var normalize = require('./normalize-60f2d7e6.js');
11
+ var certificate = require('./certificate-c7123a37.js');
12
+ var identity = require('./identity-c9e5052e.js');
13
+ var normalize = require('./normalize-9626be7c.js');
14
+ var asn1Schema = require('@peculiar/asn1-schema');
15
+ var asn1Cms = require('@peculiar/asn1-cms');
16
+ var asn1Tsp = require('@peculiar/asn1-tsp');
17
+ require('@xmldom/xmldom');
18
+ require('xpath');
19
+ require('@peculiar/asn1-ocsp');
20
+ require('@peculiar/asn1-x509');
14
21
 
15
22
  // Canonicalization method URIs
16
23
  const CANONICALIZATION_METHODS = {
@@ -1180,9 +1187,6 @@ const DEFAULT_REVOCATION_OPTIONS = {
1180
1187
  crlTimeout: 10000,
1181
1188
  };
1182
1189
 
1183
- class SubjectKeyIdentifier extends normalize.KeyIdentifier {
1184
- }
1185
-
1186
1190
  // src/core/revocation/crl.ts
1187
1191
  /**
1188
1192
  * OID for CRL Distribution Points extension
@@ -1416,1238 +1420,6 @@ async function checkCertificateRevocation(cert, options = {}) {
1416
1420
  };
1417
1421
  }
1418
1422
 
1419
- class IssuerAndSerialNumber {
1420
- constructor(params = {}) {
1421
- this.issuer = new normalize.Name();
1422
- this.serialNumber = new ArrayBuffer(0);
1423
- Object.assign(this, params);
1424
- }
1425
- }
1426
- normalize.__decorate([
1427
- normalize.AsnProp({ type: normalize.Name })
1428
- ], IssuerAndSerialNumber.prototype, "issuer", void 0);
1429
- normalize.__decorate([
1430
- normalize.AsnProp({ type: normalize.AsnPropTypes.Integer, converter: normalize.AsnIntegerArrayBufferConverter })
1431
- ], IssuerAndSerialNumber.prototype, "serialNumber", void 0);
1432
-
1433
- let SignerIdentifier = class SignerIdentifier {
1434
- constructor(params = {}) {
1435
- Object.assign(this, params);
1436
- }
1437
- };
1438
- normalize.__decorate([
1439
- normalize.AsnProp({ type: SubjectKeyIdentifier, context: 0, implicit: true })
1440
- ], SignerIdentifier.prototype, "subjectKeyIdentifier", void 0);
1441
- normalize.__decorate([
1442
- normalize.AsnProp({ type: IssuerAndSerialNumber })
1443
- ], SignerIdentifier.prototype, "issuerAndSerialNumber", void 0);
1444
- SignerIdentifier = normalize.__decorate([
1445
- normalize.AsnType({ type: normalize.AsnTypeTypes.Choice })
1446
- ], SignerIdentifier);
1447
-
1448
- var CMSVersion;
1449
- (function (CMSVersion) {
1450
- CMSVersion[CMSVersion["v0"] = 0] = "v0";
1451
- CMSVersion[CMSVersion["v1"] = 1] = "v1";
1452
- CMSVersion[CMSVersion["v2"] = 2] = "v2";
1453
- CMSVersion[CMSVersion["v3"] = 3] = "v3";
1454
- CMSVersion[CMSVersion["v4"] = 4] = "v4";
1455
- CMSVersion[CMSVersion["v5"] = 5] = "v5";
1456
- })(CMSVersion || (CMSVersion = {}));
1457
- let DigestAlgorithmIdentifier = class DigestAlgorithmIdentifier extends normalize.AlgorithmIdentifier {
1458
- };
1459
- DigestAlgorithmIdentifier = normalize.__decorate([
1460
- normalize.AsnType({ type: normalize.AsnTypeTypes.Sequence })
1461
- ], DigestAlgorithmIdentifier);
1462
- let SignatureAlgorithmIdentifier = class SignatureAlgorithmIdentifier extends normalize.AlgorithmIdentifier {
1463
- };
1464
- SignatureAlgorithmIdentifier = normalize.__decorate([
1465
- normalize.AsnType({ type: normalize.AsnTypeTypes.Sequence })
1466
- ], SignatureAlgorithmIdentifier);
1467
- let KeyEncryptionAlgorithmIdentifier = class KeyEncryptionAlgorithmIdentifier extends normalize.AlgorithmIdentifier {
1468
- };
1469
- KeyEncryptionAlgorithmIdentifier = normalize.__decorate([
1470
- normalize.AsnType({ type: normalize.AsnTypeTypes.Sequence })
1471
- ], KeyEncryptionAlgorithmIdentifier);
1472
- let ContentEncryptionAlgorithmIdentifier = class ContentEncryptionAlgorithmIdentifier extends normalize.AlgorithmIdentifier {
1473
- };
1474
- ContentEncryptionAlgorithmIdentifier = normalize.__decorate([
1475
- normalize.AsnType({ type: normalize.AsnTypeTypes.Sequence })
1476
- ], ContentEncryptionAlgorithmIdentifier);
1477
- let MessageAuthenticationCodeAlgorithm = class MessageAuthenticationCodeAlgorithm extends normalize.AlgorithmIdentifier {
1478
- };
1479
- MessageAuthenticationCodeAlgorithm = normalize.__decorate([
1480
- normalize.AsnType({ type: normalize.AsnTypeTypes.Sequence })
1481
- ], MessageAuthenticationCodeAlgorithm);
1482
- let KeyDerivationAlgorithmIdentifier = class KeyDerivationAlgorithmIdentifier extends normalize.AlgorithmIdentifier {
1483
- };
1484
- KeyDerivationAlgorithmIdentifier = normalize.__decorate([
1485
- normalize.AsnType({ type: normalize.AsnTypeTypes.Sequence })
1486
- ], KeyDerivationAlgorithmIdentifier);
1487
-
1488
- class Attribute {
1489
- constructor(params = {}) {
1490
- this.attrType = "";
1491
- this.attrValues = [];
1492
- Object.assign(this, params);
1493
- }
1494
- }
1495
- normalize.__decorate([
1496
- normalize.AsnProp({ type: normalize.AsnPropTypes.ObjectIdentifier })
1497
- ], Attribute.prototype, "attrType", void 0);
1498
- normalize.__decorate([
1499
- normalize.AsnProp({ type: normalize.AsnPropTypes.Any, repeated: "set" })
1500
- ], Attribute.prototype, "attrValues", void 0);
1501
-
1502
- var SignerInfos_1;
1503
- class SignerInfo {
1504
- constructor(params = {}) {
1505
- this.version = CMSVersion.v0;
1506
- this.sid = new SignerIdentifier();
1507
- this.digestAlgorithm = new DigestAlgorithmIdentifier();
1508
- this.signatureAlgorithm = new SignatureAlgorithmIdentifier();
1509
- this.signature = new normalize.OctetString();
1510
- Object.assign(this, params);
1511
- }
1512
- }
1513
- normalize.__decorate([
1514
- normalize.AsnProp({ type: normalize.AsnPropTypes.Integer })
1515
- ], SignerInfo.prototype, "version", void 0);
1516
- normalize.__decorate([
1517
- normalize.AsnProp({ type: SignerIdentifier })
1518
- ], SignerInfo.prototype, "sid", void 0);
1519
- normalize.__decorate([
1520
- normalize.AsnProp({ type: DigestAlgorithmIdentifier })
1521
- ], SignerInfo.prototype, "digestAlgorithm", void 0);
1522
- normalize.__decorate([
1523
- normalize.AsnProp({
1524
- type: Attribute,
1525
- repeated: "set",
1526
- context: 0,
1527
- implicit: true,
1528
- optional: true,
1529
- raw: true,
1530
- })
1531
- ], SignerInfo.prototype, "signedAttrs", void 0);
1532
- normalize.__decorate([
1533
- normalize.AsnProp({ type: SignatureAlgorithmIdentifier })
1534
- ], SignerInfo.prototype, "signatureAlgorithm", void 0);
1535
- normalize.__decorate([
1536
- normalize.AsnProp({ type: normalize.OctetString })
1537
- ], SignerInfo.prototype, "signature", void 0);
1538
- normalize.__decorate([
1539
- normalize.AsnProp({ type: Attribute, repeated: "set", context: 1, implicit: true, optional: true })
1540
- ], SignerInfo.prototype, "unsignedAttrs", void 0);
1541
- let SignerInfos = SignerInfos_1 = class SignerInfos extends normalize.AsnArray {
1542
- constructor(items) {
1543
- super(items);
1544
- Object.setPrototypeOf(this, SignerInfos_1.prototype);
1545
- }
1546
- };
1547
- SignerInfos = SignerInfos_1 = normalize.__decorate([
1548
- normalize.AsnType({ type: normalize.AsnTypeTypes.Set, itemType: SignerInfo })
1549
- ], SignerInfos);
1550
-
1551
- let CounterSignature = class CounterSignature extends SignerInfo {
1552
- };
1553
- CounterSignature = normalize.__decorate([
1554
- normalize.AsnType({ type: normalize.AsnTypeTypes.Sequence })
1555
- ], CounterSignature);
1556
-
1557
- let SigningTime = class SigningTime extends normalize.Time {
1558
- };
1559
- SigningTime = normalize.__decorate([
1560
- normalize.AsnType({ type: normalize.AsnTypeTypes.Choice })
1561
- ], SigningTime);
1562
-
1563
- class ACClearAttrs {
1564
- constructor(params = {}) {
1565
- this.acIssuer = new normalize.GeneralName();
1566
- this.acSerial = 0;
1567
- this.attrs = [];
1568
- Object.assign(this, params);
1569
- }
1570
- }
1571
- normalize.__decorate([
1572
- normalize.AsnProp({ type: normalize.GeneralName })
1573
- ], ACClearAttrs.prototype, "acIssuer", void 0);
1574
- normalize.__decorate([
1575
- normalize.AsnProp({ type: normalize.AsnPropTypes.Integer })
1576
- ], ACClearAttrs.prototype, "acSerial", void 0);
1577
- normalize.__decorate([
1578
- normalize.AsnProp({ type: normalize.Attribute, repeated: "sequence" })
1579
- ], ACClearAttrs.prototype, "attrs", void 0);
1580
-
1581
- var AttrSpec_1;
1582
- let AttrSpec = AttrSpec_1 = class AttrSpec extends normalize.AsnArray {
1583
- constructor(items) {
1584
- super(items);
1585
- Object.setPrototypeOf(this, AttrSpec_1.prototype);
1586
- }
1587
- };
1588
- AttrSpec = AttrSpec_1 = normalize.__decorate([
1589
- normalize.AsnType({ type: normalize.AsnTypeTypes.Sequence, itemType: normalize.AsnPropTypes.ObjectIdentifier })
1590
- ], AttrSpec);
1591
-
1592
- class AAControls {
1593
- constructor(params = {}) {
1594
- this.permitUnSpecified = true;
1595
- Object.assign(this, params);
1596
- }
1597
- }
1598
- normalize.__decorate([
1599
- normalize.AsnProp({ type: normalize.AsnPropTypes.Integer, optional: true })
1600
- ], AAControls.prototype, "pathLenConstraint", void 0);
1601
- normalize.__decorate([
1602
- normalize.AsnProp({ type: AttrSpec, implicit: true, context: 0, optional: true })
1603
- ], AAControls.prototype, "permittedAttrs", void 0);
1604
- normalize.__decorate([
1605
- normalize.AsnProp({ type: AttrSpec, implicit: true, context: 1, optional: true })
1606
- ], AAControls.prototype, "excludedAttrs", void 0);
1607
- normalize.__decorate([
1608
- normalize.AsnProp({ type: normalize.AsnPropTypes.Boolean, defaultValue: true })
1609
- ], AAControls.prototype, "permitUnSpecified", void 0);
1610
-
1611
- class IssuerSerial {
1612
- constructor(params = {}) {
1613
- this.issuer = new normalize.GeneralNames();
1614
- this.serial = new ArrayBuffer(0);
1615
- this.issuerUID = new ArrayBuffer(0);
1616
- Object.assign(this, params);
1617
- }
1618
- }
1619
- normalize.__decorate([
1620
- normalize.AsnProp({ type: normalize.GeneralNames })
1621
- ], IssuerSerial.prototype, "issuer", void 0);
1622
- normalize.__decorate([
1623
- normalize.AsnProp({ type: normalize.AsnPropTypes.Integer, converter: normalize.AsnIntegerArrayBufferConverter })
1624
- ], IssuerSerial.prototype, "serial", void 0);
1625
- normalize.__decorate([
1626
- normalize.AsnProp({ type: normalize.AsnPropTypes.BitString, optional: true })
1627
- ], IssuerSerial.prototype, "issuerUID", void 0);
1628
-
1629
- var DigestedObjectType;
1630
- (function (DigestedObjectType) {
1631
- DigestedObjectType[DigestedObjectType["publicKey"] = 0] = "publicKey";
1632
- DigestedObjectType[DigestedObjectType["publicKeyCert"] = 1] = "publicKeyCert";
1633
- DigestedObjectType[DigestedObjectType["otherObjectTypes"] = 2] = "otherObjectTypes";
1634
- })(DigestedObjectType || (DigestedObjectType = {}));
1635
- class ObjectDigestInfo {
1636
- constructor(params = {}) {
1637
- this.digestedObjectType = DigestedObjectType.publicKey;
1638
- this.digestAlgorithm = new normalize.AlgorithmIdentifier();
1639
- this.objectDigest = new ArrayBuffer(0);
1640
- Object.assign(this, params);
1641
- }
1642
- }
1643
- normalize.__decorate([
1644
- normalize.AsnProp({ type: normalize.AsnPropTypes.Enumerated })
1645
- ], ObjectDigestInfo.prototype, "digestedObjectType", void 0);
1646
- normalize.__decorate([
1647
- normalize.AsnProp({ type: normalize.AsnPropTypes.ObjectIdentifier, optional: true })
1648
- ], ObjectDigestInfo.prototype, "otherObjectTypeID", void 0);
1649
- normalize.__decorate([
1650
- normalize.AsnProp({ type: normalize.AlgorithmIdentifier })
1651
- ], ObjectDigestInfo.prototype, "digestAlgorithm", void 0);
1652
- normalize.__decorate([
1653
- normalize.AsnProp({ type: normalize.AsnPropTypes.BitString })
1654
- ], ObjectDigestInfo.prototype, "objectDigest", void 0);
1655
-
1656
- class V2Form {
1657
- constructor(params = {}) {
1658
- Object.assign(this, params);
1659
- }
1660
- }
1661
- normalize.__decorate([
1662
- normalize.AsnProp({ type: normalize.GeneralNames, optional: true })
1663
- ], V2Form.prototype, "issuerName", void 0);
1664
- normalize.__decorate([
1665
- normalize.AsnProp({ type: IssuerSerial, context: 0, implicit: true, optional: true })
1666
- ], V2Form.prototype, "baseCertificateID", void 0);
1667
- normalize.__decorate([
1668
- normalize.AsnProp({ type: ObjectDigestInfo, context: 1, implicit: true, optional: true })
1669
- ], V2Form.prototype, "objectDigestInfo", void 0);
1670
-
1671
- let AttCertIssuer = class AttCertIssuer {
1672
- constructor(params = {}) {
1673
- Object.assign(this, params);
1674
- }
1675
- };
1676
- normalize.__decorate([
1677
- normalize.AsnProp({ type: normalize.GeneralName, repeated: "sequence" })
1678
- ], AttCertIssuer.prototype, "v1Form", void 0);
1679
- normalize.__decorate([
1680
- normalize.AsnProp({ type: V2Form, context: 0, implicit: true })
1681
- ], AttCertIssuer.prototype, "v2Form", void 0);
1682
- AttCertIssuer = normalize.__decorate([
1683
- normalize.AsnType({ type: normalize.AsnTypeTypes.Choice })
1684
- ], AttCertIssuer);
1685
-
1686
- class AttCertValidityPeriod {
1687
- constructor(params = {}) {
1688
- this.notBeforeTime = new Date();
1689
- this.notAfterTime = new Date();
1690
- Object.assign(this, params);
1691
- }
1692
- }
1693
- normalize.__decorate([
1694
- normalize.AsnProp({ type: normalize.AsnPropTypes.GeneralizedTime })
1695
- ], AttCertValidityPeriod.prototype, "notBeforeTime", void 0);
1696
- normalize.__decorate([
1697
- normalize.AsnProp({ type: normalize.AsnPropTypes.GeneralizedTime })
1698
- ], AttCertValidityPeriod.prototype, "notAfterTime", void 0);
1699
-
1700
- class Holder {
1701
- constructor(params = {}) {
1702
- Object.assign(this, params);
1703
- }
1704
- }
1705
- normalize.__decorate([
1706
- normalize.AsnProp({ type: IssuerSerial, implicit: true, context: 0, optional: true })
1707
- ], Holder.prototype, "baseCertificateID", void 0);
1708
- normalize.__decorate([
1709
- normalize.AsnProp({ type: normalize.GeneralNames, implicit: true, context: 1, optional: true })
1710
- ], Holder.prototype, "entityName", void 0);
1711
- normalize.__decorate([
1712
- normalize.AsnProp({ type: ObjectDigestInfo, implicit: true, context: 2, optional: true })
1713
- ], Holder.prototype, "objectDigestInfo", void 0);
1714
-
1715
- var AttCertVersion;
1716
- (function (AttCertVersion) {
1717
- AttCertVersion[AttCertVersion["v2"] = 1] = "v2";
1718
- })(AttCertVersion || (AttCertVersion = {}));
1719
- class AttributeCertificateInfo {
1720
- constructor(params = {}) {
1721
- this.version = AttCertVersion.v2;
1722
- this.holder = new Holder();
1723
- this.issuer = new AttCertIssuer();
1724
- this.signature = new normalize.AlgorithmIdentifier();
1725
- this.serialNumber = new ArrayBuffer(0);
1726
- this.attrCertValidityPeriod = new AttCertValidityPeriod();
1727
- this.attributes = [];
1728
- Object.assign(this, params);
1729
- }
1730
- }
1731
- normalize.__decorate([
1732
- normalize.AsnProp({ type: normalize.AsnPropTypes.Integer })
1733
- ], AttributeCertificateInfo.prototype, "version", void 0);
1734
- normalize.__decorate([
1735
- normalize.AsnProp({ type: Holder })
1736
- ], AttributeCertificateInfo.prototype, "holder", void 0);
1737
- normalize.__decorate([
1738
- normalize.AsnProp({ type: AttCertIssuer })
1739
- ], AttributeCertificateInfo.prototype, "issuer", void 0);
1740
- normalize.__decorate([
1741
- normalize.AsnProp({ type: normalize.AlgorithmIdentifier })
1742
- ], AttributeCertificateInfo.prototype, "signature", void 0);
1743
- normalize.__decorate([
1744
- normalize.AsnProp({ type: normalize.AsnPropTypes.Integer, converter: normalize.AsnIntegerArrayBufferConverter })
1745
- ], AttributeCertificateInfo.prototype, "serialNumber", void 0);
1746
- normalize.__decorate([
1747
- normalize.AsnProp({ type: AttCertValidityPeriod })
1748
- ], AttributeCertificateInfo.prototype, "attrCertValidityPeriod", void 0);
1749
- normalize.__decorate([
1750
- normalize.AsnProp({ type: normalize.Attribute, repeated: "sequence" })
1751
- ], AttributeCertificateInfo.prototype, "attributes", void 0);
1752
- normalize.__decorate([
1753
- normalize.AsnProp({ type: normalize.AsnPropTypes.BitString, optional: true })
1754
- ], AttributeCertificateInfo.prototype, "issuerUniqueID", void 0);
1755
- normalize.__decorate([
1756
- normalize.AsnProp({ type: normalize.Extensions, optional: true })
1757
- ], AttributeCertificateInfo.prototype, "extensions", void 0);
1758
-
1759
- class AttributeCertificate {
1760
- constructor(params = {}) {
1761
- this.acinfo = new AttributeCertificateInfo();
1762
- this.signatureAlgorithm = new normalize.AlgorithmIdentifier();
1763
- this.signatureValue = new ArrayBuffer(0);
1764
- Object.assign(this, params);
1765
- }
1766
- }
1767
- normalize.__decorate([
1768
- normalize.AsnProp({ type: AttributeCertificateInfo })
1769
- ], AttributeCertificate.prototype, "acinfo", void 0);
1770
- normalize.__decorate([
1771
- normalize.AsnProp({ type: normalize.AlgorithmIdentifier })
1772
- ], AttributeCertificate.prototype, "signatureAlgorithm", void 0);
1773
- normalize.__decorate([
1774
- normalize.AsnProp({ type: normalize.AsnPropTypes.BitString })
1775
- ], AttributeCertificate.prototype, "signatureValue", void 0);
1776
-
1777
- var ClassListFlags;
1778
- (function (ClassListFlags) {
1779
- ClassListFlags[ClassListFlags["unmarked"] = 1] = "unmarked";
1780
- ClassListFlags[ClassListFlags["unclassified"] = 2] = "unclassified";
1781
- ClassListFlags[ClassListFlags["restricted"] = 4] = "restricted";
1782
- ClassListFlags[ClassListFlags["confidential"] = 8] = "confidential";
1783
- ClassListFlags[ClassListFlags["secret"] = 16] = "secret";
1784
- ClassListFlags[ClassListFlags["topSecret"] = 32] = "topSecret";
1785
- })(ClassListFlags || (ClassListFlags = {}));
1786
- class ClassList extends normalize.BitString {
1787
- }
1788
-
1789
- class SecurityCategory {
1790
- constructor(params = {}) {
1791
- this.type = "";
1792
- this.value = new ArrayBuffer(0);
1793
- Object.assign(this, params);
1794
- }
1795
- }
1796
- normalize.__decorate([
1797
- normalize.AsnProp({ type: normalize.AsnPropTypes.ObjectIdentifier, implicit: true, context: 0 })
1798
- ], SecurityCategory.prototype, "type", void 0);
1799
- normalize.__decorate([
1800
- normalize.AsnProp({ type: normalize.AsnPropTypes.Any, implicit: true, context: 1 })
1801
- ], SecurityCategory.prototype, "value", void 0);
1802
-
1803
- class Clearance {
1804
- constructor(params = {}) {
1805
- this.policyId = "";
1806
- this.classList = new ClassList(ClassListFlags.unclassified);
1807
- Object.assign(this, params);
1808
- }
1809
- }
1810
- normalize.__decorate([
1811
- normalize.AsnProp({ type: normalize.AsnPropTypes.ObjectIdentifier })
1812
- ], Clearance.prototype, "policyId", void 0);
1813
- normalize.__decorate([
1814
- normalize.AsnProp({ type: ClassList, defaultValue: new ClassList(ClassListFlags.unclassified) })
1815
- ], Clearance.prototype, "classList", void 0);
1816
- normalize.__decorate([
1817
- normalize.AsnProp({ type: SecurityCategory, repeated: "set" })
1818
- ], Clearance.prototype, "securityCategories", void 0);
1819
-
1820
- class IetfAttrSyntaxValueChoices {
1821
- constructor(params = {}) {
1822
- Object.assign(this, params);
1823
- }
1824
- }
1825
- normalize.__decorate([
1826
- normalize.AsnProp({ type: normalize.OctetString })
1827
- ], IetfAttrSyntaxValueChoices.prototype, "cotets", void 0);
1828
- normalize.__decorate([
1829
- normalize.AsnProp({ type: normalize.AsnPropTypes.ObjectIdentifier })
1830
- ], IetfAttrSyntaxValueChoices.prototype, "oid", void 0);
1831
- normalize.__decorate([
1832
- normalize.AsnProp({ type: normalize.AsnPropTypes.Utf8String })
1833
- ], IetfAttrSyntaxValueChoices.prototype, "string", void 0);
1834
- class IetfAttrSyntax {
1835
- constructor(params = {}) {
1836
- this.values = [];
1837
- Object.assign(this, params);
1838
- }
1839
- }
1840
- normalize.__decorate([
1841
- normalize.AsnProp({ type: normalize.GeneralNames, implicit: true, context: 0, optional: true })
1842
- ], IetfAttrSyntax.prototype, "policyAuthority", void 0);
1843
- normalize.__decorate([
1844
- normalize.AsnProp({ type: IetfAttrSyntaxValueChoices, repeated: "sequence" })
1845
- ], IetfAttrSyntax.prototype, "values", void 0);
1846
-
1847
- var Targets_1;
1848
- class TargetCert {
1849
- constructor(params = {}) {
1850
- this.targetCertificate = new IssuerSerial();
1851
- Object.assign(this, params);
1852
- }
1853
- }
1854
- normalize.__decorate([
1855
- normalize.AsnProp({ type: IssuerSerial })
1856
- ], TargetCert.prototype, "targetCertificate", void 0);
1857
- normalize.__decorate([
1858
- normalize.AsnProp({ type: normalize.GeneralName, optional: true })
1859
- ], TargetCert.prototype, "targetName", void 0);
1860
- normalize.__decorate([
1861
- normalize.AsnProp({ type: ObjectDigestInfo, optional: true })
1862
- ], TargetCert.prototype, "certDigestInfo", void 0);
1863
- let Target = class Target {
1864
- constructor(params = {}) {
1865
- Object.assign(this, params);
1866
- }
1867
- };
1868
- normalize.__decorate([
1869
- normalize.AsnProp({ type: normalize.GeneralName, context: 0, implicit: true })
1870
- ], Target.prototype, "targetName", void 0);
1871
- normalize.__decorate([
1872
- normalize.AsnProp({ type: normalize.GeneralName, context: 1, implicit: true })
1873
- ], Target.prototype, "targetGroup", void 0);
1874
- normalize.__decorate([
1875
- normalize.AsnProp({ type: TargetCert, context: 2, implicit: true })
1876
- ], Target.prototype, "targetCert", void 0);
1877
- Target = normalize.__decorate([
1878
- normalize.AsnType({ type: normalize.AsnTypeTypes.Choice })
1879
- ], Target);
1880
- let Targets = Targets_1 = class Targets extends normalize.AsnArray {
1881
- constructor(items) {
1882
- super(items);
1883
- Object.setPrototypeOf(this, Targets_1.prototype);
1884
- }
1885
- };
1886
- Targets = Targets_1 = normalize.__decorate([
1887
- normalize.AsnType({ type: normalize.AsnTypeTypes.Sequence, itemType: Target })
1888
- ], Targets);
1889
-
1890
- var ProxyInfo_1;
1891
- let ProxyInfo = ProxyInfo_1 = class ProxyInfo extends normalize.AsnArray {
1892
- constructor(items) {
1893
- super(items);
1894
- Object.setPrototypeOf(this, ProxyInfo_1.prototype);
1895
- }
1896
- };
1897
- ProxyInfo = ProxyInfo_1 = normalize.__decorate([
1898
- normalize.AsnType({ type: normalize.AsnTypeTypes.Sequence, itemType: Targets })
1899
- ], ProxyInfo);
1900
-
1901
- class RoleSyntax {
1902
- constructor(params = {}) {
1903
- Object.assign(this, params);
1904
- }
1905
- }
1906
- normalize.__decorate([
1907
- normalize.AsnProp({ type: normalize.GeneralNames, implicit: true, context: 0, optional: true })
1908
- ], RoleSyntax.prototype, "roleAuthority", void 0);
1909
- normalize.__decorate([
1910
- normalize.AsnProp({ type: normalize.GeneralName, implicit: true, context: 1 })
1911
- ], RoleSyntax.prototype, "roleName", void 0);
1912
-
1913
- class SvceAuthInfo {
1914
- constructor(params = {}) {
1915
- this.service = new normalize.GeneralName();
1916
- this.ident = new normalize.GeneralName();
1917
- Object.assign(this, params);
1918
- }
1919
- }
1920
- normalize.__decorate([
1921
- normalize.AsnProp({ type: normalize.GeneralName })
1922
- ], SvceAuthInfo.prototype, "service", void 0);
1923
- normalize.__decorate([
1924
- normalize.AsnProp({ type: normalize.GeneralName })
1925
- ], SvceAuthInfo.prototype, "ident", void 0);
1926
- normalize.__decorate([
1927
- normalize.AsnProp({ type: normalize.OctetString, optional: true })
1928
- ], SvceAuthInfo.prototype, "authInfo", void 0);
1929
-
1930
- var CertificateSet_1;
1931
- class OtherCertificateFormat {
1932
- constructor(params = {}) {
1933
- this.otherCertFormat = "";
1934
- this.otherCert = new ArrayBuffer(0);
1935
- Object.assign(this, params);
1936
- }
1937
- }
1938
- normalize.__decorate([
1939
- normalize.AsnProp({ type: normalize.AsnPropTypes.ObjectIdentifier })
1940
- ], OtherCertificateFormat.prototype, "otherCertFormat", void 0);
1941
- normalize.__decorate([
1942
- normalize.AsnProp({ type: normalize.AsnPropTypes.Any })
1943
- ], OtherCertificateFormat.prototype, "otherCert", void 0);
1944
- let CertificateChoices = class CertificateChoices {
1945
- constructor(params = {}) {
1946
- Object.assign(this, params);
1947
- }
1948
- };
1949
- normalize.__decorate([
1950
- normalize.AsnProp({ type: normalize.Certificate })
1951
- ], CertificateChoices.prototype, "certificate", void 0);
1952
- normalize.__decorate([
1953
- normalize.AsnProp({ type: AttributeCertificate, context: 2, implicit: true })
1954
- ], CertificateChoices.prototype, "v2AttrCert", void 0);
1955
- normalize.__decorate([
1956
- normalize.AsnProp({ type: OtherCertificateFormat, context: 3, implicit: true })
1957
- ], CertificateChoices.prototype, "other", void 0);
1958
- CertificateChoices = normalize.__decorate([
1959
- normalize.AsnType({ type: normalize.AsnTypeTypes.Choice })
1960
- ], CertificateChoices);
1961
- let CertificateSet = CertificateSet_1 = class CertificateSet extends normalize.AsnArray {
1962
- constructor(items) {
1963
- super(items);
1964
- Object.setPrototypeOf(this, CertificateSet_1.prototype);
1965
- }
1966
- };
1967
- CertificateSet = CertificateSet_1 = normalize.__decorate([
1968
- normalize.AsnType({ type: normalize.AsnTypeTypes.Set, itemType: CertificateChoices })
1969
- ], CertificateSet);
1970
-
1971
- class ContentInfo {
1972
- constructor(params = {}) {
1973
- this.contentType = "";
1974
- this.content = new ArrayBuffer(0);
1975
- Object.assign(this, params);
1976
- }
1977
- }
1978
- normalize.__decorate([
1979
- normalize.AsnProp({ type: normalize.AsnPropTypes.ObjectIdentifier })
1980
- ], ContentInfo.prototype, "contentType", void 0);
1981
- normalize.__decorate([
1982
- normalize.AsnProp({ type: normalize.AsnPropTypes.Any, context: 0 })
1983
- ], ContentInfo.prototype, "content", void 0);
1984
-
1985
- let EncapsulatedContent = class EncapsulatedContent {
1986
- constructor(params = {}) {
1987
- Object.assign(this, params);
1988
- }
1989
- };
1990
- normalize.__decorate([
1991
- normalize.AsnProp({ type: normalize.OctetString })
1992
- ], EncapsulatedContent.prototype, "single", void 0);
1993
- normalize.__decorate([
1994
- normalize.AsnProp({ type: normalize.AsnPropTypes.Any })
1995
- ], EncapsulatedContent.prototype, "any", void 0);
1996
- EncapsulatedContent = normalize.__decorate([
1997
- normalize.AsnType({ type: normalize.AsnTypeTypes.Choice })
1998
- ], EncapsulatedContent);
1999
- class EncapsulatedContentInfo {
2000
- constructor(params = {}) {
2001
- this.eContentType = "";
2002
- Object.assign(this, params);
2003
- }
2004
- }
2005
- normalize.__decorate([
2006
- normalize.AsnProp({ type: normalize.AsnPropTypes.ObjectIdentifier })
2007
- ], EncapsulatedContentInfo.prototype, "eContentType", void 0);
2008
- normalize.__decorate([
2009
- normalize.AsnProp({ type: EncapsulatedContent, context: 0, optional: true })
2010
- ], EncapsulatedContentInfo.prototype, "eContent", void 0);
2011
-
2012
- let EncryptedContent = class EncryptedContent {
2013
- constructor(params = {}) {
2014
- Object.assign(this, params);
2015
- }
2016
- };
2017
- normalize.__decorate([
2018
- normalize.AsnProp({ type: normalize.OctetString, context: 0, implicit: true, optional: true })
2019
- ], EncryptedContent.prototype, "value", void 0);
2020
- normalize.__decorate([
2021
- normalize.AsnProp({
2022
- type: normalize.OctetString,
2023
- converter: normalize.AsnConstructedOctetStringConverter,
2024
- context: 0,
2025
- implicit: true,
2026
- optional: true,
2027
- repeated: "sequence",
2028
- })
2029
- ], EncryptedContent.prototype, "constructedValue", void 0);
2030
- EncryptedContent = normalize.__decorate([
2031
- normalize.AsnType({ type: normalize.AsnTypeTypes.Choice })
2032
- ], EncryptedContent);
2033
- class EncryptedContentInfo {
2034
- constructor(params = {}) {
2035
- this.contentType = "";
2036
- this.contentEncryptionAlgorithm = new ContentEncryptionAlgorithmIdentifier();
2037
- Object.assign(this, params);
2038
- }
2039
- }
2040
- normalize.__decorate([
2041
- normalize.AsnProp({ type: normalize.AsnPropTypes.ObjectIdentifier })
2042
- ], EncryptedContentInfo.prototype, "contentType", void 0);
2043
- normalize.__decorate([
2044
- normalize.AsnProp({ type: ContentEncryptionAlgorithmIdentifier })
2045
- ], EncryptedContentInfo.prototype, "contentEncryptionAlgorithm", void 0);
2046
- normalize.__decorate([
2047
- normalize.AsnProp({ type: EncryptedContent, optional: true })
2048
- ], EncryptedContentInfo.prototype, "encryptedContent", void 0);
2049
-
2050
- class OtherKeyAttribute {
2051
- constructor(params = {}) {
2052
- this.keyAttrId = "";
2053
- Object.assign(this, params);
2054
- }
2055
- }
2056
- normalize.__decorate([
2057
- normalize.AsnProp({ type: normalize.AsnPropTypes.ObjectIdentifier })
2058
- ], OtherKeyAttribute.prototype, "keyAttrId", void 0);
2059
- normalize.__decorate([
2060
- normalize.AsnProp({ type: normalize.AsnPropTypes.Any, optional: true })
2061
- ], OtherKeyAttribute.prototype, "keyAttr", void 0);
2062
-
2063
- var RecipientEncryptedKeys_1;
2064
- class RecipientKeyIdentifier {
2065
- constructor(params = {}) {
2066
- this.subjectKeyIdentifier = new SubjectKeyIdentifier();
2067
- Object.assign(this, params);
2068
- }
2069
- }
2070
- normalize.__decorate([
2071
- normalize.AsnProp({ type: SubjectKeyIdentifier })
2072
- ], RecipientKeyIdentifier.prototype, "subjectKeyIdentifier", void 0);
2073
- normalize.__decorate([
2074
- normalize.AsnProp({ type: normalize.AsnPropTypes.GeneralizedTime, optional: true })
2075
- ], RecipientKeyIdentifier.prototype, "date", void 0);
2076
- normalize.__decorate([
2077
- normalize.AsnProp({ type: OtherKeyAttribute, optional: true })
2078
- ], RecipientKeyIdentifier.prototype, "other", void 0);
2079
- let KeyAgreeRecipientIdentifier = class KeyAgreeRecipientIdentifier {
2080
- constructor(params = {}) {
2081
- Object.assign(this, params);
2082
- }
2083
- };
2084
- normalize.__decorate([
2085
- normalize.AsnProp({ type: RecipientKeyIdentifier, context: 0, implicit: true, optional: true })
2086
- ], KeyAgreeRecipientIdentifier.prototype, "rKeyId", void 0);
2087
- normalize.__decorate([
2088
- normalize.AsnProp({ type: IssuerAndSerialNumber, optional: true })
2089
- ], KeyAgreeRecipientIdentifier.prototype, "issuerAndSerialNumber", void 0);
2090
- KeyAgreeRecipientIdentifier = normalize.__decorate([
2091
- normalize.AsnType({ type: normalize.AsnTypeTypes.Choice })
2092
- ], KeyAgreeRecipientIdentifier);
2093
- class RecipientEncryptedKey {
2094
- constructor(params = {}) {
2095
- this.rid = new KeyAgreeRecipientIdentifier();
2096
- this.encryptedKey = new normalize.OctetString();
2097
- Object.assign(this, params);
2098
- }
2099
- }
2100
- normalize.__decorate([
2101
- normalize.AsnProp({ type: KeyAgreeRecipientIdentifier })
2102
- ], RecipientEncryptedKey.prototype, "rid", void 0);
2103
- normalize.__decorate([
2104
- normalize.AsnProp({ type: normalize.OctetString })
2105
- ], RecipientEncryptedKey.prototype, "encryptedKey", void 0);
2106
- let RecipientEncryptedKeys = RecipientEncryptedKeys_1 = class RecipientEncryptedKeys extends normalize.AsnArray {
2107
- constructor(items) {
2108
- super(items);
2109
- Object.setPrototypeOf(this, RecipientEncryptedKeys_1.prototype);
2110
- }
2111
- };
2112
- RecipientEncryptedKeys = RecipientEncryptedKeys_1 = normalize.__decorate([
2113
- normalize.AsnType({ type: normalize.AsnTypeTypes.Sequence, itemType: RecipientEncryptedKey })
2114
- ], RecipientEncryptedKeys);
2115
- class OriginatorPublicKey {
2116
- constructor(params = {}) {
2117
- this.algorithm = new normalize.AlgorithmIdentifier();
2118
- this.publicKey = new ArrayBuffer(0);
2119
- Object.assign(this, params);
2120
- }
2121
- }
2122
- normalize.__decorate([
2123
- normalize.AsnProp({ type: normalize.AlgorithmIdentifier })
2124
- ], OriginatorPublicKey.prototype, "algorithm", void 0);
2125
- normalize.__decorate([
2126
- normalize.AsnProp({ type: normalize.AsnPropTypes.BitString })
2127
- ], OriginatorPublicKey.prototype, "publicKey", void 0);
2128
- let OriginatorIdentifierOrKey = class OriginatorIdentifierOrKey {
2129
- constructor(params = {}) {
2130
- Object.assign(this, params);
2131
- }
2132
- };
2133
- normalize.__decorate([
2134
- normalize.AsnProp({ type: SubjectKeyIdentifier, context: 0, implicit: true, optional: true })
2135
- ], OriginatorIdentifierOrKey.prototype, "subjectKeyIdentifier", void 0);
2136
- normalize.__decorate([
2137
- normalize.AsnProp({ type: OriginatorPublicKey, context: 1, implicit: true, optional: true })
2138
- ], OriginatorIdentifierOrKey.prototype, "originatorKey", void 0);
2139
- normalize.__decorate([
2140
- normalize.AsnProp({ type: IssuerAndSerialNumber, optional: true })
2141
- ], OriginatorIdentifierOrKey.prototype, "issuerAndSerialNumber", void 0);
2142
- OriginatorIdentifierOrKey = normalize.__decorate([
2143
- normalize.AsnType({ type: normalize.AsnTypeTypes.Choice })
2144
- ], OriginatorIdentifierOrKey);
2145
- class KeyAgreeRecipientInfo {
2146
- constructor(params = {}) {
2147
- this.version = CMSVersion.v3;
2148
- this.originator = new OriginatorIdentifierOrKey();
2149
- this.keyEncryptionAlgorithm = new KeyEncryptionAlgorithmIdentifier();
2150
- this.recipientEncryptedKeys = new RecipientEncryptedKeys();
2151
- Object.assign(this, params);
2152
- }
2153
- }
2154
- normalize.__decorate([
2155
- normalize.AsnProp({ type: normalize.AsnPropTypes.Integer })
2156
- ], KeyAgreeRecipientInfo.prototype, "version", void 0);
2157
- normalize.__decorate([
2158
- normalize.AsnProp({ type: OriginatorIdentifierOrKey, context: 0 })
2159
- ], KeyAgreeRecipientInfo.prototype, "originator", void 0);
2160
- normalize.__decorate([
2161
- normalize.AsnProp({ type: normalize.OctetString, context: 1, optional: true })
2162
- ], KeyAgreeRecipientInfo.prototype, "ukm", void 0);
2163
- normalize.__decorate([
2164
- normalize.AsnProp({ type: KeyEncryptionAlgorithmIdentifier })
2165
- ], KeyAgreeRecipientInfo.prototype, "keyEncryptionAlgorithm", void 0);
2166
- normalize.__decorate([
2167
- normalize.AsnProp({ type: RecipientEncryptedKeys })
2168
- ], KeyAgreeRecipientInfo.prototype, "recipientEncryptedKeys", void 0);
2169
-
2170
- let RecipientIdentifier = class RecipientIdentifier {
2171
- constructor(params = {}) {
2172
- Object.assign(this, params);
2173
- }
2174
- };
2175
- normalize.__decorate([
2176
- normalize.AsnProp({ type: SubjectKeyIdentifier, context: 0, implicit: true })
2177
- ], RecipientIdentifier.prototype, "subjectKeyIdentifier", void 0);
2178
- normalize.__decorate([
2179
- normalize.AsnProp({ type: IssuerAndSerialNumber })
2180
- ], RecipientIdentifier.prototype, "issuerAndSerialNumber", void 0);
2181
- RecipientIdentifier = normalize.__decorate([
2182
- normalize.AsnType({ type: normalize.AsnTypeTypes.Choice })
2183
- ], RecipientIdentifier);
2184
- class KeyTransRecipientInfo {
2185
- constructor(params = {}) {
2186
- this.version = CMSVersion.v0;
2187
- this.rid = new RecipientIdentifier();
2188
- this.keyEncryptionAlgorithm = new KeyEncryptionAlgorithmIdentifier();
2189
- this.encryptedKey = new normalize.OctetString();
2190
- Object.assign(this, params);
2191
- }
2192
- }
2193
- normalize.__decorate([
2194
- normalize.AsnProp({ type: normalize.AsnPropTypes.Integer })
2195
- ], KeyTransRecipientInfo.prototype, "version", void 0);
2196
- normalize.__decorate([
2197
- normalize.AsnProp({ type: RecipientIdentifier })
2198
- ], KeyTransRecipientInfo.prototype, "rid", void 0);
2199
- normalize.__decorate([
2200
- normalize.AsnProp({ type: KeyEncryptionAlgorithmIdentifier })
2201
- ], KeyTransRecipientInfo.prototype, "keyEncryptionAlgorithm", void 0);
2202
- normalize.__decorate([
2203
- normalize.AsnProp({ type: normalize.OctetString })
2204
- ], KeyTransRecipientInfo.prototype, "encryptedKey", void 0);
2205
-
2206
- class KEKIdentifier {
2207
- constructor(params = {}) {
2208
- this.keyIdentifier = new normalize.OctetString();
2209
- Object.assign(this, params);
2210
- }
2211
- }
2212
- normalize.__decorate([
2213
- normalize.AsnProp({ type: normalize.OctetString })
2214
- ], KEKIdentifier.prototype, "keyIdentifier", void 0);
2215
- normalize.__decorate([
2216
- normalize.AsnProp({ type: normalize.AsnPropTypes.GeneralizedTime, optional: true })
2217
- ], KEKIdentifier.prototype, "date", void 0);
2218
- normalize.__decorate([
2219
- normalize.AsnProp({ type: OtherKeyAttribute, optional: true })
2220
- ], KEKIdentifier.prototype, "other", void 0);
2221
- class KEKRecipientInfo {
2222
- constructor(params = {}) {
2223
- this.version = CMSVersion.v4;
2224
- this.kekid = new KEKIdentifier();
2225
- this.keyEncryptionAlgorithm = new KeyEncryptionAlgorithmIdentifier();
2226
- this.encryptedKey = new normalize.OctetString();
2227
- Object.assign(this, params);
2228
- }
2229
- }
2230
- normalize.__decorate([
2231
- normalize.AsnProp({ type: normalize.AsnPropTypes.Integer })
2232
- ], KEKRecipientInfo.prototype, "version", void 0);
2233
- normalize.__decorate([
2234
- normalize.AsnProp({ type: KEKIdentifier })
2235
- ], KEKRecipientInfo.prototype, "kekid", void 0);
2236
- normalize.__decorate([
2237
- normalize.AsnProp({ type: KeyEncryptionAlgorithmIdentifier })
2238
- ], KEKRecipientInfo.prototype, "keyEncryptionAlgorithm", void 0);
2239
- normalize.__decorate([
2240
- normalize.AsnProp({ type: normalize.OctetString })
2241
- ], KEKRecipientInfo.prototype, "encryptedKey", void 0);
2242
-
2243
- class PasswordRecipientInfo {
2244
- constructor(params = {}) {
2245
- this.version = CMSVersion.v0;
2246
- this.keyEncryptionAlgorithm = new KeyEncryptionAlgorithmIdentifier();
2247
- this.encryptedKey = new normalize.OctetString();
2248
- Object.assign(this, params);
2249
- }
2250
- }
2251
- normalize.__decorate([
2252
- normalize.AsnProp({ type: normalize.AsnPropTypes.Integer })
2253
- ], PasswordRecipientInfo.prototype, "version", void 0);
2254
- normalize.__decorate([
2255
- normalize.AsnProp({ type: KeyDerivationAlgorithmIdentifier, context: 0, optional: true })
2256
- ], PasswordRecipientInfo.prototype, "keyDerivationAlgorithm", void 0);
2257
- normalize.__decorate([
2258
- normalize.AsnProp({ type: KeyEncryptionAlgorithmIdentifier })
2259
- ], PasswordRecipientInfo.prototype, "keyEncryptionAlgorithm", void 0);
2260
- normalize.__decorate([
2261
- normalize.AsnProp({ type: normalize.OctetString })
2262
- ], PasswordRecipientInfo.prototype, "encryptedKey", void 0);
2263
-
2264
- class OtherRecipientInfo {
2265
- constructor(params = {}) {
2266
- this.oriType = "";
2267
- this.oriValue = new ArrayBuffer(0);
2268
- Object.assign(this, params);
2269
- }
2270
- }
2271
- normalize.__decorate([
2272
- normalize.AsnProp({ type: normalize.AsnPropTypes.ObjectIdentifier })
2273
- ], OtherRecipientInfo.prototype, "oriType", void 0);
2274
- normalize.__decorate([
2275
- normalize.AsnProp({ type: normalize.AsnPropTypes.Any })
2276
- ], OtherRecipientInfo.prototype, "oriValue", void 0);
2277
- let RecipientInfo = class RecipientInfo {
2278
- constructor(params = {}) {
2279
- Object.assign(this, params);
2280
- }
2281
- };
2282
- normalize.__decorate([
2283
- normalize.AsnProp({ type: KeyTransRecipientInfo, optional: true })
2284
- ], RecipientInfo.prototype, "ktri", void 0);
2285
- normalize.__decorate([
2286
- normalize.AsnProp({ type: KeyAgreeRecipientInfo, context: 1, implicit: true, optional: true })
2287
- ], RecipientInfo.prototype, "kari", void 0);
2288
- normalize.__decorate([
2289
- normalize.AsnProp({ type: KEKRecipientInfo, context: 2, implicit: true, optional: true })
2290
- ], RecipientInfo.prototype, "kekri", void 0);
2291
- normalize.__decorate([
2292
- normalize.AsnProp({ type: PasswordRecipientInfo, context: 3, implicit: true, optional: true })
2293
- ], RecipientInfo.prototype, "pwri", void 0);
2294
- normalize.__decorate([
2295
- normalize.AsnProp({ type: OtherRecipientInfo, context: 4, implicit: true, optional: true })
2296
- ], RecipientInfo.prototype, "ori", void 0);
2297
- RecipientInfo = normalize.__decorate([
2298
- normalize.AsnType({ type: normalize.AsnTypeTypes.Choice })
2299
- ], RecipientInfo);
2300
-
2301
- var RecipientInfos_1;
2302
- let RecipientInfos = RecipientInfos_1 = class RecipientInfos extends normalize.AsnArray {
2303
- constructor(items) {
2304
- super(items);
2305
- Object.setPrototypeOf(this, RecipientInfos_1.prototype);
2306
- }
2307
- };
2308
- RecipientInfos = RecipientInfos_1 = normalize.__decorate([
2309
- normalize.AsnType({ type: normalize.AsnTypeTypes.Set, itemType: RecipientInfo })
2310
- ], RecipientInfos);
2311
-
2312
- var RevocationInfoChoices_1;
2313
- class OtherRevocationInfoFormat {
2314
- constructor(params = {}) {
2315
- this.otherRevInfoFormat = "";
2316
- this.otherRevInfo = new ArrayBuffer(0);
2317
- Object.assign(this, params);
2318
- }
2319
- }
2320
- normalize.__decorate([
2321
- normalize.AsnProp({ type: normalize.AsnPropTypes.ObjectIdentifier })
2322
- ], OtherRevocationInfoFormat.prototype, "otherRevInfoFormat", void 0);
2323
- normalize.__decorate([
2324
- normalize.AsnProp({ type: normalize.AsnPropTypes.Any })
2325
- ], OtherRevocationInfoFormat.prototype, "otherRevInfo", void 0);
2326
- let RevocationInfoChoice = class RevocationInfoChoice {
2327
- constructor(params = {}) {
2328
- this.other = new OtherRevocationInfoFormat();
2329
- Object.assign(this, params);
2330
- }
2331
- };
2332
- normalize.__decorate([
2333
- normalize.AsnProp({ type: OtherRevocationInfoFormat, context: 1, implicit: true })
2334
- ], RevocationInfoChoice.prototype, "other", void 0);
2335
- RevocationInfoChoice = normalize.__decorate([
2336
- normalize.AsnType({ type: normalize.AsnTypeTypes.Choice })
2337
- ], RevocationInfoChoice);
2338
- let RevocationInfoChoices = RevocationInfoChoices_1 = class RevocationInfoChoices extends normalize.AsnArray {
2339
- constructor(items) {
2340
- super(items);
2341
- Object.setPrototypeOf(this, RevocationInfoChoices_1.prototype);
2342
- }
2343
- };
2344
- RevocationInfoChoices = RevocationInfoChoices_1 = normalize.__decorate([
2345
- normalize.AsnType({ type: normalize.AsnTypeTypes.Set, itemType: RevocationInfoChoice })
2346
- ], RevocationInfoChoices);
2347
-
2348
- class OriginatorInfo {
2349
- constructor(params = {}) {
2350
- Object.assign(this, params);
2351
- }
2352
- }
2353
- normalize.__decorate([
2354
- normalize.AsnProp({ type: CertificateSet, context: 0, implicit: true, optional: true })
2355
- ], OriginatorInfo.prototype, "certs", void 0);
2356
- normalize.__decorate([
2357
- normalize.AsnProp({ type: RevocationInfoChoices, context: 1, implicit: true, optional: true })
2358
- ], OriginatorInfo.prototype, "crls", void 0);
2359
-
2360
- var UnprotectedAttributes_1;
2361
- let UnprotectedAttributes = UnprotectedAttributes_1 = class UnprotectedAttributes extends normalize.AsnArray {
2362
- constructor(items) {
2363
- super(items);
2364
- Object.setPrototypeOf(this, UnprotectedAttributes_1.prototype);
2365
- }
2366
- };
2367
- UnprotectedAttributes = UnprotectedAttributes_1 = normalize.__decorate([
2368
- normalize.AsnType({ type: normalize.AsnTypeTypes.Set, itemType: Attribute })
2369
- ], UnprotectedAttributes);
2370
- class EnvelopedData {
2371
- constructor(params = {}) {
2372
- this.version = CMSVersion.v0;
2373
- this.recipientInfos = new RecipientInfos();
2374
- this.encryptedContentInfo = new EncryptedContentInfo();
2375
- Object.assign(this, params);
2376
- }
2377
- }
2378
- normalize.__decorate([
2379
- normalize.AsnProp({ type: normalize.AsnPropTypes.Integer })
2380
- ], EnvelopedData.prototype, "version", void 0);
2381
- normalize.__decorate([
2382
- normalize.AsnProp({ type: OriginatorInfo, context: 0, implicit: true, optional: true })
2383
- ], EnvelopedData.prototype, "originatorInfo", void 0);
2384
- normalize.__decorate([
2385
- normalize.AsnProp({ type: RecipientInfos })
2386
- ], EnvelopedData.prototype, "recipientInfos", void 0);
2387
- normalize.__decorate([
2388
- normalize.AsnProp({ type: EncryptedContentInfo })
2389
- ], EnvelopedData.prototype, "encryptedContentInfo", void 0);
2390
- normalize.__decorate([
2391
- normalize.AsnProp({ type: UnprotectedAttributes, context: 1, implicit: true, optional: true })
2392
- ], EnvelopedData.prototype, "unprotectedAttrs", void 0);
2393
-
2394
- var DigestAlgorithmIdentifiers_1;
2395
- let DigestAlgorithmIdentifiers = DigestAlgorithmIdentifiers_1 = class DigestAlgorithmIdentifiers extends normalize.AsnArray {
2396
- constructor(items) {
2397
- super(items);
2398
- Object.setPrototypeOf(this, DigestAlgorithmIdentifiers_1.prototype);
2399
- }
2400
- };
2401
- DigestAlgorithmIdentifiers = DigestAlgorithmIdentifiers_1 = normalize.__decorate([
2402
- normalize.AsnType({ type: normalize.AsnTypeTypes.Set, itemType: DigestAlgorithmIdentifier })
2403
- ], DigestAlgorithmIdentifiers);
2404
- class SignedData {
2405
- constructor(params = {}) {
2406
- this.version = CMSVersion.v0;
2407
- this.digestAlgorithms = new DigestAlgorithmIdentifiers();
2408
- this.encapContentInfo = new EncapsulatedContentInfo();
2409
- this.signerInfos = new SignerInfos();
2410
- Object.assign(this, params);
2411
- }
2412
- }
2413
- normalize.__decorate([
2414
- normalize.AsnProp({ type: normalize.AsnPropTypes.Integer })
2415
- ], SignedData.prototype, "version", void 0);
2416
- normalize.__decorate([
2417
- normalize.AsnProp({ type: DigestAlgorithmIdentifiers })
2418
- ], SignedData.prototype, "digestAlgorithms", void 0);
2419
- normalize.__decorate([
2420
- normalize.AsnProp({ type: EncapsulatedContentInfo })
2421
- ], SignedData.prototype, "encapContentInfo", void 0);
2422
- normalize.__decorate([
2423
- normalize.AsnProp({ type: CertificateSet, context: 0, implicit: true, optional: true })
2424
- ], SignedData.prototype, "certificates", void 0);
2425
- normalize.__decorate([
2426
- normalize.AsnProp({ type: RevocationInfoChoices, context: 1, implicit: true, optional: true })
2427
- ], SignedData.prototype, "crls", void 0);
2428
- normalize.__decorate([
2429
- normalize.AsnProp({ type: SignerInfos })
2430
- ], SignedData.prototype, "signerInfos", void 0);
2431
-
2432
- class Accuracy {
2433
- constructor(params = {}) {
2434
- this.seconds = 0;
2435
- Object.assign(this, params);
2436
- }
2437
- }
2438
- normalize.__decorate([
2439
- normalize.AsnProp({ type: normalize.AsnPropTypes.Integer, optional: true })
2440
- ], Accuracy.prototype, "seconds", void 0);
2441
- normalize.__decorate([
2442
- normalize.AsnProp({ type: normalize.AsnPropTypes.Integer, context: 0, implicit: true, optional: true })
2443
- ], Accuracy.prototype, "millis", void 0);
2444
- normalize.__decorate([
2445
- normalize.AsnProp({ type: normalize.AsnPropTypes.Integer, context: 1, implicit: true, optional: true })
2446
- ], Accuracy.prototype, "micros", void 0);
2447
-
2448
- class MessageImprint {
2449
- constructor(params = {}) {
2450
- this.hashAlgorithm = new normalize.AlgorithmIdentifier();
2451
- this.hashedMessage = new normalize.OctetString();
2452
- Object.assign(this, params);
2453
- }
2454
- }
2455
- normalize.__decorate([
2456
- normalize.AsnProp({ type: normalize.AlgorithmIdentifier })
2457
- ], MessageImprint.prototype, "hashAlgorithm", void 0);
2458
- normalize.__decorate([
2459
- normalize.AsnProp({ type: normalize.OctetString })
2460
- ], MessageImprint.prototype, "hashedMessage", void 0);
2461
-
2462
- var PKIFailureInfoFlags;
2463
- (function (PKIFailureInfoFlags) {
2464
- PKIFailureInfoFlags[PKIFailureInfoFlags["badAlg"] = 1] = "badAlg";
2465
- PKIFailureInfoFlags[PKIFailureInfoFlags["badRequest"] = 2] = "badRequest";
2466
- PKIFailureInfoFlags[PKIFailureInfoFlags["badDataFormat"] = 16] = "badDataFormat";
2467
- PKIFailureInfoFlags[PKIFailureInfoFlags["timeNotAvailable"] = 8192] = "timeNotAvailable";
2468
- PKIFailureInfoFlags[PKIFailureInfoFlags["unacceptedPolicy"] = 16384] = "unacceptedPolicy";
2469
- PKIFailureInfoFlags[PKIFailureInfoFlags["unacceptedExtension"] = 32768] = "unacceptedExtension";
2470
- PKIFailureInfoFlags[PKIFailureInfoFlags["addInfoNotAvailable"] = 65536] = "addInfoNotAvailable";
2471
- PKIFailureInfoFlags[PKIFailureInfoFlags["systemFailure"] = 16777216] = "systemFailure";
2472
- })(PKIFailureInfoFlags || (PKIFailureInfoFlags = {}));
2473
- class PKIFailureInfo extends normalize.BitString {
2474
- toJSON() {
2475
- const flag = this.toNumber();
2476
- const res = [];
2477
- if (flag & PKIFailureInfoFlags.addInfoNotAvailable) {
2478
- res.push("addInfoNotAvailable");
2479
- }
2480
- if (flag & PKIFailureInfoFlags.badAlg) {
2481
- res.push("badAlg");
2482
- }
2483
- if (flag & PKIFailureInfoFlags.badDataFormat) {
2484
- res.push("badDataFormat");
2485
- }
2486
- if (flag & PKIFailureInfoFlags.badRequest) {
2487
- res.push("badRequest");
2488
- }
2489
- if (flag & PKIFailureInfoFlags.systemFailure) {
2490
- res.push("systemFailure");
2491
- }
2492
- if (flag & PKIFailureInfoFlags.systemFailure) {
2493
- res.push("systemFailure");
2494
- }
2495
- if (flag & PKIFailureInfoFlags.timeNotAvailable) {
2496
- res.push("timeNotAvailable");
2497
- }
2498
- if (flag & PKIFailureInfoFlags.unacceptedExtension) {
2499
- res.push("unacceptedExtension");
2500
- }
2501
- if (flag & PKIFailureInfoFlags.unacceptedPolicy) {
2502
- res.push("unacceptedPolicy");
2503
- }
2504
- return res;
2505
- }
2506
- toString() {
2507
- return `[${this.toJSON().join(", ")}]`;
2508
- }
2509
- }
2510
-
2511
- var PKIStatus;
2512
- (function (PKIStatus) {
2513
- PKIStatus[PKIStatus["granted"] = 0] = "granted";
2514
- PKIStatus[PKIStatus["grantedWithMods"] = 1] = "grantedWithMods";
2515
- PKIStatus[PKIStatus["rejection"] = 2] = "rejection";
2516
- PKIStatus[PKIStatus["waiting"] = 3] = "waiting";
2517
- PKIStatus[PKIStatus["revocationWarning"] = 4] = "revocationWarning";
2518
- PKIStatus[PKIStatus["revocationNotification"] = 5] = "revocationNotification";
2519
- })(PKIStatus || (PKIStatus = {}));
2520
-
2521
- var PKIFreeText_1;
2522
- let PKIFreeText = PKIFreeText_1 = class PKIFreeText extends normalize.AsnArray {
2523
- constructor(items) {
2524
- super(items);
2525
- Object.setPrototypeOf(this, PKIFreeText_1.prototype);
2526
- }
2527
- };
2528
- PKIFreeText = PKIFreeText_1 = normalize.__decorate([
2529
- normalize.AsnType({ type: normalize.AsnTypeTypes.Sequence, itemType: normalize.AsnPropTypes.Utf8String })
2530
- ], PKIFreeText);
2531
- class PKIStatusInfo {
2532
- constructor(params = {}) {
2533
- this.status = PKIStatus.granted;
2534
- Object.assign(this, params);
2535
- }
2536
- }
2537
- normalize.__decorate([
2538
- normalize.AsnProp({ type: normalize.AsnPropTypes.Integer })
2539
- ], PKIStatusInfo.prototype, "status", void 0);
2540
- normalize.__decorate([
2541
- normalize.AsnProp({ type: PKIFreeText, optional: true })
2542
- ], PKIStatusInfo.prototype, "statusString", void 0);
2543
- normalize.__decorate([
2544
- normalize.AsnProp({ type: PKIFailureInfo, optional: true })
2545
- ], PKIStatusInfo.prototype, "failInfo", void 0);
2546
-
2547
- var TimeStampReqVersion;
2548
- (function (TimeStampReqVersion) {
2549
- TimeStampReqVersion[TimeStampReqVersion["v1"] = 1] = "v1";
2550
- })(TimeStampReqVersion || (TimeStampReqVersion = {}));
2551
- class TimeStampReq {
2552
- constructor(params = {}) {
2553
- this.version = TimeStampReqVersion.v1;
2554
- this.messageImprint = new MessageImprint();
2555
- this.certReq = false;
2556
- Object.assign(this, params);
2557
- }
2558
- }
2559
- normalize.__decorate([
2560
- normalize.AsnProp({ type: normalize.AsnPropTypes.Integer })
2561
- ], TimeStampReq.prototype, "version", void 0);
2562
- normalize.__decorate([
2563
- normalize.AsnProp({ type: MessageImprint })
2564
- ], TimeStampReq.prototype, "messageImprint", void 0);
2565
- normalize.__decorate([
2566
- normalize.AsnProp({ type: normalize.AsnPropTypes.ObjectIdentifier, optional: true })
2567
- ], TimeStampReq.prototype, "reqPolicy", void 0);
2568
- normalize.__decorate([
2569
- normalize.AsnProp({
2570
- type: normalize.AsnPropTypes.Integer,
2571
- converter: normalize.AsnIntegerArrayBufferConverter,
2572
- optional: true,
2573
- })
2574
- ], TimeStampReq.prototype, "nonce", void 0);
2575
- normalize.__decorate([
2576
- normalize.AsnProp({ type: normalize.AsnPropTypes.Boolean, defaultValue: false })
2577
- ], TimeStampReq.prototype, "certReq", void 0);
2578
- normalize.__decorate([
2579
- normalize.AsnProp({ type: normalize.Extensions, optional: true, context: 0, implicit: true })
2580
- ], TimeStampReq.prototype, "extensions", void 0);
2581
-
2582
- let TimeStampToken = class TimeStampToken extends ContentInfo {
2583
- };
2584
- TimeStampToken = normalize.__decorate([
2585
- normalize.AsnType({ type: normalize.AsnTypeTypes.Sequence })
2586
- ], TimeStampToken);
2587
-
2588
- class TimeStampResp {
2589
- constructor(params = {}) {
2590
- this.status = new PKIStatusInfo();
2591
- Object.assign(this, params);
2592
- }
2593
- }
2594
- normalize.__decorate([
2595
- normalize.AsnProp({ type: PKIStatusInfo })
2596
- ], TimeStampResp.prototype, "status", void 0);
2597
- normalize.__decorate([
2598
- normalize.AsnProp({ type: TimeStampToken, optional: true })
2599
- ], TimeStampResp.prototype, "timeStampToken", void 0);
2600
-
2601
- var TSTInfoVersion;
2602
- (function (TSTInfoVersion) {
2603
- TSTInfoVersion[TSTInfoVersion["v1"] = 1] = "v1";
2604
- })(TSTInfoVersion || (TSTInfoVersion = {}));
2605
- class TSTInfo {
2606
- constructor(params = {}) {
2607
- this.version = TSTInfoVersion.v1;
2608
- this.policy = "";
2609
- this.messageImprint = new MessageImprint();
2610
- this.serialNumber = new ArrayBuffer(0);
2611
- this.genTime = new Date();
2612
- this.ordering = false;
2613
- Object.assign(this, params);
2614
- }
2615
- }
2616
- normalize.__decorate([
2617
- normalize.AsnProp({ type: normalize.AsnPropTypes.Integer })
2618
- ], TSTInfo.prototype, "version", void 0);
2619
- normalize.__decorate([
2620
- normalize.AsnProp({ type: normalize.AsnPropTypes.ObjectIdentifier })
2621
- ], TSTInfo.prototype, "policy", void 0);
2622
- normalize.__decorate([
2623
- normalize.AsnProp({ type: MessageImprint })
2624
- ], TSTInfo.prototype, "messageImprint", void 0);
2625
- normalize.__decorate([
2626
- normalize.AsnProp({ type: normalize.AsnPropTypes.Integer, converter: normalize.AsnIntegerArrayBufferConverter })
2627
- ], TSTInfo.prototype, "serialNumber", void 0);
2628
- normalize.__decorate([
2629
- normalize.AsnProp({ type: normalize.AsnPropTypes.GeneralizedTime })
2630
- ], TSTInfo.prototype, "genTime", void 0);
2631
- normalize.__decorate([
2632
- normalize.AsnProp({ type: Accuracy, optional: true })
2633
- ], TSTInfo.prototype, "accuracy", void 0);
2634
- normalize.__decorate([
2635
- normalize.AsnProp({ type: normalize.AsnPropTypes.Boolean, defaultValue: false })
2636
- ], TSTInfo.prototype, "ordering", void 0);
2637
- normalize.__decorate([
2638
- normalize.AsnProp({
2639
- type: normalize.AsnPropTypes.Integer,
2640
- converter: normalize.AsnIntegerArrayBufferConverter,
2641
- optional: true,
2642
- })
2643
- ], TSTInfo.prototype, "nonce", void 0);
2644
- normalize.__decorate([
2645
- normalize.AsnProp({ type: normalize.GeneralName, context: 0, optional: true })
2646
- ], TSTInfo.prototype, "tsa", void 0);
2647
- normalize.__decorate([
2648
- normalize.AsnProp({ type: normalize.Extensions, context: 1, implicit: true, optional: true })
2649
- ], TSTInfo.prototype, "extensions", void 0);
2650
-
2651
1423
  // src/core/timestamp/verify.ts
2652
1424
  /**
2653
1425
  * OID for SignedData content type
@@ -2710,14 +1482,14 @@ function parseTimestamp(timestampBase64) {
2710
1482
  try {
2711
1483
  const tokenBuffer = normalize.base64ToArrayBuffer(timestampBase64);
2712
1484
  // Parse as ContentInfo (TimeStampToken extends ContentInfo)
2713
- const contentInfo = identity.AsnConvert.parse(tokenBuffer, ContentInfo);
1485
+ const contentInfo = asn1Schema.AsnConvert.parse(tokenBuffer, asn1Cms.ContentInfo);
2714
1486
  // Verify it's SignedData
2715
1487
  if (contentInfo.contentType !== id_signedData) {
2716
1488
  console.warn("Timestamp is not SignedData");
2717
1489
  return null;
2718
1490
  }
2719
1491
  // Parse SignedData
2720
- const signedData = identity.AsnConvert.parse(contentInfo.content, SignedData);
1492
+ const signedData = asn1Schema.AsnConvert.parse(contentInfo.content, asn1Cms.SignedData);
2721
1493
  // Verify encapsulated content is TSTInfo
2722
1494
  if (signedData.encapContentInfo.eContentType !== id_ct_TSTInfo) {
2723
1495
  console.warn("SignedData does not contain TSTInfo");
@@ -2740,16 +1512,16 @@ function parseTimestamp(timestampBase64) {
2740
1512
  }
2741
1513
  else {
2742
1514
  // Try to serialize the whole thing if it's already ASN.1 parsed
2743
- tstInfoBuffer = identity.AsnConvert.serialize(eContent);
1515
+ tstInfoBuffer = asn1Schema.AsnConvert.serialize(eContent);
2744
1516
  }
2745
- const tstInfo = identity.AsnConvert.parse(tstInfoBuffer, TSTInfo);
1517
+ const tstInfo = asn1Schema.AsnConvert.parse(tstInfoBuffer, asn1Tsp.TSTInfo);
2746
1518
  // Extract TSA certificate if present
2747
1519
  let tsaCertificate;
2748
1520
  if (signedData.certificates && signedData.certificates.length > 0) {
2749
1521
  // Get the first certificate (usually the TSA cert)
2750
1522
  const cert = signedData.certificates[0];
2751
1523
  if ("certificate" in cert && cert.certificate) {
2752
- tsaCertificate = normalize.arrayBufferToPEM(identity.AsnConvert.serialize(cert.certificate));
1524
+ tsaCertificate = normalize.arrayBufferToPEM(asn1Schema.AsnConvert.serialize(cert.certificate));
2753
1525
  }
2754
1526
  }
2755
1527
  // Extract TSA name if present
@@ -4147,7 +2919,7 @@ async function verifySignature(signatureInfo, files, options = {}) {
4147
2919
  const timestampValid = !signatureInfo.signatureTimestamp ||
4148
2920
  options.verifyTimestamps === false ||
4149
2921
  (timestampResult?.isValid ?? true);
4150
- const isValid = certResult.isValid && checksumResult.isValid && signatureResult.isValid && timestampValid;
2922
+ let isValid = certResult.isValid && checksumResult.isValid && signatureResult.isValid && timestampValid;
4151
2923
  // Determine validation status and limitations
4152
2924
  let status = "VALID";
4153
2925
  let statusMessage;
@@ -4217,6 +2989,30 @@ async function verifySignature(signatureInfo, files, options = {}) {
4217
2989
  statusMessage = errors[0] || "Verification failed";
4218
2990
  }
4219
2991
  }
2992
+ // If everything else is valid but the issuer is not on the trusted list,
2993
+ // downgrade from VALID to INDETERMINATE — crypto is sound but trust is unconfirmed
2994
+ if (status === "VALID" && options.trustListProvider) {
2995
+ if (trustListMatch && (!trustListMatch.found || trustListMatch.trustedAtTime === false)) {
2996
+ status = "INDETERMINATE";
2997
+ isValid = false;
2998
+ statusMessage = trustListMatch.found
2999
+ ? "Signer issuer found in trusted list but was not trusted at signing time"
3000
+ : "Signer issuer not found in trusted list";
3001
+ limitations.push({
3002
+ code: "ISSUER_NOT_TRUSTED",
3003
+ description: statusMessage,
3004
+ });
3005
+ }
3006
+ else if (!trustListMatch && trustListError) {
3007
+ status = "INDETERMINATE";
3008
+ isValid = false;
3009
+ statusMessage = "Trusted list check failed";
3010
+ limitations.push({
3011
+ code: "TRUST_LIST_CHECK_FAILED",
3012
+ description: trustListError,
3013
+ });
3014
+ }
3015
+ }
4220
3016
  const checklist = options.includeChecklist
4221
3017
  ? buildVerificationChecklist({
4222
3018
  options,