micro509 0.17.0 → 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 (137) hide show
  1. package/CHANGELOG.md +123 -6
  2. package/README.md +3 -0
  3. package/dist/crypto/crypto.d.ts +2 -3
  4. package/dist/crypto.d.ts +6 -0
  5. package/dist/der/der.d.ts +14 -4
  6. package/dist/der/der.js +19 -19
  7. package/dist/der.d.ts +26 -2
  8. package/dist/der.js +4 -4
  9. package/dist/index.d.ts +82 -15
  10. package/dist/index.js +19 -19
  11. package/dist/internal/asn1/asn1.d.ts +1 -2
  12. package/dist/internal/asn1/der.d.ts +1 -2
  13. package/dist/internal/asn1/oids.js +71 -353
  14. package/dist/internal/asn1/oids.js.map +1 -1
  15. package/dist/internal/asn1/oids.json.js +357 -0
  16. package/dist/internal/asn1/oids.json.js.map +1 -0
  17. package/dist/internal/crypto/algorithm-names.js +1 -1
  18. package/dist/internal/crypto/pbes2.d.ts +1 -2
  19. package/dist/internal/crypto/pbes2.js +70 -70
  20. package/dist/internal/crypto/prime-ec.js +37 -0
  21. package/dist/internal/crypto/prime-ec.js.map +1 -0
  22. package/dist/internal/crypto/rsa-pss.js +50 -50
  23. package/dist/internal/crypto/sig-verify.d.ts +1 -2
  24. package/dist/internal/crypto/sig-verify.js +60 -60
  25. package/dist/internal/crypto/signing.d.ts +1 -2
  26. package/dist/internal/crypto/signing.js +26 -26
  27. package/dist/internal/jose/json-data.js +108 -0
  28. package/dist/internal/jose/json-data.js.map +1 -0
  29. package/dist/internal/jose/strict-json.d.ts +1 -2
  30. package/dist/internal/shared/dn.d.ts +1 -2
  31. package/dist/internal/shared/dn.js +1 -1
  32. package/dist/internal/shared/ip.d.ts +1 -2
  33. package/dist/internal/verify/name-constraints-engine.js +64 -64
  34. package/dist/internal/verify/policy-engine.js +1 -1
  35. package/dist/internal/verify/verify-path.d.ts +1 -2
  36. package/dist/internal/verify/verify-path.js +19 -19
  37. package/dist/internal/x509/directory-name.js +10 -10
  38. package/dist/internal/x509/extension-errors.d.ts +1 -2
  39. package/dist/internal/x509/extension-registry.js +18 -18
  40. package/dist/internal/x509/general-name-profile.js +9 -9
  41. package/dist/internal/x509/general-name.js +32 -32
  42. package/dist/internal/x509/name-fields.js +1 -1
  43. package/dist/jose/base64url.d.ts +4 -0
  44. package/dist/jose/base64url.js +14 -0
  45. package/dist/jose/base64url.js.map +1 -0
  46. package/dist/jose/errors.d.ts +9 -3
  47. package/dist/jose/errors.js.map +1 -1
  48. package/dist/jose/jwe.d.ts +64 -0
  49. package/dist/jose/jwe.js +188 -0
  50. package/dist/jose/jwe.js.map +1 -0
  51. package/dist/jose/jwks.d.ts +38 -10
  52. package/dist/jose/jwks.js +156 -96
  53. package/dist/jose/jwks.js.map +1 -1
  54. package/dist/jose/jws.d.ts +8 -6
  55. package/dist/jose/jws.js +216 -170
  56. package/dist/jose/jws.js.map +1 -1
  57. package/dist/jose/jwt.d.ts +8 -2
  58. package/dist/jose/jwt.js +98 -98
  59. package/dist/jose/remote-jwks.d.ts +1 -2
  60. package/dist/jose/remote-jwks.js +106 -108
  61. package/dist/jose/remote-jwks.js.map +1 -1
  62. package/dist/jose.d.ts +15 -4
  63. package/dist/jose.js +7 -5
  64. package/dist/kdf/argon2-arithmetic.js +15 -0
  65. package/dist/kdf/argon2-arithmetic.js.map +1 -0
  66. package/dist/kdf/argon2-core.js +486 -0
  67. package/dist/kdf/argon2-core.js.map +1 -0
  68. package/dist/kdf/argon2-memory.js +20 -0
  69. package/dist/kdf/argon2-memory.js.map +1 -0
  70. package/dist/kdf/argon2-portable.js +18 -0
  71. package/dist/kdf/argon2-portable.js.map +1 -0
  72. package/dist/kdf/argon2.d.ts +22 -11
  73. package/dist/kdf/argon2.js +32 -13
  74. package/dist/kdf/argon2.js.map +1 -1
  75. package/dist/kdf.d.ts +6 -0
  76. package/dist/keys/keys.d.ts +31 -6
  77. package/dist/keys/keys.js +315 -233
  78. package/dist/keys/keys.js.map +1 -1
  79. package/dist/keys.d.ts +11 -2
  80. package/dist/keys.js +2 -2
  81. package/dist/pem/pem.d.ts +1 -2
  82. package/dist/pem/pem.js +40 -25
  83. package/dist/pem/pem.js.map +1 -1
  84. package/dist/pem.d.ts +6 -0
  85. package/dist/pkcs/pfx.d.ts +2 -3
  86. package/dist/pkcs/pfx.js +142 -142
  87. package/dist/pkcs/pkcs12-mac.d.ts +1 -2
  88. package/dist/pkcs/pkcs12-mac.js +122 -122
  89. package/dist/pkcs/pkcs7.d.ts +14 -3
  90. package/dist/pkcs/pkcs7.js +268 -248
  91. package/dist/pkcs/pkcs7.js.map +1 -1
  92. package/dist/pkcs.d.ts +10 -1
  93. package/dist/pkcs.js +4 -4
  94. package/dist/result/result.d.ts +1 -2
  95. package/dist/result.d.ts +6 -0
  96. package/dist/revocation/chain.d.ts +2 -3
  97. package/dist/revocation/chain.js +52 -52
  98. package/dist/revocation/crl.d.ts +2 -3
  99. package/dist/revocation/crl.js +319 -319
  100. package/dist/revocation/crl.js.map +1 -1
  101. package/dist/revocation/ocsp.d.ts +2 -3
  102. package/dist/revocation/ocsp.js +395 -395
  103. package/dist/revocation/revocation.d.ts +2 -3
  104. package/dist/revocation/revocation.js +22 -22
  105. package/dist/revocation.d.ts +12 -3
  106. package/dist/revocation.js +4 -4
  107. package/dist/ssh/ssh.d.ts +2 -3
  108. package/dist/ssh/ssh.js +165 -170
  109. package/dist/ssh/ssh.js.map +1 -1
  110. package/dist/ssh/wire.d.ts +1 -2
  111. package/dist/ssh/wire.js +10 -10
  112. package/dist/ssh.d.ts +8 -0
  113. package/dist/verify/identity.d.ts +1 -2
  114. package/dist/verify/identity.js +31 -31
  115. package/dist/verify/name-constraints.d.ts +9 -2
  116. package/dist/verify/policy.d.ts +9 -2
  117. package/dist/verify/verify.d.ts +3 -4
  118. package/dist/verify/verify.js +121 -121
  119. package/dist/verify.d.ts +9 -0
  120. package/dist/x509/certificate.d.ts +4 -5
  121. package/dist/x509/certificate.js +40 -40
  122. package/dist/x509/csr.d.ts +3 -4
  123. package/dist/x509/csr.js +15 -15
  124. package/dist/x509/extensions.d.ts +1 -2
  125. package/dist/x509/extensions.js +165 -165
  126. package/dist/x509/extensions.js.map +1 -1
  127. package/dist/x509/fingerprint.d.ts +1 -2
  128. package/dist/x509/name-text.d.ts +1 -2
  129. package/dist/x509/name.d.ts +1 -2
  130. package/dist/x509/name.js +15 -15
  131. package/dist/x509/parse.d.ts +3 -4
  132. package/dist/x509/parse.js +423 -423
  133. package/dist/x509.d.ts +17 -4
  134. package/dist/x509.js +8 -8
  135. package/package.json +27 -34
  136. package/dist/internal/asn1/oids2.js +0 -75
  137. package/dist/internal/asn1/oids2.js.map +0 -1
