micro509 0.17.1 → 0.19.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 (183) hide show
  1. package/CHANGELOG.md +165 -6
  2. package/dist/crypto/crypto.d.ts +12 -4
  3. package/dist/crypto/crypto.js +30 -17
  4. package/dist/crypto/crypto.js.map +1 -1
  5. package/dist/crypto.d.ts +8 -2
  6. package/dist/der/der.d.ts +14 -4
  7. package/dist/der/der.js +19 -19
  8. package/dist/der/der.js.map +1 -1
  9. package/dist/der.d.ts +26 -2
  10. package/dist/der.js +4 -4
  11. package/dist/index.d.ts +84 -16
  12. package/dist/index.js +19 -19
  13. package/dist/internal/asn1/asn1.d.ts +1 -2
  14. package/dist/internal/asn1/asn1.js +10 -2
  15. package/dist/internal/asn1/asn1.js.map +1 -1
  16. package/dist/internal/asn1/ber.js.map +1 -1
  17. package/dist/internal/asn1/decode-refusal.js.map +1 -1
  18. package/dist/internal/asn1/der.d.ts +1 -2
  19. package/dist/internal/asn1/der.js.map +1 -1
  20. package/dist/internal/asn1/oids.js +71 -353
  21. package/dist/internal/asn1/oids.js.map +1 -1
  22. package/dist/internal/asn1/oids.json.js +357 -0
  23. package/dist/internal/asn1/oids.json.js.map +1 -0
  24. package/dist/internal/crypto/algorithm-names.js +1 -1
  25. package/dist/internal/crypto/algorithm-names.js.map +1 -1
  26. package/dist/internal/crypto/ecdsa.js.map +1 -1
  27. package/dist/internal/crypto/hash.js.map +1 -1
  28. package/dist/internal/crypto/pbes2.d.ts +1 -2
  29. package/dist/internal/crypto/pbes2.js +70 -70
  30. package/dist/internal/crypto/pbes2.js.map +1 -1
  31. package/dist/internal/crypto/prime-ec.js +37 -0
  32. package/dist/internal/crypto/prime-ec.js.map +1 -0
  33. package/dist/internal/crypto/rsa-pss.js +50 -50
  34. package/dist/internal/crypto/rsa-pss.js.map +1 -1
  35. package/dist/internal/crypto/sig-verify.d.ts +41 -2
  36. package/dist/internal/crypto/sig-verify.js +125 -38
  37. package/dist/internal/crypto/sig-verify.js.map +1 -1
  38. package/dist/internal/crypto/signing.d.ts +1 -2
  39. package/dist/internal/crypto/signing.js +26 -26
  40. package/dist/internal/crypto/signing.js.map +1 -1
  41. package/dist/internal/jose/base64url.js.map +1 -1
  42. package/dist/internal/jose/json-data.js +108 -0
  43. package/dist/internal/jose/json-data.js.map +1 -0
  44. package/dist/internal/jose/strict-json.d.ts +1 -2
  45. package/dist/internal/jose/strict-json.js.map +1 -1
  46. package/dist/internal/shared/base64.js.map +1 -1
  47. package/dist/internal/shared/dn.d.ts +1 -2
  48. package/dist/internal/shared/dn.js +1 -1
  49. package/dist/internal/shared/dn.js.map +1 -1
  50. package/dist/internal/shared/idna.js.map +1 -1
  51. package/dist/internal/shared/ip.d.ts +1 -2
  52. package/dist/internal/shared/ip.js.map +1 -1
  53. package/dist/internal/shared/mailbox.js.map +1 -1
  54. package/dist/internal/shared/punycode.js.map +1 -1
  55. package/dist/internal/shared/uri-host.js.map +1 -1
  56. package/dist/internal/verify/name-constraints-engine.js +64 -64
  57. package/dist/internal/verify/name-constraints-engine.js.map +1 -1
  58. package/dist/internal/verify/policy-engine.js +1 -1
  59. package/dist/internal/verify/policy-engine.js.map +1 -1
  60. package/dist/internal/verify/spki-distrust.js.map +1 -1
  61. package/dist/internal/verify/verify-path.d.ts +1 -2
  62. package/dist/internal/verify/verify-path.js +234 -128
  63. package/dist/internal/verify/verify-path.js.map +1 -1
  64. package/dist/internal/x509/directory-name.js +10 -10
  65. package/dist/internal/x509/directory-name.js.map +1 -1
  66. package/dist/internal/x509/extension-bits.js.map +1 -1
  67. package/dist/internal/x509/extension-errors.d.ts +1 -2
  68. package/dist/internal/x509/extension-errors.js.map +1 -1
  69. package/dist/internal/x509/extension-registry.js +18 -18
  70. package/dist/internal/x509/extension-registry.js.map +1 -1
  71. package/dist/internal/x509/general-name-profile.js +9 -9
  72. package/dist/internal/x509/general-name-profile.js.map +1 -1
  73. package/dist/internal/x509/general-name.js +32 -32
  74. package/dist/internal/x509/general-name.js.map +1 -1
  75. package/dist/internal/x509/name-fields.js +1 -1
  76. package/dist/internal/x509/name-fields.js.map +1 -1
  77. package/dist/internal/x509/or-address.js.map +1 -1
  78. package/dist/jose/base64url.d.ts +4 -0
  79. package/dist/jose/base64url.js +14 -0
  80. package/dist/jose/base64url.js.map +1 -0
  81. package/dist/jose/errors.d.ts +9 -3
  82. package/dist/jose/errors.js.map +1 -1
  83. package/dist/jose/jwe.d.ts +64 -0
  84. package/dist/jose/jwe.js +188 -0
  85. package/dist/jose/jwe.js.map +1 -0
  86. package/dist/jose/jwks.d.ts +38 -10
  87. package/dist/jose/jwks.js +156 -96
  88. package/dist/jose/jwks.js.map +1 -1
  89. package/dist/jose/jws.d.ts +8 -6
  90. package/dist/jose/jws.js +216 -170
  91. package/dist/jose/jws.js.map +1 -1
  92. package/dist/jose/jwt.d.ts +8 -2
  93. package/dist/jose/jwt.js +98 -98
  94. package/dist/jose/jwt.js.map +1 -1
  95. package/dist/jose/remote-jwks.d.ts +1 -2
  96. package/dist/jose/remote-jwks.js +106 -108
  97. package/dist/jose/remote-jwks.js.map +1 -1
  98. package/dist/jose.d.ts +15 -4
  99. package/dist/jose.js +7 -5
  100. package/dist/kdf/argon2-arithmetic.js.map +1 -1
  101. package/dist/kdf/argon2-core.js.map +1 -1
  102. package/dist/kdf/argon2-memory.js.map +1 -1
  103. package/dist/kdf/argon2-portable.js.map +1 -1
  104. package/dist/kdf/argon2.d.ts +7 -2
  105. package/dist/kdf/argon2.js.map +1 -1
  106. package/dist/kdf.d.ts +6 -0
  107. package/dist/keys/keys.d.ts +31 -6
  108. package/dist/keys/keys.js +315 -233
  109. package/dist/keys/keys.js.map +1 -1
  110. package/dist/keys.d.ts +11 -2
  111. package/dist/keys.js +2 -2
  112. package/dist/pem/pem.d.ts +1 -2
  113. package/dist/pem/pem.js +40 -25
  114. package/dist/pem/pem.js.map +1 -1
  115. package/dist/pem.d.ts +6 -0
  116. package/dist/pkcs/pfx.d.ts +2 -3
  117. package/dist/pkcs/pfx.js +142 -142
  118. package/dist/pkcs/pfx.js.map +1 -1
  119. package/dist/pkcs/pkcs12-mac.d.ts +1 -2
  120. package/dist/pkcs/pkcs12-mac.js +122 -122
  121. package/dist/pkcs/pkcs12-mac.js.map +1 -1
  122. package/dist/pkcs/pkcs7.d.ts +24 -3
  123. package/dist/pkcs/pkcs7.js +294 -256
  124. package/dist/pkcs/pkcs7.js.map +1 -1
  125. package/dist/pkcs.d.ts +10 -1
  126. package/dist/pkcs.js +4 -4
  127. package/dist/result/result.d.ts +1 -2
  128. package/dist/result/result.js.map +1 -1
  129. package/dist/result.d.ts +6 -0
  130. package/dist/revocation/chain.d.ts +69 -16
  131. package/dist/revocation/chain.js +431 -303
  132. package/dist/revocation/chain.js.map +1 -1
  133. package/dist/revocation/crl.d.ts +67 -14
  134. package/dist/revocation/crl.js +656 -366
  135. package/dist/revocation/crl.js.map +1 -1
  136. package/dist/revocation/ocsp.d.ts +78 -24
  137. package/dist/revocation/ocsp.js +622 -436
  138. package/dist/revocation/ocsp.js.map +1 -1
  139. package/dist/revocation/revocation.d.ts +68 -14
  140. package/dist/revocation/revocation.js +195 -74
  141. package/dist/revocation/revocation.js.map +1 -1
  142. package/dist/revocation.d.ts +14 -5
  143. package/dist/revocation.js +4 -4
  144. package/dist/ssh/ssh.d.ts +2 -3
  145. package/dist/ssh/ssh.js +165 -170
  146. package/dist/ssh/ssh.js.map +1 -1
  147. package/dist/ssh/wire.d.ts +1 -2
  148. package/dist/ssh/wire.js +10 -10
  149. package/dist/ssh/wire.js.map +1 -1
  150. package/dist/ssh.d.ts +8 -0
  151. package/dist/verify/identity.d.ts +3 -4
  152. package/dist/verify/identity.js +33 -33
  153. package/dist/verify/identity.js.map +1 -1
  154. package/dist/verify/name-constraints.d.ts +9 -2
  155. package/dist/verify/policy.d.ts +9 -2
  156. package/dist/verify/verify.d.ts +85 -34
  157. package/dist/verify/verify.js +276 -226
  158. package/dist/verify/verify.js.map +1 -1
  159. package/dist/verify.d.ts +12 -2
  160. package/dist/x509/certificate.d.ts +4 -5
  161. package/dist/x509/certificate.js +40 -40
  162. package/dist/x509/certificate.js.map +1 -1
  163. package/dist/x509/csr.d.ts +3 -4
  164. package/dist/x509/csr.js +15 -15
  165. package/dist/x509/csr.js.map +1 -1
  166. package/dist/x509/extensions.d.ts +1 -2
  167. package/dist/x509/extensions.js +165 -165
  168. package/dist/x509/extensions.js.map +1 -1
  169. package/dist/x509/fingerprint.d.ts +1 -2
  170. package/dist/x509/fingerprint.js.map +1 -1
  171. package/dist/x509/name-text.d.ts +1 -2
  172. package/dist/x509/name-text.js.map +1 -1
  173. package/dist/x509/name.d.ts +1 -2
  174. package/dist/x509/name.js +15 -15
  175. package/dist/x509/name.js.map +1 -1
  176. package/dist/x509/parse.d.ts +9 -6
  177. package/dist/x509/parse.js +394 -394
  178. package/dist/x509/parse.js.map +1 -1
  179. package/dist/x509.d.ts +17 -4
  180. package/dist/x509.js +8 -8
  181. package/package.json +32 -33
  182. package/dist/internal/asn1/oids2.js +0 -75
  183. package/dist/internal/asn1/oids2.js.map +0 -1
package/dist/der.d.ts CHANGED
@@ -1,4 +1,28 @@
1
- import { DEFAULT_MAX_DER_DEPTH, DerElement, ReadRootElementOptions, ReadSequenceChildrenOptions, assertDerMaxDepth, bitString, bmpString, bool, concatBytes, explicitContext, generalizedTime, ia5String, implicitConstructedContext, implicitPrimitiveContext, integer, integerFromNumber, nullValue, objectIdentifier, octetString, printableString, sequence, setOf, time, tlv, universalString, utcTime, utf8String } from "./internal/asn1/der.js";
2
- import { DerBitString, hexToBytes, toHex } from "./internal/asn1/asn1.js";
1
+ /**
2
+ * DER reading and writing primitives.
3
+ *
4
+ * The building blocks every other entrypoint is made of, for the cases the typed APIs do not cover:
5
+ *
6
+ * - decoding a private extension's {@linkcode https://www.rfc-editor.org/info/rfc5280/#section-4.1 | extnValue} inside an {@linkcode https://micro509.kjanat.dev/next/api/x509#type-extensiondecoder | ExtensionDecoder}
7
+ * - encoding the bytes a {@linkcode https://micro509.kjanat.dev/next/api/x509#type-customextension | CustomExtension} carries
8
+ * - inspecting a structure this library does not model
9
+ *
10
+ * Reading accepts definite lengths and minimal length encodings, rejects the high-tag-number form,
11
+ * and applies a nesting-depth guard capped at {@linkcode DEFAULT_MAX_DER_DEPTH}.
12
+ * BER-only constructs fail.
13
+ *
14
+ * Readers and decoders take untrusted bytes, so each one comes as a pair:
15
+ *
16
+ * - {@linkcode https://micro509.kjanat.dev/next/api/der#fn-decodederinteger | decodeDerInteger} returns a {@linkcode https://micro509.kjanat.dev/next/api/der#type-decodederresult | DecodeDerResult}
17
+ * - {@linkcode https://micro509.kjanat.dev/next/api/der#fn-decodederintegerorthrow | decodeDerIntegerOrThrow} throws
18
+ *
19
+ * Writers take typed input and throw, matching {@linkcode https://micro509.kjanat.dev/next/api/x509#fn-encodename | encodeName} and {@linkcode https://micro509.kjanat.dev/next/api/pem#fn-pemencode | pemEncode}.
20
+ *
21
+ * All operations are synchronous.
22
+ *
23
+ * @module micro509/der
24
+ */
3
25
  import { DecodeDerErrorCode, DecodeDerFailure, DecodeDerResult, decodeDerBitString, decodeDerBitStringOrThrow, decodeDerBoolean, decodeDerBooleanOrThrow, decodeDerInteger, decodeDerIntegerOrThrow, decodeDerOctetString, decodeDerOctetStringOrThrow, decodeDerOid, decodeDerOidOrThrow, decodeDerString, decodeDerStringOrThrow, decodeDerTime, decodeDerTimeOrThrow, derChildren, derChildrenOrThrow, readDerElement, readDerElementOrThrow, readDerRoot, readDerRootOrThrow, readDerSequence, readDerSequenceOrThrow } from "./der/der.js";
