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.
- package/CHANGELOG.md +78 -6
- package/dist/crypto/crypto.d.ts +2 -3
- package/dist/crypto.d.ts +6 -0
- package/dist/der/der.d.ts +14 -4
- package/dist/der/der.js +19 -19
- package/dist/der.d.ts +26 -2
- package/dist/der.js +4 -4
- package/dist/index.d.ts +82 -15
- package/dist/index.js +19 -19
- package/dist/internal/asn1/asn1.d.ts +1 -2
- package/dist/internal/asn1/der.d.ts +1 -2
- package/dist/internal/asn1/oids.js +71 -353
- package/dist/internal/asn1/oids.js.map +1 -1
- package/dist/internal/asn1/oids.json.js +357 -0
- package/dist/internal/asn1/oids.json.js.map +1 -0
- package/dist/internal/crypto/algorithm-names.js +1 -1
- package/dist/internal/crypto/pbes2.d.ts +1 -2
- package/dist/internal/crypto/pbes2.js +70 -70
- package/dist/internal/crypto/prime-ec.js +37 -0
- package/dist/internal/crypto/prime-ec.js.map +1 -0
- package/dist/internal/crypto/rsa-pss.js +50 -50
- package/dist/internal/crypto/sig-verify.d.ts +1 -2
- package/dist/internal/crypto/sig-verify.js +60 -60
- package/dist/internal/crypto/signing.d.ts +1 -2
- package/dist/internal/crypto/signing.js +26 -26
- package/dist/internal/jose/json-data.js +108 -0
- package/dist/internal/jose/json-data.js.map +1 -0
- package/dist/internal/jose/strict-json.d.ts +1 -2
- package/dist/internal/shared/dn.d.ts +1 -2
- package/dist/internal/shared/dn.js +1 -1
- package/dist/internal/shared/ip.d.ts +1 -2
- package/dist/internal/verify/name-constraints-engine.js +64 -64
- package/dist/internal/verify/policy-engine.js +1 -1
- package/dist/internal/verify/verify-path.d.ts +1 -2
- package/dist/internal/verify/verify-path.js +19 -19
- package/dist/internal/x509/directory-name.js +10 -10
- package/dist/internal/x509/extension-errors.d.ts +1 -2
- package/dist/internal/x509/extension-registry.js +18 -18
- package/dist/internal/x509/general-name-profile.js +9 -9
- package/dist/internal/x509/general-name.js +32 -32
- package/dist/internal/x509/name-fields.js +1 -1
- package/dist/jose/base64url.d.ts +4 -0
- package/dist/jose/base64url.js +14 -0
- package/dist/jose/base64url.js.map +1 -0
- package/dist/jose/errors.d.ts +9 -3
- package/dist/jose/errors.js.map +1 -1
- package/dist/jose/jwe.d.ts +64 -0
- package/dist/jose/jwe.js +188 -0
- package/dist/jose/jwe.js.map +1 -0
- package/dist/jose/jwks.d.ts +38 -10
- package/dist/jose/jwks.js +156 -96
- package/dist/jose/jwks.js.map +1 -1
- package/dist/jose/jws.d.ts +8 -6
- package/dist/jose/jws.js +216 -170
- package/dist/jose/jws.js.map +1 -1
- package/dist/jose/jwt.d.ts +8 -2
- package/dist/jose/jwt.js +98 -98
- package/dist/jose/remote-jwks.d.ts +1 -2
- package/dist/jose/remote-jwks.js +106 -108
- package/dist/jose/remote-jwks.js.map +1 -1
- package/dist/jose.d.ts +15 -4
- package/dist/jose.js +7 -5
- package/dist/kdf/argon2.d.ts +7 -2
- package/dist/kdf.d.ts +6 -0
- package/dist/keys/keys.d.ts +31 -6
- package/dist/keys/keys.js +315 -233
- package/dist/keys/keys.js.map +1 -1
- package/dist/keys.d.ts +11 -2
- package/dist/keys.js +2 -2
- package/dist/pem/pem.d.ts +1 -2
- package/dist/pem/pem.js +40 -25
- package/dist/pem/pem.js.map +1 -1
- package/dist/pem.d.ts +6 -0
- package/dist/pkcs/pfx.d.ts +2 -3
- package/dist/pkcs/pfx.js +142 -142
- package/dist/pkcs/pkcs12-mac.d.ts +1 -2
- package/dist/pkcs/pkcs12-mac.js +122 -122
- package/dist/pkcs/pkcs7.d.ts +14 -3
- package/dist/pkcs/pkcs7.js +268 -248
- package/dist/pkcs/pkcs7.js.map +1 -1
- package/dist/pkcs.d.ts +10 -1
- package/dist/pkcs.js +4 -4
- package/dist/result/result.d.ts +1 -2
- package/dist/result.d.ts +6 -0
- package/dist/revocation/chain.d.ts +2 -3
- package/dist/revocation/chain.js +52 -52
- package/dist/revocation/crl.d.ts +2 -3
- package/dist/revocation/crl.js +319 -319
- package/dist/revocation/crl.js.map +1 -1
- package/dist/revocation/ocsp.d.ts +2 -3
- package/dist/revocation/ocsp.js +395 -395
- package/dist/revocation/revocation.d.ts +2 -3
- package/dist/revocation/revocation.js +22 -22
- package/dist/revocation.d.ts +12 -3
- package/dist/revocation.js +4 -4
- package/dist/ssh/ssh.d.ts +2 -3
- package/dist/ssh/ssh.js +165 -170
- package/dist/ssh/ssh.js.map +1 -1
- package/dist/ssh/wire.d.ts +1 -2
- package/dist/ssh/wire.js +10 -10
- package/dist/ssh.d.ts +8 -0
- package/dist/verify/identity.d.ts +1 -2
- package/dist/verify/identity.js +31 -31
- package/dist/verify/name-constraints.d.ts +9 -2
- package/dist/verify/policy.d.ts +9 -2
- package/dist/verify/verify.d.ts +3 -4
- package/dist/verify/verify.js +121 -121
- package/dist/verify.d.ts +9 -0
- package/dist/x509/certificate.d.ts +4 -5
- package/dist/x509/certificate.js +40 -40
- package/dist/x509/csr.d.ts +3 -4
- package/dist/x509/csr.js +15 -15
- package/dist/x509/extensions.d.ts +1 -2
- package/dist/x509/extensions.js +165 -165
- package/dist/x509/extensions.js.map +1 -1
- package/dist/x509/fingerprint.d.ts +1 -2
- package/dist/x509/name-text.d.ts +1 -2
- package/dist/x509/name.d.ts +1 -2
- package/dist/x509/name.js +15 -15
- package/dist/x509/parse.d.ts +3 -4
- package/dist/x509/parse.js +423 -423
- package/dist/x509.d.ts +17 -4
- package/dist/x509.js +8 -8
- package/package.json +22 -23
- package/dist/internal/asn1/oids2.js +0 -75
- package/dist/internal/asn1/oids2.js.map +0 -1
package/dist/revocation/chain.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { DECODE_REFUSAL_CODES as e } from "../result/result.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { verifyCertificateChain as
|
|
7
|
-
import {
|
|
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
|
|
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
|
|
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" :
|
|
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 =
|
|
197
|
+
i = u(n);
|
|
198
198
|
} catch {
|
|
199
199
|
return b;
|
|
200
200
|
}
|
|
201
|
-
let
|
|
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
|
|
210
|
+
return o.ok ? o.value.status === "revoked" ? { kind: "revoked" } : await validateCrlSigner(t, r) === "resolved-valid" ? {
|
|
211
211
|
kind: "reasons",
|
|
212
|
-
reasons:
|
|
213
|
-
} : 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" ?
|
|
233
|
+
return typeof e == "string" ? m(e) : p(e);
|
|
234
234
|
}
|
|
235
|
-
function evidenceParseError(
|
|
235
|
+
function evidenceParseError(t, r) {
|
|
236
236
|
return {
|
|
237
237
|
kind: "parse_error",
|
|
238
|
-
code: t
|
|
239
|
-
message:
|
|
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 =
|
|
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
|
|
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
|
|
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:
|
|
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 &&
|
|
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
|
|
501
|
+
let s = await resolveBaseCrlAgainstSigners({
|
|
502
502
|
cert: e,
|
|
503
503
|
baseCrl: a,
|
|
504
|
-
deltaCandidates: rankApplicableDeltaCrls(a, m,
|
|
504
|
+
deltaCandidates: rankApplicableDeltaCrls(a, m, u, g ?? 0, h),
|
|
505
505
|
issuer: t,
|
|
506
506
|
extraCertificates: o,
|
|
507
|
-
chain:
|
|
508
|
-
at:
|
|
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 (
|
|
517
|
-
status:
|
|
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 ?
|
|
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(
|
|
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
|
|
580
|
+
let n = /* @__PURE__ */ new Set();
|
|
581
581
|
return e.filter((e) => {
|
|
582
582
|
let r = [
|
|
583
583
|
e.signatureAlgorithmOid,
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
584
|
+
t(e.signatureAlgorithmParametersDer ?? /* @__PURE__ */ new Uint8Array()),
|
|
585
|
+
t(e.signatureValue),
|
|
586
|
+
t(e.tbsCertListDer)
|
|
587
587
|
].join(":");
|
|
588
|
-
return !
|
|
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() &&
|
|
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:
|
|
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:
|
|
608
|
+
issuerCertificate: a,
|
|
609
609
|
crl: p.value,
|
|
610
|
-
at:
|
|
611
|
-
...
|
|
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
|
|
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,
|
|
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
|
|
624
|
-
return (e.kind === "checked" ? irremovableRevocation(t, e.result,
|
|
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
|
|
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 =
|
|
729
|
-
if (t.ok) return t.value.noRevAvail === !0 ? "no_rev_avail" :
|
|
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:
|
|
754
|
-
|
|
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:
|
|
771
|
-
extraCertificates:
|
|
770
|
+
crls: i,
|
|
771
|
+
extraCertificates: a,
|
|
772
772
|
at: o,
|
|
773
773
|
crlMaxAgeMs: n?.crlMaxAgeMs,
|
|
774
774
|
clockSkewMs: n?.clockSkewMs,
|
package/dist/revocation/crl.d.ts
CHANGED
|
@@ -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;
|