@@ -1,21 +1,21 @@
1
- import { DECODE_REFUSAL_CODES as e, errorResult as t, indexedErrorResult as n, indexedMicro509Error as r, micro509Error as i } from "../result/result.js";
2
- import { decodeRefusalOf as a, rethrowDecodeRefusal as o } from "../internal/asn1/decode-refusal.js";
3
- import { canonicalizeOid as s } from "../internal/asn1/asn1.js";
4
- import { OIDS as c } from "../internal/asn1/oids2.js";
5
- import { verifySignedDataDetailed as l } from "../internal/crypto/sig-verify.js";
6
- import { asciiLowercase as u, domainToAscii as d } from "../internal/shared/idna.js";
7
- import { parseIpAddressToBytes as f } from "../internal/shared/ip.js";
8
- import { presentedSmtpUtf8MailboxDomain as p } from "../internal/shared/mailbox.js";
9
- import { normalizeLabelSeparators as m, parsePresentedSrvName as h, parseSrvNameRestriction as g, parseUriNameConstraint as _ } from "../internal/x509/general-name-profile.js";
10
- import { compareDistinguishedNames as v } from "../internal/shared/dn.js";
11
- import { parseCertificateDerOrThrow as y, parseCertificateSigningRequestDerOrThrow as b, parseCertificateSigningRequestPemOrThrow as x } from "../x509/parse.js";
12
- import { assertCrlMaxAge as S } from "../revocation/crl.js";
13
- import { createNameConstraintValidationState as C, evaluateNameConstraints as w } from "../internal/verify/name-constraints-engine.js";
14
- import { createPolicyValidationState as T, evaluatePolicyChain as E } from "../internal/verify/policy-engine.js";
15
- import { createSpkiDistrustCheck as D } from "../internal/verify/spki-distrust.js";
16
- import { assertPathBuildingChecks as O, authorityKeyIdentifierMismatch as k, buildChainInternal as A, countCaCertificatesBelowParsed as j, isSelfIssued as M, isWithinValidity as N, loadCertificates as P, loadSingleCertificate as F, verifyCertificateSignature as I } from "../internal/verify/verify-path.js";
17
- import { matchServiceIdentity as L } from "./identity.js";
18
- import { checkChainRevocation as R } from "../revocation/chain.js";
1
+ import { canonicalizeOid as e } from "../internal/asn1/asn1.js";
2
+ import { decodeRefusalOf as t, rethrowDecodeRefusal as n } from "../internal/asn1/decode-refusal.js";
3
+ import { OIDS as r } from "../internal/asn1/oids.js";
4
+ import { verifySignedDataDetailed as i } from "../internal/crypto/sig-verify.js";
5
+ import { compareDistinguishedNames as a } from "../internal/shared/dn.js";
6
+ import { asciiLowercase as o, domainToAscii as s } from "../internal/shared/idna.js";
7
+ import { parseIpAddressToBytes as c } from "../internal/shared/ip.js";
8
+ import { presentedSmtpUtf8MailboxDomain as l } from "../internal/shared/mailbox.js";
9
+ import { createNameConstraintValidationState as u, evaluateNameConstraints as d } from "../internal/verify/name-constraints-engine.js";
10
+ import { createPolicyValidationState as f, evaluatePolicyChain as p } from "../internal/verify/policy-engine.js";
11
+ import { createSpkiDistrustCheck as m } from "../internal/verify/spki-distrust.js";
12
+ import { assertPathBuildingChecks as h, authorityKeyIdentifierMismatch as g, buildChainInternal as _, countCaCertificatesBelowParsed as v, isSelfIssued as y, isWithinValidity as b, loadCertificates as x, loadSingleCertificate as S, verifyCertificateSignature as C } from "../internal/verify/verify-path.js";
13
+ import { normalizeLabelSeparators as w, parsePresentedSrvName as T, parseSrvNameRestriction as E, parseUriNameConstraint as D } from "../internal/x509/general-name-profile.js";
14
+ import { DECODE_REFUSAL_CODES as O, errorResult as k, indexedErrorResult as A, indexedMicro509Error as j, micro509Error as M } from "../result/result.js";
15
+ import { checkChainRevocation as N } from "../revocation/chain.js";
16
+ import { assertCrlMaxAge as P } from "../revocation/crl.js";
17
+ import { matchServiceIdentity as F } from "./identity.js";
18
+ import { parseCertificateDerOrThrow as I, parseCertificateSigningRequestDerOrThrow as L, parseCertificateSigningRequestPemOrThrow as R } from "../x509/parse.js";
19
19
  // src/verify/verify.ts
20
20
  /**
21
21
  * Public certificate and CSR verification APIs.
@@ -68,26 +68,26 @@ import { checkChainRevocation as R } from "../revocation/chain.js";
68
68
  * - `limit_exceeded` — a certificate source exceeds a micro509 decoding limit (see `ParseCertificateErrorCode`).
69
69
  */