26
+ import { DerBitString, hexToBytes, toHex } from "./internal/asn1/asn1.js";
27
+ import { DEFAULT_MAX_DER_DEPTH, DerElement, ReadRootElementOptions, ReadSequenceChildrenOptions, assertDerMaxDepth, bitString, bmpString, bool, concatBytes, explicitContext, generalizedTime, ia5String, implicitConstructedContext, implicitPrimitiveContext, integer, integerFromNumber, nullValue, objectIdentifier, octetString, printableString, sequence, setOf, time, tlv, universalString, utcTime, utf8String } from "./internal/asn1/der.js";
4
28
  export { DEFAULT_MAX_DER_DEPTH, type DecodeDerErrorCode, type DecodeDerFailure, type DecodeDerResult, type DerBitString, type DerElement, type ReadRootElementOptions, type ReadSequenceChildrenOptions, assertDerMaxDepth, concatBytes, decodeDerBitString, decodeDerBitStringOrThrow, decodeDerBoolean, decodeDerBooleanOrThrow, decodeDerInteger, decodeDerIntegerOrThrow, decodeDerOctetString, decodeDerOctetStringOrThrow, decodeDerOid, decodeDerOidOrThrow, decodeDerString, decodeDerStringOrThrow, decodeDerTime, decodeDerTimeOrThrow, bitString as derBitString, bmpString as derBmpString, bool as derBoolean, derChildren, derChildrenOrThrow, explicitContext as derExplicitContext, generalizedTime as derGeneralizedTime, ia5String as derIa5String, implicitConstructedContext as derImplicitConstructedContext, implicitPrimitiveContext as derImplicitPrimitiveContext, integer as derInteger, integerFromNumber as derIntegerFromNumber, nullValue as derNull, octetString as derOctetString, objectIdentifier as derOid, printableString as derPrintableString, sequence as derSequence, setOf as derSet, time as derTime, tlv as derTlv, universalString as derUniversalString, utcTime as derUtcTime, utf8String as derUtf8String, hexToBytes, readDerElement, readDerElementOrThrow, readDerRoot, readDerRootOrThrow, readDerSequence, readDerSequenceOrThrow, toHex };
package/dist/der.js CHANGED
@@ -1,4 +1,4 @@
1
- import { DEFAULT_MAX_DER_DEPTH as e, assertDerMaxDepth as t, bitString as n, bmpString as r, bool as i, concatBytes as a, explicitContext as o, generalizedTime as s, ia5String as c, implicitConstructedContext as l, implicitPrimitiveContext as u, integer as d, integerFromNumber as f, nullValue as p, objectIdentifier as m, octetString as h, printableString as g, sequence as _, setOf as v, time as y, tlv as b, universalString as x, utcTime as S, utf8String as C } from "./internal/asn1/der.js";
2
- import { hexToBytes as w, toHex as T } from "./internal/asn1/asn1.js";
3
- import { decodeDerBitString as E, decodeDerBitStringOrThrow as D, decodeDerBoolean as O, decodeDerBooleanOrThrow as k, decodeDerInteger as A, decodeDerIntegerOrThrow as j, decodeDerOctetString as M, decodeDerOctetStringOrThrow as N, decodeDerOid as P, decodeDerOidOrThrow as F, decodeDerString as I, decodeDerStringOrThrow as L, decodeDerTime as R, decodeDerTimeOrThrow as z, derChildren as B, derChildrenOrThrow as V, readDerElement as H, readDerElementOrThrow as U, readDerRoot as W, readDerRootOrThrow as G, readDerSequence as K, readDerSequenceOrThrow as q } from "./der/der.js";
4
- export { e as DEFAULT_MAX_DER_DEPTH, t as assertDerMaxDepth, a as concatBytes, E as decodeDerBitString, D as decodeDerBitStringOrThrow, O as decodeDerBoolean, k as decodeDerBooleanOrThrow, A as decodeDerInteger, j as decodeDerIntegerOrThrow, M as decodeDerOctetString, N as decodeDerOctetStringOrThrow, P as decodeDerOid, F as decodeDerOidOrThrow, I as decodeDerString, L as decodeDerStringOrThrow, R as decodeDerTime, z as decodeDerTimeOrThrow, n as derBitString, r as derBmpString, i as derBoolean, B as derChildren, V as derChildrenOrThrow, o as derExplicitContext, s as derGeneralizedTime, c as derIa5String, l as derImplicitConstructedContext, u as derImplicitPrimitiveContext, d as derInteger, f as derIntegerFromNumber, p as derNull, h as derOctetString, m as derOid, g as derPrintableString, _ as derSequence, v as derSet, y as derTime, b as derTlv, x as derUniversalString, S as derUtcTime, C as derUtf8String, w as hexToBytes, H as readDerElement, U as readDerElementOrThrow, W as readDerRoot, G as readDerRootOrThrow, K as readDerSequence, q as readDerSequenceOrThrow, T as toHex };
1
+ import { decodeDerBitString as e, decodeDerBitStringOrThrow as t, decodeDerBoolean as n, decodeDerBooleanOrThrow as r, decodeDerInteger as i, decodeDerIntegerOrThrow as a, decodeDerOctetString as o, decodeDerOctetStringOrThrow as s, decodeDerOid as c, decodeDerOidOrThrow as l, decodeDerString as u, decodeDerStringOrThrow as d, decodeDerTime as f, decodeDerTimeOrThrow as p, derChildren as m, derChildrenOrThrow as h, readDerElement as g, readDerElementOrThrow as _, readDerRoot as v, readDerRootOrThrow as y, readDerSequence as b, readDerSequenceOrThrow as x } from "./der/der.js";
2
+ import { hexToBytes as S, toHex as C } from "./internal/asn1/asn1.js";
3
+ import { DEFAULT_MAX_DER_DEPTH as w, assertDerMaxDepth as T, bitString as E, bmpString as D, bool as O, concatBytes as k, explicitContext as A, generalizedTime as j, ia5String as M, implicitConstructedContext as N, implicitPrimitiveContext as P, integer as F, integerFromNumber as I, nullValue as L, objectIdentifier as R, octetString as z, printableString as B, sequence as V, setOf as H, time as U, tlv as W, universalString as G, utcTime as K, utf8String as q } from "./internal/asn1/der.js";
4
+ export { w as DEFAULT_MAX_DER_DEPTH, T as assertDerMaxDepth, k as concatBytes, e as decodeDerBitString, t as decodeDerBitStringOrThrow, n as decodeDerBoolean, r as decodeDerBooleanOrThrow, i as decodeDerInteger, a as decodeDerIntegerOrThrow, o as decodeDerOctetString, s as decodeDerOctetStringOrThrow, c as decodeDerOid, l as decodeDerOidOrThrow, u as decodeDerString, d as decodeDerStringOrThrow, f as decodeDerTime, p as decodeDerTimeOrThrow, E as derBitString, D as derBmpString, O as derBoolean, m as derChildren, h as derChildrenOrThrow, A as derExplicitContext, j as derGeneralizedTime, M as derIa5String, N as derImplicitConstructedContext, P as derImplicitPrimitiveContext, F as derInteger, I as derIntegerFromNumber, L as derNull, z as derOctetString, R as derOid, B as derPrintableString, V as derSequence, H as derSet, U as derTime, W as derTlv, G as derUniversalString, K as derUtcTime, q as derUtf8String, S as hexToBytes, g as readDerElement, _ as readDerElementOrThrow, v as readDerRoot, y as readDerRootOrThrow, b as readDerSequence, x as readDerSequenceOrThrow, C as toHex };
package/dist/index.d.ts CHANGED
@@ -1,26 +1,94 @@
1
+ /**
2
+ * Stable root import for `micro509`.\
3
+ * Re-exports the common certificate, parsing, verification, revocation, key, and PKCS
4
+ * workflows from one package entrypoint.
5
+ *
6
+ * Reach for this module when you want the default workflow-first package surface.
7
+ * Use domain entrypoints such as `micro509/x509`, `micro509/verify`, and
8
+ * `micro509/revocation` when you need exhaustive advanced types.
9
+ *
10
+ * The root export is organized around common PKI flows:
11
+ *
12
+ * - create certificates, CSRs, CRLs, OCSP responses, PKCS#7, and PFX artifacts
13
+ * - parse DER or PEM inputs into typed certificate and request shapes
14
+ * - verify certificate chains, service identities, CRLs, OCSP, and signed data
15
+ * - import, export, generate, and encrypt key material with WebCrypto-safe algorithms
16
+ * - work with the common extension inputs, revocation evidence, and validation results
17
+ *
18
+ * Advanced PKCS#12 MAC plumbing, signature profile tuning, and other domain-specific helper
19
+ * types stay in their owner domains instead of being headlined here.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * import {
24
+ * createSelfSignedCertificate,
25
+ * parseCertificatePem,
26
+ * unwrap,
27
+ * verifyCertificateChain,
28
+ * } from 'micro509';
29
+ *
30
+ * const { certificate } = await createSelfSignedCertificate({
31
+ * subject: { commonName: 'example.com' },
32
+ * algorithm: { kind: 'ecdsa', curve: 'P-256' },
33
+ * });
34
+ *
35
+ * const parsed = unwrap(parseCertificatePem(certificate.pem));
36
+ * // parsed.subject.values.commonName === 'example.com'
37
+ *
38
+ * const result = await verifyCertificateChain({
39
+ * leaf: certificate.pem,
40
+ * roots: [certificate.pem],
41
+ * allowSelfSignedLeaf: true,
42
+ * });
43
+ * // result.ok === true
44
+ * ```
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * import {
49
+ * generateKeyPair,
50
+ * parseCertificateSigningRequestPem,
51
+ * createCertificateSigningRequest,
52
+ * unwrap,
53
+ * } from 'micro509';
54
+ *
55
+ * const keyPair = await generateKeyPair({ kind: 'ecdsa', curve: 'P-256' });
56
+ * const csr = await createCertificateSigningRequest({
57
+ * subject: { commonName: 'example.com' },
58
+ * publicKey: keyPair.publicKey,
59
+ * signerPrivateKey: keyPair.privateKey,
60
+ * });
61
+ *
62
+ * const parsed = unwrap(parseCertificateSigningRequestPem(csr.pem));
63
+ * // parsed.subject.values.commonName === 'example.com'
64
+ * ```
65
+ *
66
+ * @module micro509
67
+ */
68
+ import { DecryptRsaOaepErrorCode, DecryptRsaOaepFailure, DecryptRsaOaepResult, EcKeyAlgorithmInput, EcNamedCurve, Ed25519KeyAlgorithmInput, EncryptRsaOaepErrorCode, EncryptRsaOaepFailure, EncryptRsaOaepResult, EncryptedPkcs8Options, ImportEcKeyInput, ImportEd25519KeyInput, ImportEncryptedKeyErrorCode, ImportEncryptedKeyFailure, ImportEncryptedKeyOptions, ImportEncryptedKeyResult, ImportKeyErrorCode, ImportKeyErrorDetails, ImportKeyFailure, ImportKeyReason, ImportKeyResult, ImportKeyStage, ImportRsaKeyInput, KeyAlgorithmInput, KeyPairMaterial, LegacyPemEncryptionOptions, PrivateKeyImportInput, PublicKeyImportInput, RsaHash, RsaKeyAlgorithmInput, RsaOaepOptions, RsaScheme, RsaSignatureScheme, decryptRsaOaep, decryptRsaOaepOrThrow, derivePublicKey, encryptRsaOaep, encryptRsaOaepOrThrow, exportBinaryBase64, exportEncryptedPkcs1Pem, exportEncryptedPkcs8Der, exportEncryptedPkcs8Pem, exportEncryptedSec1Pem, exportPkcs1Der, exportPkcs1Pem, exportPkcs8Der, exportPkcs8Pem, exportPrivateJwk, exportPublicJwk, exportSec1Der, exportSec1Pem, exportSpkiDer, exportSpkiPem, generateKeyPair, importEncryptedPkcs1Pem, importEncryptedPkcs1PemOrThrow, importEncryptedPkcs8Der, importEncryptedPkcs8DerOrThrow, importEncryptedPkcs8Pem, importEncryptedPkcs8PemOrThrow, importEncryptedSec1Pem, importEncryptedSec1PemOrThrow, importPkcs1Der, importPkcs1DerOrThrow, importPkcs1Pem, importPkcs1PemOrThrow, importPkcs8Base64, importPkcs8Base64OrThrow, importPkcs8Der, importPkcs8DerOrThrow, importPkcs8Pem, importPkcs8PemOrThrow, importPrivateJwk, importPrivateJwkOrThrow, importPrivateKeyPem, importPrivateKeyPemOrThrow, importPublicJwk, importPublicJwkOrThrow, importSec1Der, importSec1DerOrThrow, importSec1Pem, importSec1PemOrThrow, importSpkiBase64, importSpkiBase64OrThrow, importSpkiDer, importSpkiDerOrThrow, importSpkiPem, importSpkiPemOrThrow, inspectEncryptedPkcs8Der } from "./keys/keys.js";
1
69
  import { KdfLimitOptions, Pbes2Parameters } from "./internal/crypto/pbes2.js";
