micro509 0.17.1 → 0.18.0

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 (126) hide show
  1. package/CHANGELOG.md +78 -6
  2. package/dist/crypto/crypto.d.ts +2 -3
  3. package/dist/crypto.d.ts +6 -0
  4. package/dist/der/der.d.ts +14 -4
  5. package/dist/der/der.js +19 -19
  6. package/dist/der.d.ts +26 -2
  7. package/dist/der.js +4 -4
  8. package/dist/index.d.ts +82 -15
  9. package/dist/index.js +19 -19
  10. package/dist/internal/asn1/asn1.d.ts +1 -2
  11. package/dist/internal/asn1/der.d.ts +1 -2
  12. package/dist/internal/asn1/oids.js +71 -353
  13. package/dist/internal/asn1/oids.js.map +1 -1
  14. package/dist/internal/asn1/oids.json.js +357 -0
  15. package/dist/internal/asn1/oids.json.js.map +1 -0
  16. package/dist/internal/crypto/algorithm-names.js +1 -1
  17. package/dist/internal/crypto/pbes2.d.ts +1 -2
  18. package/dist/internal/crypto/pbes2.js +70 -70
  19. package/dist/internal/crypto/prime-ec.js +37 -0
  20. package/dist/internal/crypto/prime-ec.js.map +1 -0
  21. package/dist/internal/crypto/rsa-pss.js +50 -50
  22. package/dist/internal/crypto/sig-verify.d.ts +1 -2
  23. package/dist/internal/crypto/sig-verify.js +60 -60
  24. package/dist/internal/crypto/signing.d.ts +1 -2
  25. package/dist/internal/crypto/signing.js +26 -26
  26. package/dist/internal/jose/json-data.js +108 -0
  27. package/dist/internal/jose/json-data.js.map +1 -0
  28. package/dist/internal/jose/strict-json.d.ts +1 -2
  29. package/dist/internal/shared/dn.d.ts +1 -2
  30. package/dist/internal/shared/dn.js +1 -1
  31. package/dist/internal/shared/ip.d.ts +1 -2
  32. package/dist/internal/verify/name-constraints-engine.js +64 -64
  33. package/dist/internal/verify/policy-engine.js +1 -1
  34. package/dist/internal/verify/verify-path.d.ts +1 -2
  35. package/dist/internal/verify/verify-path.js +19 -19
  36. package/dist/internal/x509/directory-name.js +10 -10
  37. package/dist/internal/x509/extension-errors.d.ts +1 -2
  38. package/dist/internal/x509/extension-registry.js +18 -18
  39. package/dist/internal/x509/general-name-profile.js +9 -9
  40. package/dist/internal/x509/general-name.js +32 -32
  41. package/dist/internal/x509/name-fields.js +1 -1
  42. package/dist/jose/base64url.d.ts +4 -0
  43. package/dist/jose/base64url.js +14 -0
  44. package/dist/jose/base64url.js.map +1 -0
  45. package/dist/jose/errors.d.ts +9 -3
  46. package/dist/jose/errors.js.map +1 -1
  47. package/dist/jose/jwe.d.ts +64 -0
  48. package/dist/jose/jwe.js +188 -0
  49. package/dist/jose/jwe.js.map +1 -0
  50. package/dist/jose/jwks.d.ts +38 -10
  51. package/dist/jose/jwks.js +156 -96
  52. package/dist/jose/jwks.js.map +1 -1
  53. package/dist/jose/jws.d.ts +8 -6
  54. package/dist/jose/jws.js +216 -170
  55. package/dist/jose/jws.js.map +1 -1
  56. package/dist/jose/jwt.d.ts +8 -2
  57. package/dist/jose/jwt.js +98 -98
  58. package/dist/jose/remote-jwks.d.ts +1 -2
  59. package/dist/jose/remote-jwks.js +106 -108
  60. package/dist/jose/remote-jwks.js.map +1 -1
  61. package/dist/jose.d.ts +15 -4
  62. package/dist/jose.js +7 -5
  63. package/dist/kdf/argon2.d.ts +7 -2
  64. package/dist/kdf.d.ts +6 -0
  65. package/dist/keys/keys.d.ts +31 -6
  66. package/dist/keys/keys.js +315 -233
  67. package/dist/keys/keys.js.map +1 -1
  68. package/dist/keys.d.ts +11 -2
  69. package/dist/keys.js +2 -2
  70. package/dist/pem/pem.d.ts +1 -2
  71. package/dist/pem/pem.js +40 -25
  72. package/dist/pem/pem.js.map +1 -1
  73. package/dist/pem.d.ts +6 -0
  74. package/dist/pkcs/pfx.d.ts +2 -3
  75. package/dist/pkcs/pfx.js +142 -142
  76. package/dist/pkcs/pkcs12-mac.d.ts +1 -2
  77. package/dist/pkcs/pkcs12-mac.js +122 -122
  78. package/dist/pkcs/pkcs7.d.ts +14 -3
  79. package/dist/pkcs/pkcs7.js +268 -248
  80. package/dist/pkcs/pkcs7.js.map +1 -1
  81. package/dist/pkcs.d.ts +10 -1
  82. package/dist/pkcs.js +4 -4
  83. package/dist/result/result.d.ts +1 -2
  84. package/dist/result.d.ts +6 -0
  85. package/dist/revocation/chain.d.ts +2 -3
  86. package/dist/revocation/chain.js +52 -52
  87. package/dist/revocation/crl.d.ts +2 -3
  88. package/dist/revocation/crl.js +319 -319
  89. package/dist/revocation/crl.js.map +1 -1
  90. package/dist/revocation/ocsp.d.ts +2 -3
  91. package/dist/revocation/ocsp.js +395 -395
  92. package/dist/revocation/revocation.d.ts +2 -3
  93. package/dist/revocation/revocation.js +22 -22
  94. package/dist/revocation.d.ts +12 -3
  95. package/dist/revocation.js +4 -4
  96. package/dist/ssh/ssh.d.ts +2 -3
  97. package/dist/ssh/ssh.js +165 -170
  98. package/dist/ssh/ssh.js.map +1 -1
  99. package/dist/ssh/wire.d.ts +1 -2
  100. package/dist/ssh/wire.js +10 -10
  101. package/dist/ssh.d.ts +8 -0
  102. package/dist/verify/identity.d.ts +1 -2
  103. package/dist/verify/identity.js +31 -31
  104. package/dist/verify/name-constraints.d.ts +9 -2
  105. package/dist/verify/policy.d.ts +9 -2
  106. package/dist/verify/verify.d.ts +3 -4
  107. package/dist/verify/verify.js +121 -121
  108. package/dist/verify.d.ts +9 -0
  109. package/dist/x509/certificate.d.ts +4 -5
  110. package/dist/x509/certificate.js +40 -40
  111. package/dist/x509/csr.d.ts +3 -4
  112. package/dist/x509/csr.js +15 -15
  113. package/dist/x509/extensions.d.ts +1 -2
  114. package/dist/x509/extensions.js +165 -165
  115. package/dist/x509/extensions.js.map +1 -1
  116. package/dist/x509/fingerprint.d.ts +1 -2
  117. package/dist/x509/name-text.d.ts +1 -2
  118. package/dist/x509/name.d.ts +1 -2
  119. package/dist/x509/name.js +15 -15
  120. package/dist/x509/parse.d.ts +3 -4
  121. package/dist/x509/parse.js +423 -423
  122. package/dist/x509.d.ts +17 -4
  123. package/dist/x509.js +8 -8
  124. package/package.json +22 -23
  125. package/dist/internal/asn1/oids2.js +0 -75
  126. package/dist/internal/asn1/oids2.js.map +0 -1