70
70
  const z = /* @__PURE__ */ "no_trusted_root.issuer_not_found.signature_invalid.certificate_expired.ca_required.key_cert_sign_required.path_length_exceeded.path_building_limit_exceeded.authority_key_identifier_mismatch.extended_key_usage_invalid.subject_alt_name_mismatch.common_name_fallback_suppressed.self_signed_leaf_not_allowed.unrecognized_critical_extension.no_rev_avail_conflict.display_text_oversized.intermediate_eku_constraint.explicit_policy_required.initial_policy_set_not_satisfied.unsupported_initial_name_constraints.unsupported_name_constraints.name_constraints_violated.unsupported_signature_algorithm_parameters.ec_domain_parameters_missing.public_key_distrusted.certificate_revoked.revocation_indeterminate.unsupported.limit_exceeded".split("."), B = /* @__PURE__ */ new Set([
71
- c.basicConstraints,
72
- c.keyUsage,
73
- c.extendedKeyUsage,
74
- c.subjectAltName,
75
- c.issuerAltName,
76
- c.nameConstraints,
77
- c.authorityKeyIdentifier,
78
- c.subjectKeyIdentifier,
79
- c.authorityInfoAccess,
80
- c.cRLDistributionPoints,
81
- c.certificatePolicies,
82
- c.policyMappings,
83
- c.policyConstraints,
84
- c.inhibitAnyPolicy,
85
- c.noRevAvail
71
+ r.basicConstraints,
72
+ r.keyUsage,
73
+ r.extendedKeyUsage,
74
+ r.subjectAltName,
75
+ r.issuerAltName,
76
+ r.nameConstraints,
77
+ r.authorityKeyIdentifier,
78
+ r.subjectKeyIdentifier,
79
+ r.authorityInfoAccess,
80
+ r.cRLDistributionPoints,
81
+ r.certificatePolicies,
82
+ r.policyMappings,
83
+ r.policyConstraints,
84
+ r.inhibitAnyPolicy,
85
+ r.noRevAvail
86
86
  ]);