2
- import { DECODE_REFUSAL_CODES, DecodeFailureCode, DecodeRefusalCode, ErrorResult, IndexedErrorResult, IndexedMicro509Error, Micro509Error, Result, ResultError, isResultError, unwrap, unwrapOr } from "./result/result.js";
3
- import { DecryptRsaOaepErrorCode, DecryptRsaOaepFailure, DecryptRsaOaepResult, EcKeyAlgorithmInput, EcNamedCurve, Ed25519KeyAlgorithmInput, EncryptRsaOaepErrorCode, EncryptRsaOaepFailure, EncryptRsaOaepResult, EncryptedPkcs8Options, ImportEcKeyInput, ImportEd25519KeyInput, ImportEncryptedKeyErrorCode, ImportEncryptedKeyFailure, ImportEncryptedKeyOptions, ImportEncryptedKeyResult, ImportKeyErrorCode, ImportKeyFailure, ImportKeyResult, ImportRsaKeyInput, KeyAlgorithmInput, KeyPairMaterial, LegacyPemEncryptionOptions, PrivateKeyImportInput, PublicKeyImportInput, RsaHash, RsaKeyAlgorithmInput, RsaOaepOptions, RsaScheme, RsaSignatureScheme, decryptRsaOaep, decryptRsaOaepOrThrow, derivePublicKey, encryptRsaOaep, encryptRsaOaepOrThrow, exportBinaryBase64, exportEncryptedPkcs1Pem, exportEncryptedPkcs8Der, exportEncryptedPkcs8Pem, exportEncryptedSec1Pem, exportPkcs1Der, exportPkcs1Pem, exportPkcs8Der, exportPkcs8Pem, exportPrivateJwk, exportPublicJwk, exportSec1Der, exportSec1Pem, exportSpkiDer, exportSpkiPem, generateKeyPair, importEncryptedPkcs1Pem, importEncryptedPkcs1PemOrThrow, importEncryptedPkcs8Der, importEncryptedPkcs8DerOrThrow, importEncryptedPkcs8Pem, importEncryptedPkcs8PemOrThrow, importEncryptedSec1Pem, importEncryptedSec1PemOrThrow, importPkcs1Der, importPkcs1DerOrThrow, importPkcs1Pem, importPkcs1PemOrThrow, importPkcs8Base64, importPkcs8Base64OrThrow, importPkcs8Der, importPkcs8DerOrThrow, importPkcs8Pem, importPkcs8PemOrThrow, importPrivateJwk, importPrivateJwkOrThrow, importPublicJwk, importPublicJwkOrThrow, importSec1Der, importSec1DerOrThrow, importSec1Pem, importSec1PemOrThrow, importSpkiBase64, importSpkiBase64OrThrow, importSpkiDer, importSpkiDerOrThrow, importSpkiPem, importSpkiPemOrThrow, inspectEncryptedPkcs8Der } from "./keys/keys.js";
4
70
  import { CategorizePemBlocksResult, CategorizedPemBlocks, PemBlock, PemDecodeResult, PemErrorCode, PemFailure, SplitPemBlocksResult, categorizePemBlocks, categorizePemBlocksOrThrow, pemDecode, pemDecodeOrThrow, pemEncode, splitPemBlocks, splitPemBlocksOrThrow } from "./pem/pem.js";
5
- import { CreatePkcs12MacDataErrorCode, ParsePkcs12MacDataErrorCode, ParsePkcs12MacDataFailure, ParsePkcs12MacDataOptions, ParsePkcs12MacDataResult, ParsedPkcs12MacData, Pkcs12MacOptions } from "./pkcs/pkcs12-mac.js";
6
- import { compareDistinguishedNames } from "./internal/shared/dn.js";
7
- import { NameAttribute, NameEncoderErrorCode, NameFieldKey, NameInput, NameObject, RelativeDistinguishedNameInput } from "./x509/name.js";
8
- import { ExtensionEncoderErrorCode } from "./internal/x509/extension-errors.js";
9
- import { AuthorityInformationAccess, AuthorityInformationAccessInput, BasicConstraints, CertificateExtensionsInput, CertificatePolicies, DisplayTextType, DistributionPoint, DistributionPointName, ExtendedKeyUsage, GeneralName, GeneralSubtree, InhibitAnyPolicy, IssuingDistributionPoint, IssuingDistributionPointBase, IssuingDistributionPointForAttributeCerts, IssuingDistributionPointForCaCerts, IssuingDistributionPointForUserCerts, KeyUsage, NameConstraintForm, NameConstraints, OversizedDisplayText, ParsedBitFlags, ParsedNameConstraintForm, PolicyConstraints, PolicyInformation, PolicyMapping, PolicyMappings, PolicyQualifierInfo, SubjectAltName } from "./x509/extensions.js";
10
- import { DecodedExtensionMap, DecodedExtensionValue, ExtensionDecoder, ExtensionDecoderMap, MatchCertificatePrivateKeyErrorCode, MatchCertificatePrivateKeyFailure, MatchCertificatePrivateKeyFailureResult, MatchCertificatePrivateKeyResult, MatchCertificatePrivateKeySuccess, ParseCertificateChainResult, ParseCertificateErrorCode, ParseCertificateFailure, ParseCertificateResult, ParseCertificateSigningRequestErrorCode, ParseCertificateSigningRequestFailure, ParseCertificateSigningRequestResult, ParseOptions, ParsedCertificate, ParsedCertificateSigningRequest, ParsedDistributionPoint, ParsedDistributionPointName, ParsedExtension, ParsedIssuingDistributionPoint, ParsedIssuingDistributionPointBase, ParsedIssuingDistributionPointScope, ParsedName, ParsedNameAttribute, ParsedRelativeDistinguishedName, certificateMatchesPrivateKey, decodeExtension, decodeExtensionMap, decodeExtensions, defineExtensionDecoder, defineExtensionDecoderMap, findExtension, getSubjectPublicKey, getSubjectPublicKeyOrThrow, matchCertificatePrivateKey, parseCertificateChainPem, parseCertificateChainPemOrThrow, parseCertificateDer, parseCertificateDerOrThrow, parseCertificateFromSource, parseCertificatePem, parseCertificatePemOrThrow, parseCertificateSigningRequestDer, parseCertificateSigningRequestDerOrThrow, parseCertificateSigningRequestPem, parseCertificateSigningRequestPemOrThrow, parseCertificatesFromSource, parseDistinguishedNameDer } from "./x509/parse.js";
11
71
  import { CreatePfxErrorCode, CreatePfxFailure, CreatePfxInput, CreatePfxResult, ParsePfxErrorCode, ParsePfxFailure, ParsePfxOptions, ParsePfxResult, ParsedPfx, ParsedPfxAttribute, ParsedPfxBag, ParsedPfxBagAttributes, PfxBagAttributesInput, PfxCertificateBagInput, PfxCertificateSource, PfxEncoderErrorCode, PfxEncryptionOptions, PfxMaterial, PfxPrivateKeyBagInput, PfxPrivateKeySource, createPfx, parsePfxDer, parsePfxPem } from "./pkcs/pfx.js";
12
- import { CertificateMaterial, CreateCertificateErrorCode, CreateCertificateInput, CreateSelfSignedCertificateBase, CreateSelfSignedCertificateInput, SelfSignedCertificateResult, SelfSignedKeySource, ValidityInput, createCertificate, createSelfSignedCertificate } from "./x509/certificate.js";
13
72
  import { CreatePkcs7CertBagErrorCode, CreatePkcs7CertBagFailure, CreatePkcs7CertBagResult, CreatePkcs7SignedDataErrorCode, CreatePkcs7SignedDataFailure, CreatePkcs7SignedDataInput, CreatePkcs7SignedDataResult, ParsePkcs7CertBagResult, ParsePkcs7ErrorCode, ParsePkcs7Failure, ParsePkcs7SignedDataResult, ParsedCertificateChoice, ParsedPkcs7SignedData, ParsedPkcs7SignerInfo, ParsedPkcs7SignerInfoBase, ParsedSignerIdentifier, Pkcs7CertBagMaterial, Pkcs7CertificateSource, Pkcs7SignedDataMaterial, Pkcs7Signer, VerifiedPkcs7Signer, VerifyPkcs7SignedDataErrorCode, VerifyPkcs7SignedDataFailure, VerifyPkcs7SignedDataOptions, VerifyPkcs7SignedDataResult, createPkcs7CertBag, createPkcs7SignedData, parsePkcs7CertBagDer, parsePkcs7CertBagPem, parsePkcs7SignedDataDer, parsePkcs7SignedDataPem, verifyPkcs7SignedData } from "./pkcs/pkcs7.js";
14
- import { CertificateRevocationListMaterial, CheckCertificateRevocationAgainstCrlErrorCode, CheckCertificateRevocationAgainstCrlFailure, CheckCertificateRevocationAgainstCrlFailureDetails, CheckCertificateRevocationAgainstCrlGoodValue, CheckCertificateRevocationAgainstCrlInput, CheckCertificateRevocationAgainstCrlResult, CheckCertificateRevocationAgainstCrlRevokedValue, CheckCertificateRevocationAgainstCrlValue, CreateCertificateRevocationListInput, CrlApplicabilityFailureReason, CrlCertificateSource, CrlEncoderErrorCode, CrlSource, ParseCertificateRevocationListErrorCode, ParseCertificateRevocationListFailure, ParseCertificateRevocationListResult, ParsedCertificateRevocationList, ParsedRevocationReason, ParsedRevokedCertificate, RevocationReason, RevokedCertificateInput, UnrecognizedReasonCodePolicy, UnrecognizedRevocationReason, ValidateCertificateRevocationListFailure, ValidateCertificateRevocationListInput, ValidateCertificateRevocationListResult, VerifyCertificateRevocationListSignatureFailure, VerifyCertificateRevocationListSignatureResult, checkCertificateRevocationAgainstCrl, createCertificateRevocationList, isCertificateRevoked, parseCertificateRevocationListDer, parseCertificateRevocationListDerOrThrow, parseCertificateRevocationListPem, parseCertificateRevocationListPemOrThrow, revocationReasonFromCode, validateCertificateRevocationList, verifyCertificateRevocationListSignature } from "./revocation/crl.js";
15
- import { CreateOcspCertStatusInput, CreateOcspRequestInput, CreateOcspRequestItemInput, CreateOcspResponseInput, CreateOcspSingleResponseInput, OcspCertStatus, OcspCertificateSource, OcspEncoderErrorCode, OcspHashAlgorithm, OcspRequestMaterial, OcspRequestSource, OcspResponderRevocationPolicy, OcspResponseMaterial, OcspResponseStatus, ParseOcspRequestErrorCode, ParseOcspRequestFailure, ParseOcspRequestResult, ParseOcspResponseErrorCode, ParseOcspResponseFailure, ParseOcspResponseResult, ParsedOcspCertId, ParsedOcspCertStatus, ParsedOcspRequest, ParsedOcspResponderId, ParsedOcspResponse, ParsedOcspSingleResponse, ValidateOcspResponseErrorCode, ValidateOcspResponseFailure, ValidateOcspResponseInput, ValidateOcspResponseResult, VerifyOcspResponseSignatureFailure, VerifyOcspResponseSignatureResult, createOcspRequest, createOcspResponse, hasOcspNoCheckExtension, parseOcspRequestDer, parseOcspRequestDerOrThrow, parseOcspRequestPem, parseOcspRequestPemOrThrow, parseOcspResponseDer, parseOcspResponseDerOrThrow, parseOcspResponsePem, parseOcspResponsePemOrThrow, validateOcspResponse, verifyOcspResponseSignature } from "./revocation/ocsp.js";
16
- import { CheckCertificateRevocationErrorCode, CheckCertificateRevocationFailureDetails, CheckCertificateRevocationInput, CheckCertificateRevocationResult, CheckCertificateRevocationValue, ConfiguredOcspResponder, ConfiguredOcspResponderCertificate, OcspResponderCandidate, OcspResponderSource, REVOCATION_INDETERMINATE_REASON_CODES, ResolveOcspResponderCandidatesInput, RevocationCertificateSource, RevocationCheckGoodValue, RevocationCheckIndeterminateValue, RevocationCheckRevokedValue, RevocationCrlEvidenceInput, RevocationEvidenceInput, RevocationEvidenceKind, RevocationIndeterminateEvidence, RevocationIndeterminateReasonCode, RevocationOcspEvidenceInput, RevocationStatus, checkCertificateRevocation, getCertificateOcspResponderUris, resolveOcspResponderCandidates } from "./revocation/revocation.js";
73
+ import { CreatePkcs12MacDataErrorCode, ParsePkcs12MacDataErrorCode, ParsePkcs12MacDataFailure, ParsePkcs12MacDataOptions, ParsePkcs12MacDataResult, ParsedPkcs12MacData, Pkcs12MacOptions } from "./pkcs/pkcs12-mac.js";
74
+ import { DECODE_REFUSAL_CODES, DecodeFailureCode, DecodeRefusalCode, ErrorResult, IndexedErrorResult, IndexedMicro509Error, Micro509Error, Result, ResultError, isResultError, unwrap, unwrapOr } from "./result/result.js";
75
+ import { CertificateRevocationListMaterial, CheckCertificateRevocationAgainstCrlErrorCode, CheckCertificateRevocationAgainstCrlFailure, CheckCertificateRevocationAgainstCrlFailureDetails, CheckCertificateRevocationAgainstCrlGoodValue, CheckCertificateRevocationAgainstCrlInput, CheckCertificateRevocationAgainstCrlResult, CheckCertificateRevocationAgainstCrlRevokedValue, CheckCertificateRevocationAgainstCrlValue, CreateCertificateRevocationListInput, CrlApplicabilityFailureReason, CrlCertificateSource, CrlEncoderErrorCode, CrlSource, ParseCertificateRevocationListErrorCode, ParseCertificateRevocationListFailure, ParseCertificateRevocationListResult, ParsedCertificateRevocationList, ParsedRevocationReason, ParsedRevokedCertificate, RevocationReason, RevokedCertificateInput, SupersededDeltaCrlPolicy, UnrecognizedReasonCodePolicy, UnrecognizedRevocationReason, ValidateCertificateRevocationListFailure, ValidateCertificateRevocationListInput, ValidateCertificateRevocationListResult, VerifyCertificateRevocationListSignatureFailure, VerifyCertificateRevocationListSignatureOptions, VerifyCertificateRevocationListSignatureResult, checkCertificateRevocationAgainstCrl, createCertificateRevocationList, isCertificateRevoked, parseCertificateRevocationListDer, parseCertificateRevocationListDerOrThrow, parseCertificateRevocationListPem, parseCertificateRevocationListPemOrThrow, revocationReasonFromCode, validateCertificateRevocationList, verifyCertificateRevocationListSignature } from "./revocation/crl.js";
17
76
  import { CertificateRevocationStatus, CheckChainRevocationInput, CheckChainRevocationResult, CheckChainRevocationValue, OcspResponseSource, REVOCATION_INDETERMINATE_REASONS, RevocationExecutionError, RevocationIndeterminateReason, RevocationParseError, RevocationPolicy, RevocationProcessingError, RevocationSource, TrustedOcspResponder, checkChainRevocation } from "./revocation/chain.js";