@@ -1,10 +1,10 @@
1
1
  import { DECODE_REFUSAL_CODES as e } from "../result/result.js";
2
- import { decodeRefusalOf as t } from "../internal/asn1/decode-refusal.js";
3
- import { toHex as n } from "../internal/asn1/asn1.js";
4
- import { parseCertificateDer as r, parseCertificateFromSource as i } from "../x509/parse.js";
5
- import { assertCrlMaxAge as a, authenticateCrl as o, checkCertificateRevocationAgainstCrl as s, checkRevocationAgainstAuthenticatedCrl as c, coversAllDistributionPointReasons as l, isCrlApplicableTo as u, isCurrentDeltaCrl as d, normalizeCrl as f, revocationReasonFromCode as p } from "./crl.js";
6
- import { verifyCertificateChain as m } from "../verify/verify.js";
7
- import { carriesOcspNoCheck as h, parseOcspResponseDerOrThrow as g, parseOcspResponsePemOrThrow as _, validateOcspResponse as v } from "./ocsp.js";
2
+ import { toHex as t } from "../internal/asn1/asn1.js";
3
+ import { decodeRefusalOf as n } from "../internal/asn1/decode-refusal.js";
4
+ import { assertCrlMaxAge as r, authenticateCrl as i, checkCertificateRevocationAgainstCrl as a, checkRevocationAgainstAuthenticatedCrl as o, coversAllDistributionPointReasons as s, isCrlApplicableTo as c, isCurrentDeltaCrl as l, normalizeCrl as u, revocationReasonFromCode as d } from "./crl.js";
5
+ import { carriesOcspNoCheck as f, parseOcspResponseDerOrThrow as p, parseOcspResponsePemOrThrow as m, validateOcspResponse as h } from "./ocsp.js";
6
+ import { verifyCertificateChain as g } from "../verify/verify.js";
7
+ import { parseCertificateDer as _, parseCertificateFromSource as v } from "../x509/parse.js";
8
8
  // src/revocation/chain.ts