87
87
  function loadCertificatePool(e, t) {
88
88
  let n = [];
89
89
  for (let [r, i] of e.entries()) try {
90
- n.push(...P([i]));
90
+ n.push(...x([i]));
91
91
  } catch (e) {
92
92
  return certificateSourceFailure(e, {
93
93
  kind: t,
@@ -99,10 +99,10 @@ function loadCertificatePool(e, t) {
99
99
  certificates: n
100
100
  };
101
101
  }
102
- function certificateSourceFailure(t, n) {
103
- let r = a(t, e);
102
+ function certificateSourceFailure(e, n) {
103
+ let r = t(e, O);
104
104
  return r === void 0 ? failure("issuer_not_found", "certificate source is malformed or leaf source does not contain exactly one certificate", 0, detail({
105
- actual: t instanceof Error ? t.message : "certificate source is malformed",
105
+ actual: e instanceof Error ? e.message : "certificate source is malformed",
106
106
  source: n
107
107
  })) : failure(r.code, r.message, 0, detail({
108
108
  actual: r.message,
@@ -116,10 +116,10 @@ function certificateSourceFailure(t, n) {
116
116
  * for that, or {@linkcode verifyCertificateChain} for the all-in-one API.
117
117
  */
118
118
  async function buildCandidatePathRaw(e) {
119
- O(e.maxPathBuildingChecks);
120
- let t = D(e.distrustedSpkiSha256), n;
119
+ h(e.maxPathBuildingChecks);
120
+ let t = m(e.distrustedSpkiSha256), n;
121
121
  try {
122
- n = F(e.leaf);
122
+ n = S(e.leaf);
123
123
  } catch (e) {
124
124
  return certificateSourceFailure(e, void 0);
125
125
  }
@@ -127,7 +127,7 @@ async function buildCandidatePathRaw(e) {
127
127
  if (!r.ok) return r;
128
128
  let i = loadCertificatePool(e.roots, "roots");
129
129
  if (!i.ok) return i;
130
- let a = e.trustAnchors ?? [], o = e.at ?? /* @__PURE__ */ new Date(), s = await A(n, r.certificates, i.certificates, a, o, {
130
+ let a = e.trustAnchors ?? [], o = e.at ?? /* @__PURE__ */ new Date(), s = await _(n, r.certificates, i.certificates, a, o, {
131
131
  failure,
132
132
  detail
133
133
  }, void 0, e.maxPathBuildingChecks, t), c = s.chain;
@@ -179,7 +179,7 @@ async function buildCandidatePath(e) {
179
179
  * assumed trusted and not re-verified.
180
180
  */
181
181
  async function validateCandidatePathRaw(e) {
182
- let t = D(e.distrustedSpkiSha256);
182
+ let t = m(e.distrustedSpkiSha256);
183
183
  if (e.distrustedSpkiSha256?.length && e.anchorCertificateInChain === !1 && e.trustAnchor === void 0) throw RangeError("trustAnchor is required to check distrust on a path with a bare anchor");
184
184
  let n = e.chain, r = await validatePathDistrust(e, t);
185
185
  if (r !== void 0) return r;
@@ -202,7 +202,7 @@ async function validatePathDistrust(e, t) {
202
202
  for (let [n, r] of e.chain.entries()) {
203
203
  let e;
204
204
  try {
205
- e = y(r.der);
205
+ e = I(r.der);
206
206
  } catch (e) {
207
207
  return {
208
208
  ...certificateSourceFailure(e, void 0),
@@ -223,8 +223,8 @@ async function validatePathDistrust(e, t) {
223
223
  }
224
224
  /** RFC 5280 §3.2 makes a self-issued certificate self-signed only when the public key it binds verifies its signature. */
225
225
  async function validateSelfSignedLeafAllowed(e, t, n) {
226
- if (t !== 1 || !M(e) || n.allowSelfSignedLeaf === !0) return;
227
- let r = await I(e, e);
226
+ if (t !== 1 || !y(e) || n.allowSelfSignedLeaf === !0) return;
227
+ let r = await C(e, e);
228
228
  if (r.ok && r.valid) return failure("self_signed_leaf_not_allowed", "self-signed leaf not allowed", 0, detail({ subjectCommonName: e.subject.values.commonName }));
229
229
  }
230
230
  /** Validates every certificate and issuer relationship in a candidate path. */
@@ -272,7 +272,7 @@ function validatePathLengthConstraints(e) {
272
272
  for (let t = 1; t < e.length; t += 1) {
273
273
  let n = e[t];
274
274
  if (n === void 0) return failure("issuer_not_found", "chain element missing", t);
275
- let r = j(e, t), i = n.basicConstraints?.pathLength;
275
+ let r = v(e, t), i = n.basicConstraints?.pathLength;
276
276
  if (isNonNegativeInteger(i) && r > i) return pathLengthExceededFailure(n, t, i, r);
277
277
  }
278
278
  }
@@ -284,19 +284,19 @@ function pathLengthExceededFailure(e, t, n, r) {
284
284
  }));
285
285
  }
286
286
  function validatePolicyAndNameConstraints(e, t, n) {
287
- let r = E(e, t.policy, n);
287
+ let r = p(e, t.policy, n);
288
288
  if (!r.ok) return failure(r.error.code, r.error.message, 0, detail({
289
289
  expected: r.error.details?.expected,
290
290
  actual: r.error.details?.actual
291
291
  }));
292
- let i = w(e, t.nameConstraints);
292
+ let i = d(e, t.nameConstraints);
293
293
  return i.ok ? {
294
294
  ok: !0,
295
295
  policyValidation: r.value
296
296
  } : i;
297
297
  }
298
298
  function validateCertificateAtPathIndex(e, t, n) {
299
- if (!N(e, n)) return failure("certificate_expired", "certificate not valid at requested time", t, detail({
299
+ if (!b(e, n)) return failure("certificate_expired", "certificate not valid at requested time", t, detail({
300
300
  subjectCommonName: e.subject.values.commonName,
301
301
  expected: describeDateTime(n),
302
302
  actual: `${describeDateTime(e.notBefore)}..${describeDateTime(e.notAfter)}`
@@ -320,7 +320,7 @@ function findNoRevAvailConflict(e) {
320
320
  if (e.noRevAvail === !0) {
321
321
  if (e.basicConstraints?.ca === !0) return "basicConstraints cA TRUE";
322
322
  if (e.crlDistributionPoints !== void 0) return "cRLDistributionPoints";
323
- if (e.extensions.some((e) => e.oid === c.freshestCRL)) return "freshestCRL";
323
+ if (e.extensions.some((e) => e.oid === r.freshestCRL)) return "freshestCRL";
324
324
  if (e.authorityInfoAccess?.some((e) => e.method === "ocsp") === !0) return "an id-ad-ocsp authorityInfoAccess entry";
325
325
  }
326
326
  }
@@ -330,18 +330,18 @@ function findNoRevAvailConflict(e) {
330
330
  * parameters are not present.
331
331
  */
332
332
  function validateEcDomainParametersAtPathIndex(e, t) {
333
- if (e.publicKeyAlgorithmOid === c.ecPublicKey && e.publicKeyParametersOid === void 0) return failure("ec_domain_parameters_missing", "elliptic curve public key carries no namedCurve domain parameters", t, detail({
333
+ if (e.publicKeyAlgorithmOid === r.ecPublicKey && e.publicKeyParametersOid === void 0) return failure("ec_domain_parameters_missing", "elliptic curve public key carries no namedCurve domain parameters", t, detail({
334
334
  subjectCommonName: e.subject.values.commonName,
335
335
  expected: "namedCurve OBJECT IDENTIFIER",
336
336
  actual: e.publicKeyAlgorithmParametersDer === void 0 ? "absent" : `tag 0x${(e.publicKeyAlgorithmParametersDer[0] ?? 0).toString(16).padStart(2, "0")}`
337
337
  }));
338
338
  }
339
339
  async function validateIssuerAtPathIndex(e, t, n) {
340
- if (!v(e.issuer, t.subject)) return failure("issuer_not_found", "issuer distinguished name does not match the candidate issuer subject", n, detail({
340
+ if (!a(e.issuer, t.subject)) return failure("issuer_not_found", "issuer distinguished name does not match the candidate issuer subject", n, detail({
341
341
  subjectCommonName: e.subject.values.commonName,
342
342
  issuerCommonName: t.subject.values.commonName
343
343
  }));
344
- let r = await I(e, t);
344
+ let r = await C(e, t);
345
345
  return r.ok ? r.valid ? validateIssuerConstraintsAtPathIndex(e, t, n) : failure("signature_invalid", "certificate signature does not verify", n, detail({
346
346
  subjectCommonName: e.subject.values.commonName,
347
347
  issuerCommonName: t.subject.values.commonName
@@ -354,7 +354,7 @@ async function validateIssuerAtPathIndex(e, t, n) {
354
354
  function validateIssuerConstraintsAtPathIndex(e, t, n) {
355
355
  if (t.basicConstraints?.ca !== !0) return failure("ca_required", "issuer must be a CA certificate", n + 1, detail({ subjectCommonName: t.subject.values.commonName }));
356
356
  if (t.keyUsage !== void 0 && !t.keyUsage.flags.includes("keyCertSign")) return failure("key_cert_sign_required", "issuer missing keyCertSign", n + 1, detail({ subjectCommonName: t.subject.values.commonName }));
357
- if (k(e, t)) return failure("authority_key_identifier_mismatch", "authorityKeyIdentifier does not match issuer subjectKeyIdentifier", n, detail({
357
+ if (g(e, t)) return failure("authority_key_identifier_mismatch", "authorityKeyIdentifier does not match issuer subjectKeyIdentifier", n, detail({
358
358
  subjectCommonName: e.subject.values.commonName,
359
359
  issuerCommonName: t.subject.values.commonName,
360
360
  expected: t.subjectKeyIdentifier,
@@ -365,14 +365,14 @@ function validateIssuerConstraintsAtPathIndex(e, t, n) {
365
365
  * Validates a pre-built certificate chain for time, constraints, policy, and
366
366
  * optionally leaf purpose. Wrap the result of {@linkcode buildCandidatePath}.
367
367
  */
368
- async function validateCandidatePath(t) {
369
- let n = normalizeValidationChain(t.chain);
368
+ async function validateCandidatePath(e) {
369
+ let n = normalizeValidationChain(e.chain);
370
370
  if (!n.ok) {
371
- let { error: t, index: r } = n, i = a(t, e);
372
- return verifyFailureResult(i === void 0 ? failure("signature_invalid", "certificate input is malformed", r, detail({ actual: t instanceof Error ? t.message : "certificate input is malformed" })) : failure(i.code, i.message, r, detail({ actual: i.message })));
371
+ let { error: e, index: r } = n, i = t(e, O);
372
+ return verifyFailureResult(i === void 0 ? failure("signature_invalid", "certificate input is malformed", r, detail({ actual: e instanceof Error ? e.message : "certificate input is malformed" })) : failure(i.code, i.message, r, detail({ actual: i.message })));
373
373
  }
374
374
  let r = await validateCandidatePathRaw({
375
- ...t,
375
+ ...e,
376
376
  chain: n.chain
377
377
  });
378
378
  return r.ok ? validateCandidatePathSuccessResult(r.policyValidation) : verifyFailureResult(r);
@@ -402,7 +402,7 @@ async function validateCandidatePath(t) {
402
402
  */
403
403
  async function verifyCertificateChain(e) {
404
404
  let t = e.distrustedSpkiSha256 === void 0 ? void 0 : [...e.distrustedSpkiSha256];
405
- S(e.revocation?.policy?.crlMaxAgeMs);
405
+ P(e.revocation?.policy?.crlMaxAgeMs);
406
406
  let n = await buildCandidatePath({
407
407
  leaf: e.leaf,
408
408
  roots: e.roots,
@@ -444,7 +444,7 @@ async function verifyCertificateChain(e) {
444
444
  /** Applies optional revocation evidence to an otherwise verified certificate chain. */
445
445
  async function validateVerifiedChainRevocation(e, t) {
446
446
  if (e.revocation === void 0) return;
447
- let n = await R({
447
+ let n = await N({
448
448
  chain: t,
449
449
  ...e.revocation.crls === void 0 ? {} : { crls: e.revocation.crls },
450
450
  ...e.revocation.ocspResponses === void 0 ? {} : { ocspResponses: e.revocation.ocspResponses },
@@ -485,22 +485,22 @@ function revocationFailureIndex(e, t) {
485
485
  * }
486
486
  * ```
487
487
  */
488
- async function verifyCertificateSigningRequest(t) {
488
+ async function verifyCertificateSigningRequest(e) {
489
489
  let n;
490
490
  try {
491
- n = typeof t == "string" ? x(t) : b(new Uint8Array(t));
492
- } catch (t) {
493
- let n = a(t, e);
494
- return n === void 0 ? verifyRequestFailureResult("signature_invalid", "certificate request input is malformed", detail({ actual: t instanceof Error ? t.message : "certificate request input is malformed" })) : verifyRequestFailureResult(n.code, n.message, detail({ actual: n.message }));
491
+ n = typeof e == "string" ? R(e) : L(new Uint8Array(e));
492
+ } catch (e) {
493
+ let n = t(e, O);
494
+ return n === void 0 ? verifyRequestFailureResult("signature_invalid", "certificate request input is malformed", detail({ actual: e instanceof Error ? e.message : "certificate request input is malformed" })) : verifyRequestFailureResult(n.code, n.message, detail({ actual: n.message }));
495
495
  }
496
496
  let r;
497
497
  try {
498
- r = await l(n.signatureAlgorithmOid, n.signatureAlgorithmParametersDer, n.publicKeyAlgorithmOid, n.publicKeyParametersOid, n.subjectPublicKeyInfoDer, n.signatureValue, n.certificationRequestInfoDer);
499
- } catch (t) {
500
- let r = a(t, e);
498
+ r = await i(n.signatureAlgorithmOid, n.signatureAlgorithmParametersDer, n.publicKeyAlgorithmOid, n.publicKeyParametersOid, n.subjectPublicKeyInfoDer, n.signatureValue, n.certificationRequestInfoDer);
499
+ } catch (e) {
500
+ let r = t(e, O);
501
501
  return r === void 0 ? verifyRequestFailureResult("signature_invalid", "certificate request input is malformed", detail({
502
502
  subjectCommonName: n.subject.values.commonName,
503
- actual: t instanceof Error ? t.message : "certificate request input is malformed"
503
+ actual: e instanceof Error ? e.message : "certificate request input is malformed"
504
504
  })) : verifyRequestFailureResult(r.code, r.message, detail({
505
505
  subjectCommonName: n.subject.values.commonName,
506
506
  actual: r.message
@@ -529,15 +529,15 @@ async function verifyCertificateSigningRequest(t) {
529
529
  * }
530
530
  * ```
531
531
  */
532
- function checkExtendedKeyUsage(t, n) {
533
- let r = normalizeValidationChain(t);
532
+ function checkExtendedKeyUsage(e, n) {
533
+ let r = normalizeValidationChain(e);
534
534
  if (!r.ok) {
535
- let t = a(r.error, e);
536
- return t === void 0 ? ekuCheckFailureResult("leaf_eku_missing", "certificate input is malformed", r.index) : ekuCheckFailureResult(t.code, t.message, r.index);
535
+ let e = t(r.error, O);
536
+ return e === void 0 ? ekuCheckFailureResult("leaf_eku_missing", "certificate input is malformed", r.index) : ekuCheckFailureResult(e.code, e.message, r.index);
537
537
  }
538
- let i = r.chain, o = i[0];
539
- if (o === void 0) return ekuCheckFailureResult("leaf_eku_missing", "chain is empty", 0);
540
- if (o.extendedKeyUsage !== void 0 && !o.extendedKeyUsage.includes(n)) return ekuCheckFailureResult("leaf_eku_missing", `leaf certificate does not include EKU ${n}`, 0);
538
+ let i = r.chain, a = i[0];
539
+ if (a === void 0) return ekuCheckFailureResult("leaf_eku_missing", "chain is empty", 0);
540
+ if (a.extendedKeyUsage !== void 0 && !a.extendedKeyUsage.includes(n)) return ekuCheckFailureResult("leaf_eku_missing", `leaf certificate does not include EKU ${n}`, 0);
541
541
  for (let e = 1; e < i.length; e += 1) {
542
542
  let t = i[e];
543
543
  if (t !== void 0 && t.extendedKeyUsage !== void 0 && !t.extendedKeyUsage.includes(n)) return ekuCheckFailureResult("intermediate_eku_constraint", `intermediate CA at index ${String(e)} constrains EKU and does not include ${n}`, e);
@@ -548,19 +548,19 @@ function checkExtendedKeyUsage(t, n) {
548
548
  };
549
549
  }
550
550
  /** Extracts a {@linkcode TrustAnchor} from a parsed certificate, copying the subject, SPKI, and key identifiers. */
551
- function trustAnchorFromCertificate(t) {
552
- let n;
551
+ function trustAnchorFromCertificate(e) {
552
+ let t;
553
553
  try {
554
- n = reparseCertificateForTrust(t);
555
- } catch (t) {
556
- throw o(t, e), Error("certificate input is malformed");
554
+ t = reparseCertificateForTrust(e);
555
+ } catch (e) {
556
+ throw n(e, O), Error("certificate input is malformed");
557
557
  }
558
558
  return {
559
- subject: n.subject,
560
- subjectPublicKeyInfoDer: n.subjectPublicKeyInfoDer,
561
- publicKeyAlgorithmOid: n.publicKeyAlgorithmOid,
562
- ...n.publicKeyParametersOid === void 0 ? {} : { publicKeyParametersOid: n.publicKeyParametersOid },
563
- ...n.subjectKeyIdentifier === void 0 ? {} : { subjectKeyIdentifier: n.subjectKeyIdentifier }
559
+ subject: t.subject,
560
+ subjectPublicKeyInfoDer: t.subjectPublicKeyInfoDer,
561
+ publicKeyAlgorithmOid: t.publicKeyAlgorithmOid,
562
+ ...t.publicKeyParametersOid === void 0 ? {} : { publicKeyParametersOid: t.publicKeyParametersOid },
563
+ ...t.subjectKeyIdentifier === void 0 ? {} : { subjectKeyIdentifier: t.subjectKeyIdentifier }
564
564
  };
565
565
  }
566
566
  /** Extracts defined optional fields from a base input for safe forwarding. */
@@ -679,7 +679,7 @@ function validateLeaf(e, t, n) {
679
679
  function validateServiceIdentity(e, t) {
680
680
  let n = validateServiceIdentityInput(t);
681
681
  if (!n.ok) return n;
682
- let r = L({
682
+ let r = F({
683
683
  certificate: reparseCertificateForTrust(e),
684
684
  serviceIdentity: t
685
685
  });
@@ -707,7 +707,7 @@ function validateServiceIdentityInput(e) {
707
707
  if (e.type !== "dns" && e.type !== "ip" && e.type !== "uri" && e.type !== "srv") return failure("subject_alt_name_mismatch", "service identity input is malformed", 0, detail({ actual: String(e.type) }));
708
708
  if (typeof e.value != "string") return failure("subject_alt_name_mismatch", "service identity input is malformed", 0, detail({ actual: e.type }));
709
709
  if (e.type === "ip") try {
710
- f(e.value);
710
+ c(e.value);
711
711
  } catch {
712
712
  return failure("subject_alt_name_mismatch", "service identity input is malformed", 0, detail({
713
713
  expected: e.value,
@@ -728,7 +728,7 @@ async function verifyChainForExtendedKeyUsageProfile(e, t) {
728
728
  }
729
729
  /** Returns the OID of the first critical extension not in {@linkcode PROCESSED_EXTENSION_OIDS}, or `undefined`. */
730
730
  function findUnprocessedCriticalExtension(e) {
731
- for (let t of e.extensions) if (t.critical && (!B.has(t.oid) || t.oid === c.subjectAltName && e.subjectAltNames?.some(isUninterpretedGeneralName) === !0)) return t.oid;
731
+ for (let t of e.extensions) if (t.critical && (!B.has(t.oid) || t.oid === r.subjectAltName && e.subjectAltNames?.some(isUninterpretedGeneralName) === !0)) return t.oid;
732
732
  }
733
733
  const V = /* @__PURE__ */ new Set([
734
734
  "otherName",
@@ -740,21 +740,21 @@ const V = /* @__PURE__ */ new Set([
740
740
  ]);
741
741
  function isUninterpretedGeneralName(e) {
742
742
  switch (e.type) {
743
- case "srv": return h(u(e.value)) === void 0;
744
- case "smtpUtf8Mailbox": return p(e.value) === void 0;
743
+ case "srv": return T(o(e.value)) === void 0;
744
+ case "smtpUtf8Mailbox": return l(e.value) === void 0;
745
745
  default: return V.has(e.type);
746
746
  }
747
747
  }
748
748
  /** Constructs a {@linkcode VerifyChainFailure} with the given code, message, optional chain index, and details. */
749
- function failure(e, t, n, i) {
749
+ function failure(e, t, n, r) {
750
750
  return {
751
751
  ok: !1,
752
- ...r(e, t, n, i)
752
+ ...j(e, t, n, r)
753
753
  };
754
754
  }
755
755
  /** Wraps a {@linkcode VerifyChainFailure} into the standard indexed error result shape. */
756
756
  function verifyFailureResult(e) {
757
- return n(e);
757
+ return A(e);
758
758
  }
759
759
  /** Wraps a policy outcome into the validate-candidate-path success result shape. */
760
760
  function validateCandidatePathSuccessResult(e) {
@@ -784,28 +784,28 @@ function normalizeValidationChain(e) {
784
784
  };
785
785
  }
786
786
  function reparseCertificateForTrust(e) {
787
- return y(new Uint8Array(e.der));
787
+ return I(new Uint8Array(e.der));
788
788
  }
789
789
  /** Returns `true` if the value is a non-negative integer (including zero). */
790
790
  function isNonNegativeInteger(e) {
791
791
  return e !== void 0 && Number.isInteger(e) && e >= 0;
792
792
  }
793
793
  /** Constructs a CSR verification failure result. */
794
- function verifyRequestFailureResult(e, n, r) {
795
- let a = {
794
+ function verifyRequestFailureResult(e, t, n) {
795
+ let r = {
796
796
  ok: !1,
797
- ...i(e, n, r)
797
+ ...M(e, t, n)
798
798
  };
799
- return t(a);
799
+ return k(r);
800
800
  }
801
801
  /** Constructs an EKU check failure result at the given chain index. */
802
- function ekuCheckFailureResult(e, t, i) {
803
- let a = {
802
+ function ekuCheckFailureResult(e, t, n) {
803
+ let r = {
804
804
  ok: !1,
805
- ...r(e, t, i),
806
- index: i
805
+ ...j(e, t, n),
806
+ index: n
807
807
  };
808
- return n(a);
808
+ return A(r);
809
809
  }
810
810
  /** Merges flat and nested policy fields, with nested taking precedence. */
811
811
  function resolvePolicyValidationInput(e) {
@@ -875,29 +875,29 @@ function detail(e) {
875
875
  }
876
876
  /** Initializes policy and name-constraint validation state for a chain walk. */
877
877
  function buildValidationState(e, t) {
878
- let n = T(resolvePolicyValidationInput(e), t), r = validateInitialNameConstraintsInput(resolveInitialNameConstraintsInput(e));
878
+ let n = f(resolvePolicyValidationInput(e), t), r = validateInitialNameConstraintsInput(resolveInitialNameConstraintsInput(e));
879
879
  return r.ok ? {
880
880
  ok: !0,
881
881
  value: {
882
882
  policy: n,
883
- nameConstraints: C(r.value)
883
+ nameConstraints: u(r.value)
884
884
  }
885
885
  } : r;
886
886
  }
887
- function normalizeInitialPolicySet(e) {
888
- if (e === void 0) return;
889
- if (e === "any") return e;
890
- if (!Array.isArray(e)) return [];
891
- let t = [];
892
- for (let n of e) {
893
- if (typeof n != "string") return [];
887
+ function normalizeInitialPolicySet(t) {
888
+ if (t === void 0) return;
889
+ if (t === "any") return t;
890
+ if (!Array.isArray(t)) return [];
891
+ let n = [];
892
+ for (let r of t) {
893
+ if (typeof r != "string") return [];
894
894
  try {
895
- t.push(s(n));
895
+ n.push(e(r));
896
896
  } catch {
897
897
  return [];
898
898
  }
899
899
  }
900
- return t.includes(c.anyPolicy) ? "any" : t;
900
+ return n.includes(r.anyPolicy) ? "any" : n;
901
901
  }
902
902
  function validateInitialNameConstraintsInput(e) {
903
903
  let t = validateInitialNameConstraintSubtrees(e.permittedSubtrees, "permittedSubtrees");
@@ -934,12 +934,12 @@ function validateInitialNameConstraintSubtrees(e, t) {
934
934
  function toAsciiInitialNameConstraint(e) {
935
935
  let { base: t } = e;
936
936
  if (t.type !== "dns" && t.type !== "email" && t.type !== "srv") return e;
937
- let n = t.type === "srv" ? m(t.value) : t.value, r = unconvertedConstraintPrefix(t.type, n), i = n.slice(r.length);
937
+ let n = t.type === "srv" ? w(t.value) : t.value, r = unconvertedConstraintPrefix(t.type, n), i = n.slice(r.length);
938
938
  if (t.type !== "srv" && i.endsWith(".")) return;
939
- let a = t.type === "srv" && i.length === 0 ? void 0 : d(i, "lookup");
939
+ let a = t.type === "srv" && i.length === 0 ? void 0 : s(i, "lookup");
940
940
  if (a !== void 0 && !a.ok) return;
941
941
  let o = `${r}${a?.value ?? ""}`;
942
- if (!(!/^[\x20-\x7e]*$/.test(o) || t.type === "srv" && g(o) === void 0)) return {
942
+ if (!(!/^[\x20-\x7e]*$/.test(o) || t.type === "srv" && E(o) === void 0)) return {
943
943
  ...e,
944
944
  base: {
945
945
  ...t,
@@ -960,7 +960,7 @@ function describeInvalidInitialNameConstraintForm(e) {
960
960
  if (!isRecord(t) || typeof t.type != "string") return "invalid subtree";
961
961
  switch (t.type) {
962
962
  case "dns": return typeof t.value == "string" ? void 0 : t.type;
963
- case "uri": return typeof t.value == "string" && _(t.value) !== void 0 ? void 0 : t.type;
963
+ case "uri": return typeof t.value == "string" && D(t.value) !== void 0 ? void 0 : t.type;
964
964
  case "email": return typeof t.value == "string" && !t.value.includes("@") ? void 0 : t.type;
965
965
  case "srv": return typeof t.value == "string" && t.value.length > 0 ? void 0 : t.type;
966
966
  case "directoryName": return typeof t.derHex == "string" ? void 0 : t.type;
@@ -978,6 +978,6 @@ function invalidInitialNameConstraintsFailure(e) {
978
978
  function isRecord(e) {
979
979
  return typeof e == "object" && !!e;
980
980
  }
981
- export { z as VERIFY_ERROR_CODES, buildCandidatePath, checkExtendedKeyUsage, M as isSelfIssuedCertificate, trustAnchorFromCertificate, validateCandidatePath, validateForCa, validateForCodeSigning, validateForTlsClient, validateForTlsServer, verifyCertificateChain, verifyCertificateSigningRequest };
981
+ export { z as VERIFY_ERROR_CODES, buildCandidatePath, checkExtendedKeyUsage, y as isSelfIssuedCertificate, trustAnchorFromCertificate, validateCandidatePath, validateForCa, validateForCodeSigning, validateForTlsClient, validateForTlsServer, verifyCertificateChain, verifyCertificateSigningRequest };
982
982
 
983
983
  //# sourceMappingURL=verify.js.map
package/dist/verify.d.ts CHANGED
@@ -1,3 +1,12 @@
1
+ /**
2
+ * Validate certificate chains, application purposes, and service identities.
3
+ *
4
+ * Start with {@linkcode verifyCertificateChain} and supply your trusted roots.
5
+ * Use {@linkcode matchCertificateServiceIdentity} for identity matching alone,
6
+ * or {@linkcode verifyCertificateSigningRequest} to check a CSR signature.
7
+ *
8
+ * @module micro509/verify
9
+ */
1
10
  import { DnsServiceIdentityInput, IpServiceIdentityInput, MatchServiceIdentityErrorCode, MatchServiceIdentityFailure, MatchServiceIdentityFailureDetails, MatchServiceIdentityFailureResult, MatchServiceIdentityInput, MatchServiceIdentityResult, MatchServiceIdentitySuccess, ServiceIdentityInput, ServiceIdentityType, SrvServiceIdentityInput, UriServiceIdentityInput, matchCertificateServiceIdentity, matchServiceIdentity } from "./verify/identity.js";
2
11
  import { InitialNameConstraintsInput } from "./verify/name-constraints.js";
3
12
  import { ConstrainedPolicy, PolicyValidationInput, PolicyValidationOutcome } from "./verify/policy.js";
@@ -1,10 +1,10 @@
1
- import { KeyAlgorithmInput, KeyPairMaterial } from "../keys/keys.js";
2
1
  import { SignatureProfileInput } from "../internal/crypto/signing.js";
2
+ import { KeyAlgorithmInput, KeyPairMaterial } from "../keys/keys.js";
3
3
  import { canonicalDnKey, compareDistinguishedNames, isWithinDirectoryNameSubtree } from "../internal/shared/dn.js";
4
- import { NameAttribute, NameEncoderErrorCode, NameFieldKey, NameInput, NameObject, RelativeDistinguishedNameInput, encodeName, encodeRelativeDistinguishedName } from "./name.js";
4
+ import { AuthorityInfoAccessMethod, AuthorityInformationAccess, AuthorityInformationAccessInput, BasicConstraints, CertificateExtensionsInput, CertificatePolicies, CpsPolicyQualifierInfo, CustomAuthorityInfoAccessMethod, CustomExtendedKeyUsage, CustomExtension, CustomPolicyQualifierInfo, DisplayTextType, DistributionPoint, DistributionPointName, DistributionPointReason, ExtendedKeyUsage, GeneralName, GeneralSubtree, InhibitAnyPolicy, IssuingDistributionPoint, IssuingDistributionPointBase, IssuingDistributionPointForAttributeCerts, IssuingDistributionPointForCaCerts, IssuingDistributionPointForUserCerts, KeyUsage, KnownAuthorityInfoAccessMethod, KnownExtendedKeyUsage, NameConstraintForm, NameConstraints, OversizedDisplayText, ParsedBitFlags, ParsedNameConstraintForm, PolicyConstraints, PolicyInformation, PolicyMapping, PolicyMappings, PolicyNoticeReference, PolicyQualifierInfo, SubjectAltName, UnsupportedNameConstraintForm, UserNoticePolicyQualifierInfo, buildCertificateExtensions, buildRequestedExtensions, buildSubjectKeyIdentifier, encodeAuthorityInfoAccess, encodeBasicConstraints, encodeCertificatePolicies, encodeCrlDistributionPoints, encodeExtendedKeyUsage, encodeExtension, encodeInhibitAnyPolicy, encodeKeyUsage, encodeNameConstraints, encodePolicyConstraints, encodePolicyMappings, encodeSubjectAltName, getAuthorityInfoAccessMethodOid, getExtendedKeyUsageOid, parseAuthorityInfoAccessMethodOid, parseExtendedKeyUsageOid } from "./extensions.js";
5
5
  import { ExtensionEncoderErrorCode } from "../internal/x509/extension-errors.js";
6
6
  import { allOnesMaskForIpAddress, decodeIpAddress, normalizeIpAddress, parseIpAddressToBytes } from "../internal/shared/ip.js";
7
- import { AuthorityInfoAccessMethod, AuthorityInformationAccess, AuthorityInformationAccessInput, BasicConstraints, CertificateExtensionsInput, CertificatePolicies, CpsPolicyQualifierInfo, CustomAuthorityInfoAccessMethod, CustomExtendedKeyUsage, CustomExtension, CustomPolicyQualifierInfo, DisplayTextType, DistributionPoint, DistributionPointName, DistributionPointReason, ExtendedKeyUsage, GeneralName, GeneralSubtree, InhibitAnyPolicy, IssuingDistributionPoint, IssuingDistributionPointBase, IssuingDistributionPointForAttributeCerts, IssuingDistributionPointForCaCerts, IssuingDistributionPointForUserCerts, KeyUsage, KnownAuthorityInfoAccessMethod, KnownExtendedKeyUsage, NameConstraintForm, NameConstraints, OversizedDisplayText, ParsedBitFlags, ParsedNameConstraintForm, PolicyConstraints, PolicyInformation, PolicyMapping, PolicyMappings, PolicyNoticeReference, PolicyQualifierInfo, SubjectAltName, UnsupportedNameConstraintForm, UserNoticePolicyQualifierInfo, buildCertificateExtensions, buildRequestedExtensions, buildSubjectKeyIdentifier, encodeAuthorityInfoAccess, encodeBasicConstraints, encodeCertificatePolicies, encodeCrlDistributionPoints, encodeExtendedKeyUsage, encodeExtension, encodeInhibitAnyPolicy, encodeKeyUsage, encodeNameConstraints, encodePolicyConstraints, encodePolicyMappings, encodeSubjectAltName, getAuthorityInfoAccessMethodOid, getExtendedKeyUsageOid, parseAuthorityInfoAccessMethodOid, parseExtendedKeyUsageOid } from "./extensions.js";
7
+ import { NameAttribute, NameEncoderErrorCode, NameFieldKey, NameInput, NameObject, RelativeDistinguishedNameInput, encodeName, encodeRelativeDistinguishedName } from "./name.js";
8
8
  import { ParsedCertificate } from "./parse.js";
9
9
  /** Machine-readable reason a certificate builder rejected its construction input. */
10
10
  export type CreateCertificateErrorCode = "issuer_certificate_invalid" | "issuer_distinguished_name_empty" | "serial_number_not_positive" | "serial_number_too_long" | "validity_date_invalid" | "validity_not_after_before_not_before";
@@ -208,5 +208,4 @@ export declare function createSelfSignedCertificate(input: CreateSelfSignedCerti
208
208
  * @returns The encoded certificate material.
209
209
  */
210
210
  export declare function createCertificate(input: CreateCertificateInput): Promise<CertificateMaterial>;
211
- export type { AuthorityInfoAccessMethod, AuthorityInformationAccess, AuthorityInformationAccessInput, BasicConstraints, CertificateExtensionsInput, CertificatePolicies, CpsPolicyQualifierInfo, CustomAuthorityInfoAccessMethod, CustomExtendedKeyUsage, CustomExtension, CustomPolicyQualifierInfo, DisplayTextType, DistributionPoint, DistributionPointName, DistributionPointReason, ExtendedKeyUsage, ExtensionEncoderErrorCode, GeneralName, GeneralSubtree, InhibitAnyPolicy, IssuingDistributionPoint, IssuingDistributionPointBase, IssuingDistributionPointForAttributeCerts, IssuingDistributionPointForCaCerts, IssuingDistributionPointForUserCerts, KeyUsage, KnownAuthorityInfoAccessMethod, KnownExtendedKeyUsage, NameConstraintForm, NameConstraints, NameEncoderErrorCode, NameInput, NameObject, OversizedDisplayText, ParsedBitFlags, ParsedNameConstraintForm, PolicyConstraints, PolicyInformation, PolicyMapping, PolicyMappings, PolicyNoticeReference, PolicyQualifierInfo, SignatureProfileInput, SubjectAltName, UnsupportedNameConstraintForm, UserNoticePolicyQualifierInfo, allOnesMaskForIpAddress, buildCertificateExtensions, buildRequestedExtensions, buildSubjectKeyIdentifier, canonicalDnKey, compareDistinguishedNames, decodeIpAddress, encodeAuthorityInfoAccess, encodeBasicConstraints, encodeCertificatePolicies, encodeCrlDistributionPoints, encodeExtendedKeyUsage, encodeExtension, encodeInhibitAnyPolicy, encodeKeyUsage, encodeName, encodeNameConstraints, encodePolicyConstraints, encodePolicyMappings, encodeRelativeDistinguishedName, encodeSubjectAltName, getAuthorityInfoAccessMethodOid, getExtendedKeyUsageOid, isWithinDirectoryNameSubtree, normalizeIpAddress, parseAuthorityInfoAccessMethodOid, parseExtendedKeyUsageOid, parseIpAddressToBytes };
212
- //# sourceMappingURL=certificate.d.ts.map
211
+ export type { AuthorityInfoAccessMethod, AuthorityInformationAccess, AuthorityInformationAccessInput, BasicConstraints, CertificateExtensionsInput, CertificatePolicies, CpsPolicyQualifierInfo, CustomAuthorityInfoAccessMethod, CustomExtendedKeyUsage, CustomExtension, CustomPolicyQualifierInfo, DisplayTextType, DistributionPoint, DistributionPointName, DistributionPointReason, ExtendedKeyUsage, ExtensionEncoderErrorCode, GeneralName, GeneralSubtree, InhibitAnyPolicy, IssuingDistributionPoint, IssuingDistributionPointBase, IssuingDistributionPointForAttributeCerts, IssuingDistributionPointForCaCerts, IssuingDistributionPointForUserCerts, KeyUsage, KnownAuthorityInfoAccessMethod, KnownExtendedKeyUsage, NameConstraintForm, NameConstraints, NameEncoderErrorCode, NameInput, NameObject, OversizedDisplayText, ParsedBitFlags, ParsedNameConstraintForm, PolicyConstraints, PolicyInformation, PolicyMapping, PolicyMappings, PolicyNoticeReference, PolicyQualifierInfo, SignatureProfileInput, SubjectAltName, UnsupportedNameConstraintForm, UserNoticePolicyQualifierInfo, allOnesMaskForIpAddress, buildCertificateExtensions, buildRequestedExtensions, buildSubjectKeyIdentifier, canonicalDnKey, compareDistinguishedNames, decodeIpAddress, encodeAuthorityInfoAccess, encodeBasicConstraints, encodeCertificatePolicies, encodeCrlDistributionPoints, encodeExtendedKeyUsage, encodeExtension, encodeInhibitAnyPolicy, encodeKeyUsage, encodeName, encodeNameConstraints, encodePolicyConstraints, encodePolicyMappings, encodeRelativeDistinguishedName, encodeSubjectAltName, getAuthorityInfoAccessMethodOid, getExtendedKeyUsageOid, isWithinDirectoryNameSubtree, normalizeIpAddress, parseAuthorityInfoAccessMethodOid, parseExtendedKeyUsageOid, parseIpAddressToBytes };