77
+ import { CheckCertificateRevocationErrorCode, CheckCertificateRevocationFailureDetails, CheckCertificateRevocationInput, CheckCertificateRevocationResult, CheckCertificateRevocationValue, ConfiguredOcspResponder, ConfiguredOcspResponderCertificate, OcspResponderCandidate, OcspResponderSource, REVOCATION_INDETERMINATE_REASON_CODES, ResolveOcspResponderCandidatesInput, RevocationCertificateSource, RevocationCheckGoodValue, RevocationCheckIndeterminateValue, RevocationCheckRevokedValue, RevocationCheckSkippedValue, RevocationCrlEvidenceInput, RevocationEvidenceInput, RevocationEvidenceKind, RevocationIndeterminateEvidence, RevocationIndeterminateReasonCode, RevocationOcspEvidenceInput, RevocationStatus, checkCertificateRevocation, getCertificateOcspResponderUris, resolveOcspResponderCandidates } from "./revocation/revocation.js";
78
+ import { CreateOcspCertStatusInput, CreateOcspRequestInput, CreateOcspRequestItemInput, CreateOcspResponseInput, CreateOcspSingleResponseInput, OcspCertStatus, OcspCertificateSource, OcspEncoderErrorCode, OcspHashAlgorithm, OcspRequestMaterial, OcspRequestSource, OcspResponderRevocationPolicy, OcspResponseMaterial, OcspResponseStatus, ParseOcspRequestErrorCode, ParseOcspRequestFailure, ParseOcspRequestResult, ParseOcspResponseErrorCode, ParseOcspResponseFailure, ParseOcspResponseResult, ParsedOcspCertId, ParsedOcspCertStatus, ParsedOcspRequest, ParsedOcspResponderId, ParsedOcspResponse, ParsedOcspSingleResponse, RevocationSkipReason, ValidateOcspResponseErrorCode, ValidateOcspResponseFailure, ValidateOcspResponseInput, ValidateOcspResponseResult, VerifyOcspResponseSignatureFailure, VerifyOcspResponseSignatureOptions, VerifyOcspResponseSignatureResult, createOcspRequest, createOcspResponse, hasOcspNoCheckExtension, parseOcspRequestDer, parseOcspRequestDerOrThrow, parseOcspRequestPem, parseOcspRequestPemOrThrow, parseOcspResponseDer, parseOcspResponseDerOrThrow, parseOcspResponsePem, parseOcspResponsePemOrThrow, validateOcspResponse, verifyOcspResponseSignature } from "./revocation/ocsp.js";
79
+ import { AuthorityInformationAccess, AuthorityInformationAccessInput, BasicConstraints, CertificateExtensionsInput, CertificatePolicies, DisplayTextType, DistributionPoint, DistributionPointName, ExtendedKeyUsage, GeneralName, GeneralSubtree, InhibitAnyPolicy, IssuingDistributionPoint, IssuingDistributionPointBase, IssuingDistributionPointForAttributeCerts, IssuingDistributionPointForCaCerts, IssuingDistributionPointForUserCerts, KeyUsage, NameConstraintForm, NameConstraints, OversizedDisplayText, ParsedBitFlags, ParsedNameConstraintForm, PolicyConstraints, PolicyInformation, PolicyMapping, PolicyMappings, PolicyQualifierInfo, SubjectAltName } from "./x509/extensions.js";
80
+ import { DecodedExtensionMap, DecodedExtensionValue, ExtensionDecoder, ExtensionDecoderMap, MatchCertificatePrivateKeyErrorCode, MatchCertificatePrivateKeyFailure, MatchCertificatePrivateKeyFailureResult, MatchCertificatePrivateKeyResult, MatchCertificatePrivateKeySuccess, ParseCertificateChainResult, ParseCertificateErrorCode, ParseCertificateFailure, ParseCertificateResult, ParseCertificateSigningRequestErrorCode, ParseCertificateSigningRequestFailure, ParseCertificateSigningRequestResult, ParseOptions, ParsedCertificate, ParsedCertificateSigningRequest, ParsedDistributionPoint, ParsedDistributionPointName, ParsedExtension, ParsedIssuingDistributionPoint, ParsedIssuingDistributionPointBase, ParsedIssuingDistributionPointScope, ParsedName, ParsedNameAttribute, ParsedRelativeDistinguishedName, certificateMatchesPrivateKey, decodeExtension, decodeExtensionMap, decodeExtensions, defineExtensionDecoder, defineExtensionDecoderMap, findExtension, getSubjectPublicKey, getSubjectPublicKeyOrThrow, matchCertificatePrivateKey, parseCertificateChainPem, parseCertificateChainPemOrThrow, parseCertificateDer, parseCertificateDerOrThrow, parseCertificateFromSource, parseCertificatePem, parseCertificatePemOrThrow, parseCertificateSigningRequestDer, parseCertificateSigningRequestDerOrThrow, parseCertificateSigningRequestPem, parseCertificateSigningRequestPemOrThrow, parseCertificatesFromSource, parseDistinguishedNameDer } from "./x509/parse.js";
81
+ import { BuildCandidatePathInput, BuildCandidatePathResult, CandidatePath, CandidatePathAnchor, CandidatePathCertificates, CertificateSource, ChainRevocationInput, CsrSource, EkuCheckFailure, EkuCheckPurpose, EkuCheckResult, TrustAnchor, VERIFY_ERROR_CODES, ValidateCandidatePathInput, ValidateCandidatePathResult, ValidateCandidatePathSuccess, ValidateForCaInput, ValidateForCodeSigningInput, ValidateForTlsClientInput, ValidateForTlsServerInput, VerifiedCertificateChain, VerifiedPolicyOutcome, VerifyCertificateChainInput, VerifyCertificateSigningRequestOptions, VerifyChainFailure, VerifyChainResult, VerifyErrorCode, VerifyFailureDetails, VerifyFailureSource, VerifyPurpose, VerifyRequestFailure, VerifyRequestResult, buildCandidatePath, checkExtendedKeyUsage, trustAnchorFromCertificate, validateCandidatePath, validateForCa, validateForCodeSigning, validateForTlsClient, validateForTlsServer, verifyCertificateChain, verifyCertificateSigningRequest } from "./verify/verify.js";
82
+ import { ConstrainedPolicy, PolicyValidationInput, PolicyValidationOutcome } from "./verify/policy.js";
18
83
  import { DnsServiceIdentityInput, IpServiceIdentityInput, MatchServiceIdentityErrorCode, MatchServiceIdentityFailure, MatchServiceIdentityFailureDetails, MatchServiceIdentityFailureResult, MatchServiceIdentityInput, MatchServiceIdentityResult, MatchServiceIdentitySuccess, ServiceIdentityInput, ServiceIdentityType, SrvServiceIdentityInput, UriServiceIdentityInput, matchCertificateServiceIdentity, matchServiceIdentity } from "./verify/identity.js";
19
84
  import { InitialNameConstraintsInput } from "./verify/name-constraints.js";
20
- import { ConstrainedPolicy, PolicyValidationInput, PolicyValidationOutcome } from "./verify/policy.js";
85
+ import { SignatureVerifier, SignatureVerifierInput, SignatureVerifiers } from "./internal/crypto/sig-verify.js";
21
86
  import { isSelfIssued } from "./internal/verify/verify-path.js";
22
- import { BuildCandidatePathInput, BuildCandidatePathResult, CandidatePath, CertificateSource, ChainRevocationInput, CsrSource, EkuCheckFailure, EkuCheckPurpose, EkuCheckResult, TrustAnchor, VERIFY_ERROR_CODES, ValidateCandidatePathInput, ValidateCandidatePathResult, ValidateCandidatePathSuccess, ValidateForCaInput, ValidateForCodeSigningInput, ValidateForTlsClientInput, ValidateForTlsServerInput, VerifiedCertificateChain, VerifyCertificateChainInput, VerifyChainFailure, VerifyChainResult, VerifyErrorCode, VerifyFailureDetails, VerifyFailureSource, VerifyPurpose, VerifyRequestFailure, VerifyRequestResult, buildCandidatePath, checkExtendedKeyUsage, trustAnchorFromCertificate, validateCandidatePath, validateForCa, validateForCodeSigning, validateForTlsClient, validateForTlsServer, verifyCertificateChain, verifyCertificateSigningRequest } from "./verify/verify.js";
23
- import { CreateCsrInput, CsrMaterial, createCertificateSigningRequest } from "./x509/csr.js";
24
87
  import { CertificateFingerprint, CertificateFingerprintAlgorithm, CertificateFingerprintSource, certificateFingerprint, subjectPublicKeyInfoFingerprint } from "./x509/fingerprint.js";
88
+ import { CertificateMaterial, CreateCertificateErrorCode, CreateCertificateInput, CreateSelfSignedCertificateBase, CreateSelfSignedCertificateInput, SelfSignedCertificateResult, SelfSignedKeySource, ValidityInput, createCertificate, createSelfSignedCertificate } from "./x509/certificate.js";
89
+ import { CreateCsrInput, CsrMaterial, createCertificateSigningRequest } from "./x509/csr.js";
90
+ import { ExtensionEncoderErrorCode } from "./internal/x509/extension-errors.js";
91
+ import { NameAttribute, NameEncoderErrorCode, NameFieldKey, NameInput, NameObject, RelativeDistinguishedNameInput } from "./x509/name.js";
25
92
  import { SubjectAltNameTextOptions, distinguishedNameToString, relativeDistinguishedNameToString, subjectAltNameLabel, subjectAltNameToString } from "./x509/name-text.js";