9
9
  /**
10
10
  * Chain-level revocation orchestration.
@@ -67,7 +67,7 @@ const y = [
67
67
  */
68
68
  function parseCertificateSafe(e) {
69
69
  try {
70
- return i(e);
70
+ return v(e);
71
71
  } catch {
72
72
  return;
73
73
  }
@@ -125,7 +125,7 @@ async function crlSignerChainsToAnchor(e, t, n, r) {
125
125
  let t = parseCertificateSafe(e);
126
126
  t !== void 0 && addCandidate(t);
127
127
  }
128
- return (await m({
128
+ return (await g({
129
129
  leaf: e.der,
130
130
  intermediates: a.map((e) => e.der),
131
131
  roots: [i.der],
@@ -180,7 +180,7 @@ async function checkSignerRevocation(e, t, n) {
180
180
  if (o.kind === "unrecognized_reason") a = !0;
181
181
  else for (let e of o.reasons) i.add(e);
182
182
  }
183
- return a ? "resolved-indeterminate" : l(i) || r ? "resolved-valid" : "resolved-indeterminate";
183
+ return a ? "resolved-indeterminate" : s(i) || r ? "resolved-valid" : "resolved-indeterminate";
184
184
  }
185
185
  const b = {
186
186
  kind: "reasons",
@@ -194,11 +194,11 @@ const b = {
194
194
  async function checkSignerAgainstCrl(e, t, n, r) {
195
195
  let i;
196
196
  try {
197
- i = f(n);
197
+ i = u(n);
198
198
  } catch {
199
199
  return b;
200
200
  }
201
- let a = await s({
201
+ let o = await a({
202
202
  certificate: e,
203
203
  issuerCertificate: t,
204
204
  crl: i,
@@ -207,10 +207,10 @@ async function checkSignerAgainstCrl(e, t, n, r) {
207
207
  ...r.clockSkewMs === void 0 ? {} : { clockSkewMs: r.clockSkewMs },
208
208
  unrecognizedReasonCode: r.unrecognizedReasonCode
209
209
  });
210
- return a.ok ? a.value.status === "revoked" ? { kind: "revoked" } : await validateCrlSigner(t, r) === "resolved-valid" ? {
210
+ return o.ok ? o.value.status === "revoked" ? { kind: "revoked" } : await validateCrlSigner(t, r) === "resolved-valid" ? {
211
211
  kind: "reasons",
212
- reasons: a.value.coveredReasons
213
- } : b : a.code === "reason_code_unrecognized" ? { kind: "unrecognized_reason" } : b;
212
+ reasons: o.value.coveredReasons
213
+ } : b : o.code === "reason_code_unrecognized" ? { kind: "unrecognized_reason" } : b;
214
214
  }
215
215
  /** Builds the `revoked` CertificateRevocationStatus for a CRL hit. */
216
216
  function buildCrlRevokedStatus(e, t, n, r, i) {
@@ -230,13 +230,13 @@ function buildCrlRevokedStatus(e, t, n, r, i) {
230
230
  }
231
231
  /** Parses an OCSP response from PEM string or DER bytes. */
232
232
  function parseOcspResponseFromSource(e) {
233
- return typeof e == "string" ? _(e) : g(e);
233
+ return typeof e == "string" ? m(e) : p(e);
234
234
  }
235
- function evidenceParseError(n, r) {
235
+ function evidenceParseError(t, r) {
236
236
  return {
237
237
  kind: "parse_error",
238
- code: t(n, e)?.code ?? "malformed",
239
- message: n instanceof Error ? n.message : r
238
+ code: n(t, e)?.code ?? "malformed",
239
+ message: t instanceof Error ? t.message : r
240
240
  };
241
241
  }
242
242
  /** Parses one OCSP source and locates the entry for the certificate under evaluation. */
@@ -283,7 +283,7 @@ function classifyValidatedOcspEntry(e, t, n) {
283
283
  thisUpdate: t.thisUpdate
284
284
  };
285
285
  if (t.certStatus === "unknown") return { kind: "unknown" };
286
- let r = p(t.revocationReasonCode);
286
+ let r = d(t.revocationReasonCode);
287
287
  if (n === "reject" && typeof r == "object") return { kind: "unrecognized_reason" };
288
288
  let i = buildOcspRevokedStatus(e, t.thisUpdate, t.revokedAt, r);
289
289
  return r === "certificateHold" ? {
@@ -365,7 +365,7 @@ async function validateOcspResponseWithResponderFallback(e, t, n, r) {
365
365
  ...n.policy?.clockSkewMs === void 0 ? {} : { clockSkewMs: n.policy.clockSkewMs },
366
366
  ...n.policy?.ocspProfile === void 0 ? {} : { profile: n.policy.ocspProfile },
367
367
  ...n.policy?.unrecognizedReasonCode === void 0 ? {} : { responderRevocationUnrecognizedReasonCode: n.policy.unrecognizedReasonCode }
368
- }, o = await v({
368
+ }, o = await h({
369
369
  response: e,
370
370
  ...a
371
371
  });
@@ -373,7 +373,7 @@ async function validateOcspResponseWithResponderFallback(e, t, n, r) {
373
373
  for (let t of n.extraCertificates ?? []) {
374
374
  let n = parseCertificateSafe(t);
375
375
  if (n === void 0) continue;
376
- let r = await v({
376
+ let r = await h({
377
377
  response: e,
378
378
  ...a,
379
379
  responderCertificate: n
@@ -485,7 +485,7 @@ async function resolveBaseCrlAgainstSigners(e) {
485
485
  }
486
486
  }
487
487
  async function evaluateCrlEvidence(e, t, n, r, i) {
488
- let { crls: a = [], extraCertificates: o = [], chain: s = [], at: c = /* @__PURE__ */ new Date() } = n, d = {
488
+ let { crls: a = [], extraCertificates: o = [], chain: l = [], at: u = /* @__PURE__ */ new Date() } = n, d = {
489
489
  executionErrors: [],
490
490
  coveredReasons: /* @__PURE__ */ new Set(),
491
491
  sawCrlSignerRevoked: !1,
@@ -496,16 +496,16 @@ async function evaluateCrlEvidence(e, t, n, r, i) {
496
496
  sawDeltaCrlRetryLimit: !1,
497
497
  sawUnrecognizedReasonCode: !1,
498
498
  sawGood: !1
499
- }, f = parseCrlEvidenceSources(a, d.executionErrors), p = distinctSignedCrls(f.filter((t) => t.baseCrlNumber === void 0 && u(e, t))), m = distinctSignedCrls(f.filter((e) => e.baseCrlNumber !== void 0)), h = n.policy?.crlMaxAgeMs, g = n.policy?.clockSkewMs;
499
+ }, f = parseCrlEvidenceSources(a, d.executionErrors), p = distinctSignedCrls(f.filter((t) => t.baseCrlNumber === void 0 && c(e, t))), m = distinctSignedCrls(f.filter((e) => e.baseCrlNumber !== void 0)), h = n.policy?.crlMaxAgeMs, g = n.policy?.clockSkewMs;
500
500
  for (let a of p) {
501
- let l = await resolveBaseCrlAgainstSigners({
501
+ let s = await resolveBaseCrlAgainstSigners({
502
502
  cert: e,
503
503
  baseCrl: a,
504
- deltaCandidates: rankApplicableDeltaCrls(a, m, c, g ?? 0, h),
504
+ deltaCandidates: rankApplicableDeltaCrls(a, m, u, g ?? 0, h),
505
505
  issuer: t,
506
506
  extraCertificates: o,
507
- chain: s,
508
- at: c,
507
+ chain: l,
508
+ at: u,
509
509
  crlMaxAgeMs: h,
510
510
  clockSkewMs: g,
511
511
  unrecognizedReasonCode: n.policy?.unrecognizedReasonCode ?? "revoked",
@@ -513,8 +513,8 @@ async function evaluateCrlEvidence(e, t, n, r, i) {
513
513
  deltaBudget: i,
514
514
  state: d
515
515
  });
516
- if (l !== void 0) return {
517
- status: l,
516
+ if (s !== void 0) return {
517
+ status: s,
518
518
  executionErrors: d.executionErrors
519
519
  };
520
520
  }
@@ -526,7 +526,7 @@ async function evaluateCrlEvidence(e, t, n, r, i) {
526
526
  indeterminateReasons: _
527
527
  },
528
528
  executionErrors: d.executionErrors
529
- } : d.sawGood && d.freshestGood !== void 0 ? l(d.coveredReasons) ? {
529
+ } : d.sawGood && d.freshestGood !== void 0 ? s(d.coveredReasons) ? {
530
530
  status: {
531
531
  certificate: e,
532
532
  status: "good",
@@ -569,7 +569,7 @@ function crlUnavailableReason(e) {
569
569
  function parseCrlEvidenceSources(e, t) {
570
570
  let n = [];
571
571
  for (let r of e) try {
572
- n.push(f(r));
572
+ n.push(u(r));
573
573
  } catch (e) {
574
574
  t.push(evidenceParseError(e, "CRL parse failed"));
575
575
  }
@@ -577,21 +577,21 @@ function parseCrlEvidenceSources(e, t) {
577
577
  }
578
578
  /** `crls` without repeats of the same signed content and signature. */
579
579
  function distinctSignedCrls(e) {
580
- let t = /* @__PURE__ */ new Set();
580
+ let n = /* @__PURE__ */ new Set();
581
581
  return e.filter((e) => {
582
582
  let r = [
583
583
  e.signatureAlgorithmOid,
584
- n(e.signatureAlgorithmParametersDer ?? /* @__PURE__ */ new Uint8Array()),
585
- n(e.signatureValue),
586
- n(e.tbsCertListDer)
584
+ t(e.signatureAlgorithmParametersDer ?? /* @__PURE__ */ new Uint8Array()),
585
+ t(e.signatureValue),
586
+ t(e.tbsCertListDer)
587
587
  ].join(":");
588
- return !t.has(r) && (t.add(r), !0);
588
+ return !n.has(r) && (n.add(r), !0);
589
589
  });
590
590
  }
591
591
  /** Every delta CRL that can update `baseCrl`, newest first, in the order to try authenticating them. */
592
592
  function rankApplicableDeltaCrls(e, t, n, r, i) {
593
593
  let a = e.crlNumber;
594
- return a === void 0 ? [] : t.filter((t) => t.issuer.derHex === e.issuer.derHex && t.baseCrlNumber !== void 0 && t.baseCrlNumber <= a && t.crlNumber !== void 0 && t.crlNumber > a && t.thisUpdate.getTime() >= e.thisUpdate.getTime() && d(t, n, r, i)).sort((e, t) => isNewerDeltaCrl(e, t) ? -1 : +!!isNewerDeltaCrl(t, e));
594
+ return a === void 0 ? [] : t.filter((t) => t.issuer.derHex === e.issuer.derHex && t.baseCrlNumber !== void 0 && t.baseCrlNumber <= a && t.crlNumber !== void 0 && t.crlNumber > a && t.thisUpdate.getTime() >= e.thisUpdate.getTime() && l(t, n, r, i)).sort((e, t) => isNewerDeltaCrl(e, t) ? -1 : +!!isNewerDeltaCrl(t, e));
595
595
  }
596
596
  const S = 4;
597
597
  /**
@@ -601,32 +601,32 @@ const S = 4;
601
601
  * and applicability ends the search.
602
602
  */
603
603
  async function checkCrlAgainstDeltaCandidates(e) {
604
- let { cert: t, baseCrl: n, deltaCandidates: r, candidate: i, at: a, crlMaxAgeMs: s, clockSkewMs: l, unrecognizedReasonCode: u, budgets: d, state: f } = e, p = await o(n, i);
604
+ let { cert: t, baseCrl: n, deltaCandidates: r, candidate: a, at: s, crlMaxAgeMs: c, clockSkewMs: l, unrecognizedReasonCode: u, budgets: d, state: f } = e, p = await i(n, a);
605
605
  if (!p.ok) return { kind: "unusable_base" };
606
606
  let m = {
607
607
  certificate: t,
608
- issuerCertificate: i,
608
+ issuerCertificate: a,
609
609
  crl: p.value,
610
- at: a,
611
- ...s === void 0 ? {} : { maxAgeMs: s },
610
+ at: s,
611
+ ...c === void 0 ? {} : { maxAgeMs: c },
612
612
  ...l === void 0 ? {} : { clockSkewMs: l },
613
613
  unrecognizedReasonCode: u
614
614
  };
615
615
  for (let e of r) {
616
- let r = takeDeltaCrlAttempt(d) ? settleAuthenticatedCrlOutcome(await c(t, p.value, {
616
+ let r = takeDeltaCrlAttempt(d) ? settleAuthenticatedCrlOutcome(await o(t, p.value, {
617
617
  ...m,
618
618
  deltaCrl: e
619
619
  }), laterEvidenceDate(n.thisUpdate, e.thisUpdate), f) : { kind: "retry_limit" };
620
620
  if (r !== void 0) {
621
- if (r.kind === "delta_unusable") return irremovableRevocation(t, r.complete, a, n.thisUpdate) ?? r;
621
+ if (r.kind === "delta_unusable") return irremovableRevocation(t, r.complete, s, n.thisUpdate) ?? r;
622
622
  if (r.kind === "retry_limit") {
623
- let e = await c(t, p.value, m);
624
- return (e.kind === "checked" ? irremovableRevocation(t, e.result, a, n.thisUpdate) : void 0) ?? r;
623
+ let e = await o(t, p.value, m);
624
+ return (e.kind === "checked" ? irremovableRevocation(t, e.result, s, n.thisUpdate) : void 0) ?? r;
625
625
  }
626
626
  return r;
627
627
  }
628
628
  }
629
- return settleAuthenticatedCrlOutcome(await c(t, p.value, m), n.thisUpdate, f) ?? { kind: "unusable_base" };
629
+ return settleAuthenticatedCrlOutcome(await o(t, p.value, m), n.thisUpdate, f) ?? { kind: "unusable_base" };
630
630
  }
631
631
  /**
632
632
  * The base CRL's revocation of `cert` in `complete` when no delta CRL could
@@ -725,8 +725,8 @@ async function evaluateCertificateRevocation(e, t, n, r, i) {
725
725
  * signed DER.
726
726
  */
727
727
  function revocationSkipReason(e) {
728
- let t = r(e.der);
729
- if (t.ok) return t.value.noRevAvail === !0 ? "no_rev_avail" : h(t.value) ? "ocsp_nocheck" : void 0;
728
+ let t = _(e.der);
729
+ if (t.ok) return t.value.noRevAvail === !0 ? "no_rev_avail" : f(t.value) ? "ocsp_nocheck" : void 0;
730
730
  }
731
731
  /**
732
732
  * Checks revocation status for all certificates in a validated chain.
@@ -750,8 +750,8 @@ function revocationSkipReason(e) {
750
750
  * ```
751
751
  */
752
752
  async function checkChainRevocation(e) {
753
- let { chain: t, policy: n, crls: r = [], extraCertificates: i = [], at: o = /* @__PURE__ */ new Date() } = e;
754
- a(n?.crlMaxAgeMs);
753
+ let { chain: t, policy: n, crls: i = [], extraCertificates: a = [], at: o = /* @__PURE__ */ new Date() } = e;
754
+ r(n?.crlMaxAgeMs);
755
755
  let s = n?.mode ?? "hard-fail";
756
756
  if (t.length === 0) return {
757
757
  ok: !0,
@@ -767,8 +767,8 @@ async function checkChainRevocation(e) {
767
767
  let c = {
768
768
  cache: /* @__PURE__ */ new Map(),
769
769
  chain: t,
770
- crls: r,
771
- extraCertificates: i,
770
+ crls: i,
771
+ extraCertificates: a,
772
772
  at: o,
773
773
  crlMaxAgeMs: n?.crlMaxAgeMs,
774
774
  clockSkewMs: n?.clockSkewMs,
@@ -1,6 +1,6 @@
1
1
  import { DecodeFailureCode, DecodeRefusalCode, ErrorResult, Micro509Error } from "../result/result.js";
2
- import { NameInput } from "../x509/name.js";
3
2
  import { DistributionPoint, DistributionPointReason, GeneralName, IssuingDistributionPoint } from "../x509/extensions.js";
3
+ import { NameInput } from "../x509/name.js";
4
4
  import { ParsedCertificate, ParsedDistributionPoint, ParsedIssuingDistributionPoint, ParsedName } from "../x509/parse.js";
5
5
  /**
6
6
  * Single revoked certificate entry for {@linkcode createCertificateRevocationList}.
@@ -416,5 +416,4 @@ export type CrlEncoderErrorCode = "crl_number_invalid" | "distribution_point_ful
416
416
  * an {@linkcode UnrecognizedRevocationReason} carrying a code outside RFC 5280
417
417
  * §5.3.1. Returns `undefined` only when `code` is `undefined`.
418
418
  */
419
- export declare function revocationReasonFromCode(code: bigint | undefined): ParsedRevocationReason | undefined;
420
- //# sourceMappingURL=crl.d.ts.map
419
+ export declare function revocationReasonFromCode(code: bigint | undefined): ParsedRevocationReason | undefined;