26
- export { type AuthorityInformationAccess, type AuthorityInformationAccessInput, type BasicConstraints, type BuildCandidatePathInput, type BuildCandidatePathResult, type CandidatePath, type CategorizePemBlocksResult, type CategorizedPemBlocks, type CertificateExtensionsInput, type CertificateFingerprint, type CertificateFingerprintAlgorithm, type CertificateFingerprintSource, type CertificateMaterial, type CertificatePolicies, type CertificateRevocationListMaterial, type CertificateRevocationStatus, type CertificateSource, type ChainRevocationInput, type CheckCertificateRevocationAgainstCrlErrorCode, type CheckCertificateRevocationAgainstCrlFailure, type CheckCertificateRevocationAgainstCrlFailureDetails, type CheckCertificateRevocationAgainstCrlGoodValue, type CheckCertificateRevocationAgainstCrlInput, type CheckCertificateRevocationAgainstCrlResult, type CheckCertificateRevocationAgainstCrlRevokedValue, type CheckCertificateRevocationAgainstCrlValue, type CheckCertificateRevocationErrorCode, type CheckCertificateRevocationFailureDetails, type CheckCertificateRevocationInput, type CheckCertificateRevocationResult, type CheckCertificateRevocationValue, type CheckChainRevocationInput, type CheckChainRevocationResult, type CheckChainRevocationValue, type ConfiguredOcspResponder, type ConfiguredOcspResponderCertificate, type ConstrainedPolicy, type CreateCertificateErrorCode, type CreateCertificateInput, type CreateCertificateRevocationListInput, type CreateCsrInput, type CreateOcspCertStatusInput, type CreateOcspRequestInput, type CreateOcspRequestItemInput, type CreateOcspResponseInput, type CreateOcspSingleResponseInput, type CreatePfxErrorCode, type CreatePfxFailure, type CreatePfxInput, type CreatePfxResult, type CreatePkcs12MacDataErrorCode, type CreatePkcs7CertBagErrorCode, type CreatePkcs7CertBagFailure, type CreatePkcs7CertBagResult, type CreatePkcs7SignedDataErrorCode, type CreatePkcs7SignedDataFailure, type CreatePkcs7SignedDataInput, type CreatePkcs7SignedDataResult, type CreateSelfSignedCertificateBase, type CreateSelfSignedCertificateInput, type CrlApplicabilityFailureReason, type CrlCertificateSource, type CrlEncoderErrorCode, type CrlSource, type CsrMaterial, type CsrSource, DECODE_REFUSAL_CODES, type DecodeFailureCode, type DecodeRefusalCode, type DecodedExtensionMap, type DecodedExtensionValue, type DecryptRsaOaepErrorCode, type DecryptRsaOaepFailure, type DecryptRsaOaepResult, type DisplayTextType, type DistributionPoint, type DistributionPointName, type DnsServiceIdentityInput, type EcKeyAlgorithmInput, type EcNamedCurve, type Ed25519KeyAlgorithmInput, type EkuCheckFailure, type EkuCheckPurpose, type EkuCheckResult, type EncryptRsaOaepErrorCode, type EncryptRsaOaepFailure, type EncryptRsaOaepResult, type EncryptedPkcs8Options, type ErrorResult, type ExtendedKeyUsage, type ExtensionDecoder, type ExtensionDecoderMap, type ExtensionEncoderErrorCode, type GeneralName, type GeneralSubtree, type ImportEcKeyInput, type ImportEd25519KeyInput, type ImportEncryptedKeyErrorCode, type ImportEncryptedKeyFailure, type ImportEncryptedKeyOptions, type ImportEncryptedKeyResult, type ImportKeyErrorCode, type ImportKeyFailure, type ImportKeyResult, type ImportRsaKeyInput, type IndexedErrorResult, type IndexedMicro509Error, type InhibitAnyPolicy, type InitialNameConstraintsInput, type IpServiceIdentityInput, type IssuingDistributionPoint, type IssuingDistributionPointBase, type IssuingDistributionPointForAttributeCerts, type IssuingDistributionPointForCaCerts, type IssuingDistributionPointForUserCerts, type KdfLimitOptions, type KeyAlgorithmInput, type KeyPairMaterial, type KeyUsage, type LegacyPemEncryptionOptions, type MatchCertificatePrivateKeyErrorCode, type MatchCertificatePrivateKeyFailure, type MatchCertificatePrivateKeyFailureResult, type MatchCertificatePrivateKeyResult, type MatchCertificatePrivateKeySuccess, type MatchServiceIdentityErrorCode, type MatchServiceIdentityFailure, type MatchServiceIdentityFailureDetails, type MatchServiceIdentityFailureResult, type MatchServiceIdentityInput, type MatchServiceIdentityResult, type MatchServiceIdentitySuccess, type Micro509Error, type NameAttribute, type NameConstraintForm, type NameConstraints, type NameEncoderErrorCode, type NameFieldKey, type NameInput, type NameObject, type OcspCertStatus, type OcspCertificateSource, type OcspEncoderErrorCode, type OcspHashAlgorithm, type OcspRequestMaterial, type OcspRequestSource, type OcspResponderCandidate, type OcspResponderRevocationPolicy, type OcspResponderSource, type OcspResponseMaterial, type OcspResponseSource, type OcspResponseStatus, type OversizedDisplayText, type ParseCertificateChainResult, type ParseCertificateErrorCode, type ParseCertificateFailure, type ParseCertificateResult, type ParseCertificateRevocationListErrorCode, type ParseCertificateRevocationListFailure, type ParseCertificateRevocationListResult, type ParseCertificateSigningRequestErrorCode, type ParseCertificateSigningRequestFailure, type ParseCertificateSigningRequestResult, type ParseOcspRequestErrorCode, type ParseOcspRequestFailure, type ParseOcspRequestResult, type ParseOcspResponseErrorCode, type ParseOcspResponseFailure, type ParseOcspResponseResult, type ParseOptions, type ParsePfxErrorCode, type ParsePfxFailure, type ParsePfxOptions, type ParsePfxResult, type ParsePkcs12MacDataErrorCode, type ParsePkcs12MacDataFailure, type ParsePkcs12MacDataOptions, type ParsePkcs12MacDataResult, type ParsePkcs7CertBagResult, type ParsePkcs7ErrorCode, type ParsePkcs7Failure, type ParsePkcs7SignedDataResult, type ParsedBitFlags, type ParsedCertificate, type ParsedCertificateChoice, type ParsedCertificateRevocationList, type ParsedCertificateSigningRequest, type ParsedDistributionPoint, type ParsedDistributionPointName, type ParsedExtension, type ParsedIssuingDistributionPoint, type ParsedIssuingDistributionPointBase, type ParsedIssuingDistributionPointScope, type ParsedName, type ParsedNameAttribute, type ParsedNameConstraintForm, type ParsedOcspCertId, type ParsedOcspCertStatus, type ParsedOcspRequest, type ParsedOcspResponderId, type ParsedOcspResponse, type ParsedOcspSingleResponse, type ParsedPfx, type ParsedPfxAttribute, type ParsedPfxBag, type ParsedPfxBagAttributes, type ParsedPkcs12MacData, type ParsedPkcs7SignedData, type ParsedPkcs7SignerInfo, type ParsedPkcs7SignerInfoBase, type ParsedRelativeDistinguishedName, type ParsedRevocationReason, type ParsedRevokedCertificate, type ParsedSignerIdentifier, type Pbes2Parameters, type PemBlock, type PemDecodeResult, type PemErrorCode, type PemFailure, type PfxBagAttributesInput, type PfxCertificateBagInput, type PfxCertificateSource, type PfxEncoderErrorCode, type PfxEncryptionOptions, type PfxMaterial, type PfxPrivateKeyBagInput, type PfxPrivateKeySource, type Pkcs12MacOptions, type Pkcs7CertBagMaterial, type Pkcs7CertificateSource, type Pkcs7SignedDataMaterial, type Pkcs7Signer, type PolicyConstraints, type PolicyInformation, type PolicyMapping, type PolicyMappings, type PolicyQualifierInfo, type PolicyValidationInput, type PolicyValidationOutcome, type PrivateKeyImportInput, type PublicKeyImportInput, REVOCATION_INDETERMINATE_REASONS, REVOCATION_INDETERMINATE_REASON_CODES, type RelativeDistinguishedNameInput, type ResolveOcspResponderCandidatesInput, type Result, type ResultError, type RevocationCertificateSource, type RevocationCheckGoodValue, type RevocationCheckIndeterminateValue, type RevocationCheckRevokedValue, type RevocationCrlEvidenceInput, type RevocationEvidenceInput, type RevocationEvidenceKind, type RevocationExecutionError, type RevocationIndeterminateEvidence, type RevocationIndeterminateReason, type RevocationIndeterminateReasonCode, type RevocationOcspEvidenceInput, type RevocationParseError, type RevocationPolicy, type RevocationProcessingError, type RevocationReason, type RevocationSource, type RevocationStatus, type RevokedCertificateInput, type RsaHash, type RsaKeyAlgorithmInput, type RsaOaepOptions, type RsaScheme, type RsaSignatureScheme, type SelfSignedCertificateResult, type SelfSignedKeySource, type ServiceIdentityInput, type ServiceIdentityType, type SplitPemBlocksResult, type SrvServiceIdentityInput, type SubjectAltName, type SubjectAltNameTextOptions, type TrustAnchor, type TrustedOcspResponder, type UnrecognizedReasonCodePolicy, type UnrecognizedRevocationReason, type UriServiceIdentityInput, VERIFY_ERROR_CODES, type ValidateCandidatePathInput, type ValidateCandidatePathResult, type ValidateCandidatePathSuccess, type ValidateCertificateRevocationListFailure, type ValidateCertificateRevocationListInput, type ValidateCertificateRevocationListResult, type ValidateForCaInput, type ValidateForCodeSigningInput, type ValidateForTlsClientInput, type ValidateForTlsServerInput, type ValidateOcspResponseErrorCode, type ValidateOcspResponseFailure, type ValidateOcspResponseInput, type ValidateOcspResponseResult, type ValidityInput, type VerifiedCertificateChain, type VerifiedPkcs7Signer, type VerifyCertificateChainInput, type VerifyCertificateRevocationListSignatureFailure, type VerifyCertificateRevocationListSignatureResult, type VerifyChainFailure, type VerifyChainResult, type VerifyErrorCode, type VerifyFailureDetails, type VerifyFailureSource, type VerifyOcspResponseSignatureFailure, type VerifyOcspResponseSignatureResult, type VerifyPkcs7SignedDataErrorCode, type VerifyPkcs7SignedDataFailure, type VerifyPkcs7SignedDataOptions, type VerifyPkcs7SignedDataResult, type VerifyPurpose, type VerifyRequestFailure, type VerifyRequestResult, buildCandidatePath, categorizePemBlocks, categorizePemBlocksOrThrow, certificateFingerprint, certificateMatchesPrivateKey, checkCertificateRevocation, checkCertificateRevocationAgainstCrl, checkChainRevocation, checkExtendedKeyUsage, compareDistinguishedNames, createCertificate, createCertificateRevocationList, createCertificateSigningRequest, createOcspRequest, createOcspResponse, createPfx, createPkcs7CertBag, createPkcs7SignedData, createSelfSignedCertificate, decodeExtension, decodeExtensionMap, decodeExtensions, decryptRsaOaep, decryptRsaOaepOrThrow, defineExtensionDecoder, defineExtensionDecoderMap, derivePublicKey, distinguishedNameToString, encryptRsaOaep, encryptRsaOaepOrThrow, exportBinaryBase64, exportEncryptedPkcs1Pem, exportEncryptedPkcs8Der, exportEncryptedPkcs8Pem, exportEncryptedSec1Pem, exportPkcs1Der, exportPkcs1Pem, exportPkcs8Der, exportPkcs8Pem, exportPrivateJwk, exportPublicJwk, exportSec1Der, exportSec1Pem, exportSpkiDer, exportSpkiPem, findExtension, generateKeyPair, getCertificateOcspResponderUris, getSubjectPublicKey, getSubjectPublicKeyOrThrow, hasOcspNoCheckExtension, importEncryptedPkcs1Pem, importEncryptedPkcs1PemOrThrow, importEncryptedPkcs8Der, importEncryptedPkcs8DerOrThrow, importEncryptedPkcs8Pem, importEncryptedPkcs8PemOrThrow, importEncryptedSec1Pem, importEncryptedSec1PemOrThrow, importPkcs1Der, importPkcs1DerOrThrow, importPkcs1Pem, importPkcs1PemOrThrow, importPkcs8Base64, importPkcs8Base64OrThrow, importPkcs8Der, importPkcs8DerOrThrow, importPkcs8Pem, importPkcs8PemOrThrow, importPrivateJwk, importPrivateJwkOrThrow, importPublicJwk, importPublicJwkOrThrow, importSec1Der, importSec1DerOrThrow, importSec1Pem, importSec1PemOrThrow, importSpkiBase64, importSpkiBase64OrThrow, importSpkiDer, importSpkiDerOrThrow, importSpkiPem, importSpkiPemOrThrow, inspectEncryptedPkcs8Der, isCertificateRevoked, isResultError, isSelfIssued as isSelfIssuedCertificate, matchCertificatePrivateKey, matchCertificateServiceIdentity, matchServiceIdentity, parseCertificateChainPem, parseCertificateChainPemOrThrow, parseCertificateDer, parseCertificateDerOrThrow, parseCertificateFromSource, parseCertificatePem, parseCertificatePemOrThrow, parseCertificateRevocationListDer, parseCertificateRevocationListDerOrThrow, parseCertificateRevocationListPem, parseCertificateRevocationListPemOrThrow, parseCertificateSigningRequestDer, parseCertificateSigningRequestDerOrThrow, parseCertificateSigningRequestPem, parseCertificateSigningRequestPemOrThrow, parseCertificatesFromSource, parseDistinguishedNameDer, parseOcspRequestDer, parseOcspRequestDerOrThrow, parseOcspRequestPem, parseOcspRequestPemOrThrow, parseOcspResponseDer, parseOcspResponseDerOrThrow, parseOcspResponsePem, parseOcspResponsePemOrThrow, parsePfxDer, parsePfxPem, parsePkcs7CertBagDer, parsePkcs7CertBagPem, parsePkcs7SignedDataDer, parsePkcs7SignedDataPem, pemDecode, pemDecodeOrThrow, pemEncode, relativeDistinguishedNameToString, resolveOcspResponderCandidates, revocationReasonFromCode, splitPemBlocks, splitPemBlocksOrThrow, subjectAltNameLabel, subjectAltNameToString, subjectPublicKeyInfoFingerprint, trustAnchorFromCertificate, unwrap, unwrapOr, validateCandidatePath, validateCertificateRevocationList, validateForCa, validateForCodeSigning, validateForTlsClient, validateForTlsServer, validateOcspResponse, verifyCertificateChain, verifyCertificateRevocationListSignature, verifyCertificateSigningRequest, verifyOcspResponseSignature, verifyPkcs7SignedData };
93
+ import { compareDistinguishedNames } from "./internal/shared/dn.js";
94
+ export { type AuthorityInformationAccess, type AuthorityInformationAccessInput, type BasicConstraints, type BuildCandidatePathInput, type BuildCandidatePathResult, type CandidatePath, type CandidatePathAnchor, type CandidatePathCertificates, type CategorizePemBlocksResult, type CategorizedPemBlocks, type CertificateExtensionsInput, type CertificateFingerprint, type CertificateFingerprintAlgorithm, type CertificateFingerprintSource, type CertificateMaterial, type CertificatePolicies, type CertificateRevocationListMaterial, type CertificateRevocationStatus, type CertificateSource, type ChainRevocationInput, type CheckCertificateRevocationAgainstCrlErrorCode, type CheckCertificateRevocationAgainstCrlFailure, type CheckCertificateRevocationAgainstCrlFailureDetails, type CheckCertificateRevocationAgainstCrlGoodValue, type CheckCertificateRevocationAgainstCrlInput, type CheckCertificateRevocationAgainstCrlResult, type CheckCertificateRevocationAgainstCrlRevokedValue, type CheckCertificateRevocationAgainstCrlValue, type CheckCertificateRevocationErrorCode, type CheckCertificateRevocationFailureDetails, type CheckCertificateRevocationInput, type CheckCertificateRevocationResult, type CheckCertificateRevocationValue, type CheckChainRevocationInput, type CheckChainRevocationResult, type CheckChainRevocationValue, type ConfiguredOcspResponder, type ConfiguredOcspResponderCertificate, type ConstrainedPolicy, type CreateCertificateErrorCode, type CreateCertificateInput, type CreateCertificateRevocationListInput, type CreateCsrInput, type CreateOcspCertStatusInput, type CreateOcspRequestInput, type CreateOcspRequestItemInput, type CreateOcspResponseInput, type CreateOcspSingleResponseInput, type CreatePfxErrorCode, type CreatePfxFailure, type CreatePfxInput, type CreatePfxResult, type CreatePkcs12MacDataErrorCode, type CreatePkcs7CertBagErrorCode, type CreatePkcs7CertBagFailure, type CreatePkcs7CertBagResult, type CreatePkcs7SignedDataErrorCode, type CreatePkcs7SignedDataFailure, type CreatePkcs7SignedDataInput, type CreatePkcs7SignedDataResult, type CreateSelfSignedCertificateBase, type CreateSelfSignedCertificateInput, type CrlApplicabilityFailureReason, type CrlCertificateSource, type CrlEncoderErrorCode, type CrlSource, type CsrMaterial, type CsrSource, DECODE_REFUSAL_CODES, type DecodeFailureCode, type DecodeRefusalCode, type DecodedExtensionMap, type DecodedExtensionValue, type DecryptRsaOaepErrorCode, type DecryptRsaOaepFailure, type DecryptRsaOaepResult, type DisplayTextType, type DistributionPoint, type DistributionPointName, type DnsServiceIdentityInput, type EcKeyAlgorithmInput, type EcNamedCurve, type Ed25519KeyAlgorithmInput, type EkuCheckFailure, type EkuCheckPurpose, type EkuCheckResult, type EncryptRsaOaepErrorCode, type EncryptRsaOaepFailure, type EncryptRsaOaepResult, type EncryptedPkcs8Options, type ErrorResult, type ExtendedKeyUsage, type ExtensionDecoder, type ExtensionDecoderMap, type ExtensionEncoderErrorCode, type GeneralName, type GeneralSubtree, type ImportEcKeyInput, type ImportEd25519KeyInput, type ImportEncryptedKeyErrorCode, type ImportEncryptedKeyFailure, type ImportEncryptedKeyOptions, type ImportEncryptedKeyResult, type ImportKeyErrorCode, type ImportKeyErrorDetails, type ImportKeyFailure, type ImportKeyReason, type ImportKeyResult, type ImportKeyStage, type ImportRsaKeyInput, type IndexedErrorResult, type IndexedMicro509Error, type InhibitAnyPolicy, type InitialNameConstraintsInput, type IpServiceIdentityInput, type IssuingDistributionPoint, type IssuingDistributionPointBase, type IssuingDistributionPointForAttributeCerts, type IssuingDistributionPointForCaCerts, type IssuingDistributionPointForUserCerts, type KdfLimitOptions, type KeyAlgorithmInput, type KeyPairMaterial, type KeyUsage, type LegacyPemEncryptionOptions, type MatchCertificatePrivateKeyErrorCode, type MatchCertificatePrivateKeyFailure, type MatchCertificatePrivateKeyFailureResult, type MatchCertificatePrivateKeyResult, type MatchCertificatePrivateKeySuccess, type MatchServiceIdentityErrorCode, type MatchServiceIdentityFailure, type MatchServiceIdentityFailureDetails, type MatchServiceIdentityFailureResult, type MatchServiceIdentityInput, type MatchServiceIdentityResult, type MatchServiceIdentitySuccess, type Micro509Error, type NameAttribute, type NameConstraintForm, type NameConstraints, type NameEncoderErrorCode, type NameFieldKey, type NameInput, type NameObject, type OcspCertStatus, type OcspCertificateSource, type OcspEncoderErrorCode, type OcspHashAlgorithm, type OcspRequestMaterial, type OcspRequestSource, type OcspResponderCandidate, type OcspResponderRevocationPolicy, type OcspResponderSource, type OcspResponseMaterial, type OcspResponseSource, type OcspResponseStatus, type OversizedDisplayText, type ParseCertificateChainResult, type ParseCertificateErrorCode, type ParseCertificateFailure, type ParseCertificateResult, type ParseCertificateRevocationListErrorCode, type ParseCertificateRevocationListFailure, type ParseCertificateRevocationListResult, type ParseCertificateSigningRequestErrorCode, type ParseCertificateSigningRequestFailure, type ParseCertificateSigningRequestResult, type ParseOcspRequestErrorCode, type ParseOcspRequestFailure, type ParseOcspRequestResult, type ParseOcspResponseErrorCode, type ParseOcspResponseFailure, type ParseOcspResponseResult, type ParseOptions, type ParsePfxErrorCode, type ParsePfxFailure, type ParsePfxOptions, type ParsePfxResult, type ParsePkcs12MacDataErrorCode, type ParsePkcs12MacDataFailure, type ParsePkcs12MacDataOptions, type ParsePkcs12MacDataResult, type ParsePkcs7CertBagResult, type ParsePkcs7ErrorCode, type ParsePkcs7Failure, type ParsePkcs7SignedDataResult, type ParsedBitFlags, type ParsedCertificate, type ParsedCertificateChoice, type ParsedCertificateRevocationList, type ParsedCertificateSigningRequest, type ParsedDistributionPoint, type ParsedDistributionPointName, type ParsedExtension, type ParsedIssuingDistributionPoint, type ParsedIssuingDistributionPointBase, type ParsedIssuingDistributionPointScope, type ParsedName, type ParsedNameAttribute, type ParsedNameConstraintForm, type ParsedOcspCertId, type ParsedOcspCertStatus, type ParsedOcspRequest, type ParsedOcspResponderId, type ParsedOcspResponse, type ParsedOcspSingleResponse, type ParsedPfx, type ParsedPfxAttribute, type ParsedPfxBag, type ParsedPfxBagAttributes, type ParsedPkcs12MacData, type ParsedPkcs7SignedData, type ParsedPkcs7SignerInfo, type ParsedPkcs7SignerInfoBase, type ParsedRelativeDistinguishedName, type ParsedRevocationReason, type ParsedRevokedCertificate, type ParsedSignerIdentifier, type Pbes2Parameters, type PemBlock, type PemDecodeResult, type PemErrorCode, type PemFailure, type PfxBagAttributesInput, type PfxCertificateBagInput, type PfxCertificateSource, type PfxEncoderErrorCode, type PfxEncryptionOptions, type PfxMaterial, type PfxPrivateKeyBagInput, type PfxPrivateKeySource, type Pkcs12MacOptions, type Pkcs7CertBagMaterial, type Pkcs7CertificateSource, type Pkcs7SignedDataMaterial, type Pkcs7Signer, type PolicyConstraints, type PolicyInformation, type PolicyMapping, type PolicyMappings, type PolicyQualifierInfo, type PolicyValidationInput, type PolicyValidationOutcome, type PrivateKeyImportInput, type PublicKeyImportInput, REVOCATION_INDETERMINATE_REASONS, REVOCATION_INDETERMINATE_REASON_CODES, type RelativeDistinguishedNameInput, type ResolveOcspResponderCandidatesInput, type Result, type ResultError, type RevocationCertificateSource, type RevocationCheckGoodValue, type RevocationCheckIndeterminateValue, type RevocationCheckRevokedValue, type RevocationCheckSkippedValue, type RevocationCrlEvidenceInput, type RevocationEvidenceInput, type RevocationEvidenceKind, type RevocationExecutionError, type RevocationIndeterminateEvidence, type RevocationIndeterminateReason, type RevocationIndeterminateReasonCode, type RevocationOcspEvidenceInput, type RevocationParseError, type RevocationPolicy, type RevocationProcessingError, type RevocationReason, type RevocationSkipReason, type RevocationSource, type RevocationStatus, type RevokedCertificateInput, type RsaHash, type RsaKeyAlgorithmInput, type RsaOaepOptions, type RsaScheme, type RsaSignatureScheme, type SelfSignedCertificateResult, type SelfSignedKeySource, type ServiceIdentityInput, type ServiceIdentityType, type SignatureVerifier, type SignatureVerifierInput, type SignatureVerifiers, type SplitPemBlocksResult, type SrvServiceIdentityInput, type SubjectAltName, type SubjectAltNameTextOptions, type SupersededDeltaCrlPolicy, type TrustAnchor, type TrustedOcspResponder, type UnrecognizedReasonCodePolicy, type UnrecognizedRevocationReason, type UriServiceIdentityInput, VERIFY_ERROR_CODES, type ValidateCandidatePathInput, type ValidateCandidatePathResult, type ValidateCandidatePathSuccess, type ValidateCertificateRevocationListFailure, type ValidateCertificateRevocationListInput, type ValidateCertificateRevocationListResult, type ValidateForCaInput, type ValidateForCodeSigningInput, type ValidateForTlsClientInput, type ValidateForTlsServerInput, type ValidateOcspResponseErrorCode, type ValidateOcspResponseFailure, type ValidateOcspResponseInput, type ValidateOcspResponseResult, type ValidityInput, type VerifiedCertificateChain, type VerifiedPkcs7Signer, type VerifiedPolicyOutcome, type VerifyCertificateChainInput, type VerifyCertificateRevocationListSignatureFailure, type VerifyCertificateRevocationListSignatureOptions, type VerifyCertificateRevocationListSignatureResult, type VerifyCertificateSigningRequestOptions, type VerifyChainFailure, type VerifyChainResult, type VerifyErrorCode, type VerifyFailureDetails, type VerifyFailureSource, type VerifyOcspResponseSignatureFailure, type VerifyOcspResponseSignatureOptions, type VerifyOcspResponseSignatureResult, type VerifyPkcs7SignedDataErrorCode, type VerifyPkcs7SignedDataFailure, type VerifyPkcs7SignedDataOptions, type VerifyPkcs7SignedDataResult, type VerifyPurpose, type VerifyRequestFailure, type VerifyRequestResult, buildCandidatePath, categorizePemBlocks, categorizePemBlocksOrThrow, certificateFingerprint, certificateMatchesPrivateKey, checkCertificateRevocation, checkCertificateRevocationAgainstCrl, checkChainRevocation, checkExtendedKeyUsage, compareDistinguishedNames, createCertificate, createCertificateRevocationList, createCertificateSigningRequest, createOcspRequest, createOcspResponse, createPfx, createPkcs7CertBag, createPkcs7SignedData, createSelfSignedCertificate, decodeExtension, decodeExtensionMap, decodeExtensions, decryptRsaOaep, decryptRsaOaepOrThrow, defineExtensionDecoder, defineExtensionDecoderMap, derivePublicKey, distinguishedNameToString, encryptRsaOaep, encryptRsaOaepOrThrow, exportBinaryBase64, exportEncryptedPkcs1Pem, exportEncryptedPkcs8Der, exportEncryptedPkcs8Pem, exportEncryptedSec1Pem, exportPkcs1Der, exportPkcs1Pem, exportPkcs8Der, exportPkcs8Pem, exportPrivateJwk, exportPublicJwk, exportSec1Der, exportSec1Pem, exportSpkiDer, exportSpkiPem, findExtension, generateKeyPair, getCertificateOcspResponderUris, getSubjectPublicKey, getSubjectPublicKeyOrThrow, hasOcspNoCheckExtension, importEncryptedPkcs1Pem, importEncryptedPkcs1PemOrThrow, importEncryptedPkcs8Der, importEncryptedPkcs8DerOrThrow, importEncryptedPkcs8Pem, importEncryptedPkcs8PemOrThrow, importEncryptedSec1Pem, importEncryptedSec1PemOrThrow, importPkcs1Der, importPkcs1DerOrThrow, importPkcs1Pem, importPkcs1PemOrThrow, importPkcs8Base64, importPkcs8Base64OrThrow, importPkcs8Der, importPkcs8DerOrThrow, importPkcs8Pem, importPkcs8PemOrThrow, importPrivateJwk, importPrivateJwkOrThrow, importPrivateKeyPem, importPrivateKeyPemOrThrow, importPublicJwk, importPublicJwkOrThrow, importSec1Der, importSec1DerOrThrow, importSec1Pem, importSec1PemOrThrow, importSpkiBase64, importSpkiBase64OrThrow, importSpkiDer, importSpkiDerOrThrow, importSpkiPem, importSpkiPemOrThrow, inspectEncryptedPkcs8Der, isCertificateRevoked, isResultError, isSelfIssued as isSelfIssuedCertificate, matchCertificatePrivateKey, matchCertificateServiceIdentity, matchServiceIdentity, parseCertificateChainPem, parseCertificateChainPemOrThrow, parseCertificateDer, parseCertificateDerOrThrow, parseCertificateFromSource, parseCertificatePem, parseCertificatePemOrThrow, parseCertificateRevocationListDer, parseCertificateRevocationListDerOrThrow, parseCertificateRevocationListPem, parseCertificateRevocationListPemOrThrow, parseCertificateSigningRequestDer, parseCertificateSigningRequestDerOrThrow, parseCertificateSigningRequestPem, parseCertificateSigningRequestPemOrThrow, parseCertificatesFromSource, parseDistinguishedNameDer, parseOcspRequestDer, parseOcspRequestDerOrThrow, parseOcspRequestPem, parseOcspRequestPemOrThrow, parseOcspResponseDer, parseOcspResponseDerOrThrow, parseOcspResponsePem, parseOcspResponsePemOrThrow, parsePfxDer, parsePfxPem, parsePkcs7CertBagDer, parsePkcs7CertBagPem, parsePkcs7SignedDataDer, parsePkcs7SignedDataPem, pemDecode, pemDecodeOrThrow, pemEncode, relativeDistinguishedNameToString, resolveOcspResponderCandidates, revocationReasonFromCode, splitPemBlocks, splitPemBlocksOrThrow, subjectAltNameLabel, subjectAltNameToString, subjectPublicKeyInfoFingerprint, trustAnchorFromCertificate, unwrap, unwrapOr, validateCandidatePath, validateCertificateRevocationList, validateForCa, validateForCodeSigning, validateForTlsClient, validateForTlsServer, validateOcspResponse, verifyCertificateChain, verifyCertificateRevocationListSignature, verifyCertificateSigningRequest, verifyOcspResponseSignature, verifyPkcs7SignedData };
package/dist/index.js CHANGED
@@ -1,19 +1,19 @@
1
- import { DECODE_REFUSAL_CODES as e, isResultError as t, unwrap as n, unwrapOr as r } from "./result/result.js";
2
- import { categorizePemBlocks as i, categorizePemBlocksOrThrow as a, pemDecode as o, pemDecodeOrThrow as s, pemEncode as c, splitPemBlocks as l, splitPemBlocksOrThrow as u } from "./pem/pem.js";
3
- import { decryptRsaOaep as d, decryptRsaOaepOrThrow as f, derivePublicKey as p, encryptRsaOaep as m, encryptRsaOaepOrThrow as h, exportBinaryBase64 as g, exportEncryptedPkcs1Pem as _, exportEncryptedPkcs8Der as v, exportEncryptedPkcs8Pem as y, exportEncryptedSec1Pem as b, exportPkcs1Der as x, exportPkcs1Pem as S, exportPkcs8Der as C, exportPkcs8Pem as w, exportPrivateJwk as T, exportPublicJwk as E, exportSec1Der as D, exportSec1Pem as O, exportSpkiDer as k, exportSpkiPem as A, generateKeyPair as j, importEncryptedPkcs1Pem as M, importEncryptedPkcs1PemOrThrow as N, importEncryptedPkcs8Der as P, importEncryptedPkcs8DerOrThrow as F, importEncryptedPkcs8Pem as I, importEncryptedPkcs8PemOrThrow as L, importEncryptedSec1Pem as R, importEncryptedSec1PemOrThrow as z, importPkcs1Der as B, importPkcs1DerOrThrow as V, importPkcs1Pem as H, importPkcs1PemOrThrow as U, importPkcs8Base64 as W, importPkcs8Base64OrThrow as G, importPkcs8Der as K, importPkcs8DerOrThrow as q, importPkcs8Pem as J, importPkcs8PemOrThrow as Y, importPrivateJwk as X, importPrivateJwkOrThrow as Z, importPublicJwk as Q, importPublicJwkOrThrow as $, importSec1Der as ee, importSec1DerOrThrow as te, importSec1Pem as ne, importSec1PemOrThrow as re, importSpkiBase64 as ie, importSpkiBase64OrThrow as ae, importSpkiDer as oe, importSpkiDerOrThrow as se, importSpkiPem as ce, importSpkiPemOrThrow as le, inspectEncryptedPkcs8Der as ue } from "./keys/keys.js";
4
- import { compareDistinguishedNames as de } from "./internal/shared/dn.js";
5
- import { certificateMatchesPrivateKey as fe, decodeExtension as pe, decodeExtensionMap as me, decodeExtensions as he, defineExtensionDecoder as ge, defineExtensionDecoderMap as _e, findExtension as ve, getSubjectPublicKey as ye, getSubjectPublicKeyOrThrow as be, matchCertificatePrivateKey as xe, parseCertificateChainPem as Se, parseCertificateChainPemOrThrow as Ce, parseCertificateDer as we, parseCertificateDerOrThrow as Te, parseCertificateFromSource as Ee, parseCertificatePem as De, parseCertificatePemOrThrow as Oe, parseCertificateSigningRequestDer as ke, parseCertificateSigningRequestDerOrThrow as Ae, parseCertificateSigningRequestPem as je, parseCertificateSigningRequestPemOrThrow as Me, parseCertificatesFromSource as Ne, parseDistinguishedNameDer as Pe } from "./x509/parse.js";
6
- import { createPfx as Fe, parsePfxDer as Ie, parsePfxPem as Le } from "./pkcs/pfx.js";
7
- import { createPkcs7CertBag as Re, createPkcs7SignedData as ze, parsePkcs7CertBagDer as Be, parsePkcs7CertBagPem as Ve, parsePkcs7SignedDataDer as He, parsePkcs7SignedDataPem as Ue, verifyPkcs7SignedData as We } from "./pkcs/pkcs7.js";
8
- import { checkCertificateRevocationAgainstCrl as Ge, createCertificateRevocationList as Ke, isCertificateRevoked as qe, parseCertificateRevocationListDer as Je, parseCertificateRevocationListDerOrThrow as Ye, parseCertificateRevocationListPem as Xe, parseCertificateRevocationListPemOrThrow as Ze, revocationReasonFromCode as Qe, validateCertificateRevocationList as $e, verifyCertificateRevocationListSignature as et } from "./revocation/crl.js";
9
- import { isSelfIssued as tt } from "./internal/verify/verify-path.js";
10
- import { matchCertificateServiceIdentity as nt, matchServiceIdentity as rt } from "./verify/identity.js";
11
- import { VERIFY_ERROR_CODES as it, buildCandidatePath as at, checkExtendedKeyUsage as ot, trustAnchorFromCertificate as st, validateCandidatePath as ct, validateForCa as lt, validateForCodeSigning as ut, validateForTlsClient as dt, validateForTlsServer as ft, verifyCertificateChain as pt, verifyCertificateSigningRequest as mt } from "./verify/verify.js";
12
- import { createOcspRequest as ht, createOcspResponse as gt, hasOcspNoCheckExtension as _t, parseOcspRequestDer as vt, parseOcspRequestDerOrThrow as yt, parseOcspRequestPem as bt, parseOcspRequestPemOrThrow as xt, parseOcspResponseDer as St, parseOcspResponseDerOrThrow as Ct, parseOcspResponsePem as wt, parseOcspResponsePemOrThrow as Tt, validateOcspResponse as Et, verifyOcspResponseSignature as Dt } from "./revocation/ocsp.js";
13
- import { REVOCATION_INDETERMINATE_REASONS as Ot, checkChainRevocation as kt } from "./revocation/chain.js";
14
- import { REVOCATION_INDETERMINATE_REASON_CODES as At, checkCertificateRevocation as jt, getCertificateOcspResponderUris as Mt, resolveOcspResponderCandidates as Nt } from "./revocation/revocation.js";
15
- import { createCertificate as Pt, createSelfSignedCertificate as Ft } from "./x509/certificate.js";
16
- import { createCertificateSigningRequest as It } from "./x509/csr.js";
17
- import { certificateFingerprint as Lt, subjectPublicKeyInfoFingerprint as Rt } from "./x509/fingerprint.js";
18
- import { distinguishedNameToString as zt, relativeDistinguishedNameToString as Bt, subjectAltNameLabel as Vt, subjectAltNameToString as Ht } from "./x509/name-text.js";
19
- export { e as DECODE_REFUSAL_CODES, Ot as REVOCATION_INDETERMINATE_REASONS, At as REVOCATION_INDETERMINATE_REASON_CODES, it as VERIFY_ERROR_CODES, at as buildCandidatePath, i as categorizePemBlocks, a as categorizePemBlocksOrThrow, Lt as certificateFingerprint, fe as certificateMatchesPrivateKey, jt as checkCertificateRevocation, Ge as checkCertificateRevocationAgainstCrl, kt as checkChainRevocation, ot as checkExtendedKeyUsage, de as compareDistinguishedNames, Pt as createCertificate, Ke as createCertificateRevocationList, It as createCertificateSigningRequest, ht as createOcspRequest, gt as createOcspResponse, Fe as createPfx, Re as createPkcs7CertBag, ze as createPkcs7SignedData, Ft as createSelfSignedCertificate, pe as decodeExtension, me as decodeExtensionMap, he as decodeExtensions, d as decryptRsaOaep, f as decryptRsaOaepOrThrow, ge as defineExtensionDecoder, _e as defineExtensionDecoderMap, p as derivePublicKey, zt as distinguishedNameToString, m as encryptRsaOaep, h as encryptRsaOaepOrThrow, g as exportBinaryBase64, _ as exportEncryptedPkcs1Pem, v as exportEncryptedPkcs8Der, y as exportEncryptedPkcs8Pem, b as exportEncryptedSec1Pem, x as exportPkcs1Der, S as exportPkcs1Pem, C as exportPkcs8Der, w as exportPkcs8Pem, T as exportPrivateJwk, E as exportPublicJwk, D as exportSec1Der, O as exportSec1Pem, k as exportSpkiDer, A as exportSpkiPem, ve as findExtension, j as generateKeyPair, Mt as getCertificateOcspResponderUris, ye as getSubjectPublicKey, be as getSubjectPublicKeyOrThrow, _t as hasOcspNoCheckExtension, M as importEncryptedPkcs1Pem, N as importEncryptedPkcs1PemOrThrow, P as importEncryptedPkcs8Der, F as importEncryptedPkcs8DerOrThrow, I as importEncryptedPkcs8Pem, L as importEncryptedPkcs8PemOrThrow, R as importEncryptedSec1Pem, z as importEncryptedSec1PemOrThrow, B as importPkcs1Der, V as importPkcs1DerOrThrow, H as importPkcs1Pem, U as importPkcs1PemOrThrow, W as importPkcs8Base64, G as importPkcs8Base64OrThrow, K as importPkcs8Der, q as importPkcs8DerOrThrow, J as importPkcs8Pem, Y as importPkcs8PemOrThrow, X as importPrivateJwk, Z as importPrivateJwkOrThrow, Q as importPublicJwk, $ as importPublicJwkOrThrow, ee as importSec1Der, te as importSec1DerOrThrow, ne as importSec1Pem, re as importSec1PemOrThrow, ie as importSpkiBase64, ae as importSpkiBase64OrThrow, oe as importSpkiDer, se as importSpkiDerOrThrow, ce as importSpkiPem, le as importSpkiPemOrThrow, ue as inspectEncryptedPkcs8Der, qe as isCertificateRevoked, t as isResultError, tt as isSelfIssuedCertificate, xe as matchCertificatePrivateKey, nt as matchCertificateServiceIdentity, rt as matchServiceIdentity, Se as parseCertificateChainPem, Ce as parseCertificateChainPemOrThrow, we as parseCertificateDer, Te as parseCertificateDerOrThrow, Ee as parseCertificateFromSource, De as parseCertificatePem, Oe as parseCertificatePemOrThrow, Je as parseCertificateRevocationListDer, Ye as parseCertificateRevocationListDerOrThrow, Xe as parseCertificateRevocationListPem, Ze as parseCertificateRevocationListPemOrThrow, ke as parseCertificateSigningRequestDer, Ae as parseCertificateSigningRequestDerOrThrow, je as parseCertificateSigningRequestPem, Me as parseCertificateSigningRequestPemOrThrow, Ne as parseCertificatesFromSource, Pe as parseDistinguishedNameDer, vt as parseOcspRequestDer, yt as parseOcspRequestDerOrThrow, bt as parseOcspRequestPem, xt as parseOcspRequestPemOrThrow, St as parseOcspResponseDer, Ct as parseOcspResponseDerOrThrow, wt as parseOcspResponsePem, Tt as parseOcspResponsePemOrThrow, Ie as parsePfxDer, Le as parsePfxPem, Be as parsePkcs7CertBagDer, Ve as parsePkcs7CertBagPem, He as parsePkcs7SignedDataDer, Ue as parsePkcs7SignedDataPem, o as pemDecode, s as pemDecodeOrThrow, c as pemEncode, Bt as relativeDistinguishedNameToString, Nt as resolveOcspResponderCandidates, Qe as revocationReasonFromCode, l as splitPemBlocks, u as splitPemBlocksOrThrow, Vt as subjectAltNameLabel, Ht as subjectAltNameToString, Rt as subjectPublicKeyInfoFingerprint, st as trustAnchorFromCertificate, n as unwrap, r as unwrapOr, ct as validateCandidatePath, $e as validateCertificateRevocationList, lt as validateForCa, ut as validateForCodeSigning, dt as validateForTlsClient, ft as validateForTlsServer, Et as validateOcspResponse, pt as verifyCertificateChain, et as verifyCertificateRevocationListSignature, mt as verifyCertificateSigningRequest, Dt as verifyOcspResponseSignature, We as verifyPkcs7SignedData };
1
+ import { decryptRsaOaep as e, decryptRsaOaepOrThrow as t, derivePublicKey as n, encryptRsaOaep as r, encryptRsaOaepOrThrow as i, exportBinaryBase64 as a, exportEncryptedPkcs1Pem as o, exportEncryptedPkcs8Der as s, exportEncryptedPkcs8Pem as c, exportEncryptedSec1Pem as l, exportPkcs1Der as u, exportPkcs1Pem as d, exportPkcs8Der as f, exportPkcs8Pem as p, exportPrivateJwk as m, exportPublicJwk as h, exportSec1Der as g, exportSec1Pem as _, exportSpkiDer as v, exportSpkiPem as y, generateKeyPair as b, importEncryptedPkcs1Pem as x, importEncryptedPkcs1PemOrThrow as S, importEncryptedPkcs8Der as C, importEncryptedPkcs8DerOrThrow as w, importEncryptedPkcs8Pem as T, importEncryptedPkcs8PemOrThrow as E, importEncryptedSec1Pem as D, importEncryptedSec1PemOrThrow as O, importPkcs1Der as k, importPkcs1DerOrThrow as A, importPkcs1Pem as j, importPkcs1PemOrThrow as M, importPkcs8Base64 as N, importPkcs8Base64OrThrow as P, importPkcs8Der as F, importPkcs8DerOrThrow as I, importPkcs8Pem as L, importPkcs8PemOrThrow as R, importPrivateJwk as z, importPrivateJwkOrThrow as B, importPrivateKeyPem as V, importPrivateKeyPemOrThrow as H, importPublicJwk as U, importPublicJwkOrThrow as W, importSec1Der as G, importSec1DerOrThrow as K, importSec1Pem as q, importSec1PemOrThrow as J, importSpkiBase64 as Y, importSpkiBase64OrThrow as X, importSpkiDer as Z, importSpkiDerOrThrow as Q, importSpkiPem as $, importSpkiPemOrThrow as ee, inspectEncryptedPkcs8Der as te } from "./keys/keys.js";
2
+ import { categorizePemBlocks as ne, categorizePemBlocksOrThrow as re, pemDecode as ie, pemDecodeOrThrow as ae, pemEncode as oe, splitPemBlocks as se, splitPemBlocksOrThrow as ce } from "./pem/pem.js";
3
+ import { createPfx as le, parsePfxDer as ue, parsePfxPem as de } from "./pkcs/pfx.js";
4
+ import { createPkcs7CertBag as fe, createPkcs7SignedData as pe, parsePkcs7CertBagDer as me, parsePkcs7CertBagPem as he, parsePkcs7SignedDataDer as ge, parsePkcs7SignedDataPem as _e, verifyPkcs7SignedData as ve } from "./pkcs/pkcs7.js";
5
+ import { DECODE_REFUSAL_CODES as ye, isResultError as be, unwrap as xe, unwrapOr as Se } from "./result/result.js";
6
+ import { REVOCATION_INDETERMINATE_REASON_CODES as Ce, checkCertificateRevocation as we, getCertificateOcspResponderUris as Te, resolveOcspResponderCandidates as Ee } from "./revocation/revocation.js";
7
+ import { checkCertificateRevocationAgainstCrl as De, createCertificateRevocationList as Oe, isCertificateRevoked as ke, parseCertificateRevocationListDer as Ae, parseCertificateRevocationListDerOrThrow as je, parseCertificateRevocationListPem as Me, parseCertificateRevocationListPemOrThrow as Ne, revocationReasonFromCode as Pe, validateCertificateRevocationList as Fe, verifyCertificateRevocationListSignature as Ie } from "./revocation/crl.js";
8
+ import { REVOCATION_INDETERMINATE_REASONS as Le, checkChainRevocation as Re } from "./revocation/chain.js";
9
+ import { createOcspRequest as ze, createOcspResponse as Be, hasOcspNoCheckExtension as Ve, parseOcspRequestDer as He, parseOcspRequestDerOrThrow as Ue, parseOcspRequestPem as We, parseOcspRequestPemOrThrow as Ge, parseOcspResponseDer as Ke, parseOcspResponseDerOrThrow as qe, parseOcspResponsePem as Je, parseOcspResponsePemOrThrow as Ye, validateOcspResponse as Xe, verifyOcspResponseSignature as Ze } from "./revocation/ocsp.js";
10
+ import { VERIFY_ERROR_CODES as Qe, buildCandidatePath as $e, checkExtendedKeyUsage as et, trustAnchorFromCertificate as tt, validateCandidatePath as nt, validateForCa as rt, validateForCodeSigning as it, validateForTlsClient as at, validateForTlsServer as ot, verifyCertificateChain as st, verifyCertificateSigningRequest as ct } from "./verify/verify.js";
11
+ import { isSelfIssued as lt } from "./internal/verify/verify-path.js";
12
+ import { matchCertificateServiceIdentity as ut, matchServiceIdentity as dt } from "./verify/identity.js";
13
+ import { certificateFingerprint as ft, subjectPublicKeyInfoFingerprint as pt } from "./x509/fingerprint.js";
14
+ import { certificateMatchesPrivateKey as mt, decodeExtension as ht, decodeExtensionMap as gt, decodeExtensions as _t, defineExtensionDecoder as vt, defineExtensionDecoderMap as yt, findExtension as bt, getSubjectPublicKey as xt, getSubjectPublicKeyOrThrow as St, matchCertificatePrivateKey as Ct, parseCertificateChainPem as wt, parseCertificateChainPemOrThrow as Tt, parseCertificateDer as Et, parseCertificateDerOrThrow as Dt, parseCertificateFromSource as Ot, parseCertificatePem as kt, parseCertificatePemOrThrow as At, parseCertificateSigningRequestDer as jt, parseCertificateSigningRequestDerOrThrow as Mt, parseCertificateSigningRequestPem as Nt, parseCertificateSigningRequestPemOrThrow as Pt, parseCertificatesFromSource as Ft, parseDistinguishedNameDer as It } from "./x509/parse.js";
15
+ import { compareDistinguishedNames as Lt } from "./internal/shared/dn.js";
16
+ import { createCertificate as Rt, createSelfSignedCertificate as zt } from "./x509/certificate.js";
17
+ import { createCertificateSigningRequest as Bt } from "./x509/csr.js";
18
+ import { distinguishedNameToString as Vt, relativeDistinguishedNameToString as Ht, subjectAltNameLabel as Ut, subjectAltNameToString as Wt } from "./x509/name-text.js";
19
+ export { ye as DECODE_REFUSAL_CODES, Le as REVOCATION_INDETERMINATE_REASONS, Ce as REVOCATION_INDETERMINATE_REASON_CODES, Qe as VERIFY_ERROR_CODES, $e as buildCandidatePath, ne as categorizePemBlocks, re as categorizePemBlocksOrThrow, ft as certificateFingerprint, mt as certificateMatchesPrivateKey, we as checkCertificateRevocation, De as checkCertificateRevocationAgainstCrl, Re as checkChainRevocation, et as checkExtendedKeyUsage, Lt as compareDistinguishedNames, Rt as createCertificate, Oe as createCertificateRevocationList, Bt as createCertificateSigningRequest, ze as createOcspRequest, Be as createOcspResponse, le as createPfx, fe as createPkcs7CertBag, pe as createPkcs7SignedData, zt as createSelfSignedCertificate, ht as decodeExtension, gt as decodeExtensionMap, _t as decodeExtensions, e as decryptRsaOaep, t as decryptRsaOaepOrThrow, vt as defineExtensionDecoder, yt as defineExtensionDecoderMap, n as derivePublicKey, Vt as distinguishedNameToString, r as encryptRsaOaep, i as encryptRsaOaepOrThrow, a as exportBinaryBase64, o as exportEncryptedPkcs1Pem, s as exportEncryptedPkcs8Der, c as exportEncryptedPkcs8Pem, l as exportEncryptedSec1Pem, u as exportPkcs1Der, d as exportPkcs1Pem, f as exportPkcs8Der, p as exportPkcs8Pem, m as exportPrivateJwk, h as exportPublicJwk, g as exportSec1Der, _ as exportSec1Pem, v as exportSpkiDer, y as exportSpkiPem, bt as findExtension, b as generateKeyPair, Te as getCertificateOcspResponderUris, xt as getSubjectPublicKey, St as getSubjectPublicKeyOrThrow, Ve as hasOcspNoCheckExtension, x as importEncryptedPkcs1Pem, S as importEncryptedPkcs1PemOrThrow, C as importEncryptedPkcs8Der, w as importEncryptedPkcs8DerOrThrow, T as importEncryptedPkcs8Pem, E as importEncryptedPkcs8PemOrThrow, D as importEncryptedSec1Pem, O as importEncryptedSec1PemOrThrow, k as importPkcs1Der, A as importPkcs1DerOrThrow, j as importPkcs1Pem, M as importPkcs1PemOrThrow, N as importPkcs8Base64, P as importPkcs8Base64OrThrow, F as importPkcs8Der, I as importPkcs8DerOrThrow, L as importPkcs8Pem, R as importPkcs8PemOrThrow, z as importPrivateJwk, B as importPrivateJwkOrThrow, V as importPrivateKeyPem, H as importPrivateKeyPemOrThrow, U as importPublicJwk, W as importPublicJwkOrThrow, G as importSec1Der, K as importSec1DerOrThrow, q as importSec1Pem, J as importSec1PemOrThrow, Y as importSpkiBase64, X as importSpkiBase64OrThrow, Z as importSpkiDer, Q as importSpkiDerOrThrow, $ as importSpkiPem, ee as importSpkiPemOrThrow, te as inspectEncryptedPkcs8Der, ke as isCertificateRevoked, be as isResultError, lt as isSelfIssuedCertificate, Ct as matchCertificatePrivateKey, ut as matchCertificateServiceIdentity, dt as matchServiceIdentity, wt as parseCertificateChainPem, Tt as parseCertificateChainPemOrThrow, Et as parseCertificateDer, Dt as parseCertificateDerOrThrow, Ot as parseCertificateFromSource, kt as parseCertificatePem, At as parseCertificatePemOrThrow, Ae as parseCertificateRevocationListDer, je as parseCertificateRevocationListDerOrThrow, Me as parseCertificateRevocationListPem, Ne as parseCertificateRevocationListPemOrThrow, jt as parseCertificateSigningRequestDer, Mt as parseCertificateSigningRequestDerOrThrow, Nt as parseCertificateSigningRequestPem, Pt as parseCertificateSigningRequestPemOrThrow, Ft as parseCertificatesFromSource, It as parseDistinguishedNameDer, He as parseOcspRequestDer, Ue as parseOcspRequestDerOrThrow, We as parseOcspRequestPem, Ge as parseOcspRequestPemOrThrow, Ke as parseOcspResponseDer, qe as parseOcspResponseDerOrThrow, Je as parseOcspResponsePem, Ye as parseOcspResponsePemOrThrow, ue as parsePfxDer, de as parsePfxPem, me as parsePkcs7CertBagDer, he as parsePkcs7CertBagPem, ge as parsePkcs7SignedDataDer, _e as parsePkcs7SignedDataPem, ie as pemDecode, ae as pemDecodeOrThrow, oe as pemEncode, Ht as relativeDistinguishedNameToString, Ee as resolveOcspResponderCandidates, Pe as revocationReasonFromCode, se as splitPemBlocks, ce as splitPemBlocksOrThrow, Ut as subjectAltNameLabel, Wt as subjectAltNameToString, pt as subjectPublicKeyInfoFingerprint, tt as trustAnchorFromCertificate, xe as unwrap, Se as unwrapOr, nt as validateCandidatePath, Fe as validateCertificateRevocationList, rt as validateForCa, it as validateForCodeSigning, at as validateForTlsClient, ot as validateForTlsServer, Xe as validateOcspResponse, st as verifyCertificateChain, Ie as verifyCertificateRevocationListSignature, ct as verifyCertificateSigningRequest, Ze as verifyOcspResponseSignature, ve as verifyPkcs7SignedData };
@@ -13,5 +13,4 @@ export interface DerBitString {
13
13
  * Converts a hex string (even or odd length) to a {@linkcode Uint8Array}.
14
14
  * Odd-length strings are left-padded with a zero nibble.
15
15
  */
16
- export declare function hexToBytes(value: string): Uint8Array;
17
- //# sourceMappingURL=asn1.d.ts.map
16
+ export declare function hexToBytes(value: string): Uint8Array;
@@ -91,7 +91,7 @@ function extractBitStringValue(e) {
91
91
  if (e.tag !== 3) throw Error("Expected BIT STRING");
92
92
  let t = e.value[0];
93
93
  if (t === void 0 || t > 7) throw Error("Invalid BIT STRING");
94
- if (t !== 0) throw Error("BIT STRING must have zero unused bits");
94
+ if (t !== 0) throw Error("BIT STRING value is not a whole number of octets");
95
95
  return e.value.slice(1);
96
96
  }
97
97
  /**
@@ -116,6 +116,14 @@ function decodeBitString(e) {
116
116
  nonZeroPadding: t > 0 && n.length > 0 && ((n[n.length - 1] ?? 0) & r) !== 0
117
117
  };
118
118
  }
119
+ /** A signed object's `signatureValue` BIT STRING as its octets and unused-bit count. */
120
+ function signatureBits(e) {
121
+ let { bytes: t, unusedBits: n } = decodeBitString(e);
122
+ return {
123
+ signatureValue: t,
124
+ signatureValueUnusedBits: n
125
+ };
126
+ }
119
127
  /**
120
128
  * Parses a {@linkcode DerElement} with tag UTCTime (`0x17`) or GeneralizedTime (`0x18`) into a {@linkcode Date}.
121
129
  *
@@ -577,6 +585,6 @@ const h = /* @__PURE__ */ new Map([
577
585
  function checkUniversalElement(e) {
578
586
  return e.tag & 192 ? "valid" : (e.tag & 31) == 31 ? e.tagNumber <= 36 ? "unsupported" : "malformed" : h.get(e.tag)?.(e) ?? "malformed";
579
587
  }
580
- export { canonicalizeOid, checkStrictDer, childrenOf, decodeBitString, decodeBoolean, decodeIntegerMagnitude, decodeIntegerNumber, decodeNonNegativeIntegerBigInt, decodeNonNegativeIntegerNumber, decodeObjectIdentifier, decodeString, decodeVisibleString, extractBitStringValue, hexToBytes, isNumericStringContents, parseTime, requireElement, toArrayBuffer, toHex };
588
+ export { canonicalizeOid, checkStrictDer, childrenOf, decodeBitString, decodeBoolean, decodeIntegerMagnitude, decodeIntegerNumber, decodeNonNegativeIntegerBigInt, decodeNonNegativeIntegerNumber, decodeObjectIdentifier, decodeString, decodeVisibleString, extractBitStringValue, hexToBytes, isNumericStringContents, parseTime, requireElement, signatureBits, toArrayBuffer, toHex };
581
589
 
582
590
  //# sourceMappingURL=asn1.js.map