@blamejs/pki 0.5.9 → 0.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +80 -19
- package/README.md +1 -1
- package/lib/acme.js +5 -5
- package/lib/asn1-der.js +1 -1
- package/lib/attrcert-sign.js +1 -1
- package/lib/cbor-det.js +4 -4
- package/lib/cmc-build.js +5 -5
- package/lib/cmc-verify.js +14 -11
- package/lib/cms-decrypt.js +2 -2
- package/lib/cms-sign.js +3 -5
- package/lib/cms-verify.js +9 -6
- package/lib/constants.js +1 -1
- package/lib/crl-sign.js +1 -1
- package/lib/crmf-sign.js +1 -1
- package/lib/ct.js +8 -5
- package/lib/est.js +20 -14
- package/lib/guard-all.js +12 -12
- package/lib/guard-bytes.js +568 -82
- package/lib/guard-compress.js +2 -2
- package/lib/guard-der.js +1 -1
- package/lib/guard-identifier.js +694 -6
- package/lib/guard-limits.js +2 -2
- package/lib/guard-parsed.js +10 -6
- package/lib/guard-range.js +1 -1
- package/lib/guard-secret.js +1 -1
- package/lib/guard-text.js +1 -1
- package/lib/guard-time.js +65 -4
- package/lib/hpke.js +1 -1
- package/lib/http-digest.js +1 -1
- package/lib/inspect.js +8 -3
- package/lib/jose.js +1 -1
- package/lib/key.js +48 -6
- package/lib/lint.js +15 -8
- package/lib/ocsp-verify.js +10 -4
- package/lib/ocsp.js +35 -6
- package/lib/oid.js +1 -1
- package/lib/path-validate.js +99 -22
- package/lib/schema-c509.js +5 -5
- package/lib/schema-cmp.js +1 -1
- package/lib/schema-crl.js +1 -1
- package/lib/schema-engine.js +2 -2
- package/lib/schema-pkix.js +1 -1
- package/lib/sigstore.js +6 -2
- package/lib/smime.js +1 -1
- package/lib/trust.js +2 -2
- package/lib/tsp-sign.js +2 -2
- package/lib/validator-attcert.js +3 -3
- package/lib/validator-cose.js +3 -3
- package/lib/webauthn-mds.js +17 -17
- package/lib/webauthn.js +12 -12
- package/lib/webcrypto.js +16 -7
- package/lib/x509-sign.js +1 -1
- package/package.json +4 -2
- package/sbom.cdx.json +6 -6
package/lib/guard-compress.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
// unboundedly many encodings, and a digest over the compressed object would
|
|
23
23
|
// stop identifying what it decompresses to.
|
|
24
24
|
//
|
|
25
|
-
// Both
|
|
25
|
+
// Both defenses are applied here, once, for every algorithm, so a new consumer
|
|
26
26
|
// cannot pick up one and miss the other. Verified uniform across zlib, brotli
|
|
27
27
|
// and zstd: each reports consumed input as `engine.bytesWritten` under
|
|
28
28
|
// `info: true`, each raises ERR_BUFFER_TOO_LARGE on a cap breach, and each
|
|
@@ -125,7 +125,7 @@ function bounded(algorithm, stream, cap, E, codes, label) {
|
|
|
125
125
|
throw new TypeError("guard.compress.bounded: stream must be a Buffer (route the input through guard.bytes.view first)");
|
|
126
126
|
}
|
|
127
127
|
// The ceiling is an authoring input: an undefined / NaN / fractional / negative
|
|
128
|
-
// cap would silently disable the bomb
|
|
128
|
+
// cap would silently disable the bomb defense. It must also be at least 1 --
|
|
129
129
|
// node rejects maxOutputLength 0 with a different fault than a cap breach, so a
|
|
130
130
|
// zero cap would surface as a malformed-stream verdict instead of a config error.
|
|
131
131
|
if (!Number.isInteger(cap) || cap < 1) {
|
package/lib/guard-der.js
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
// Every entry point takes the CALLER's error factory and code, so a c509 splice reports in
|
|
27
27
|
// the c509 domain and a certificate builder in the x509 domain.
|
|
28
28
|
// asn1-der composes this guard family, so requiring the codec at module scope would read its
|
|
29
|
-
// exports mid-
|
|
29
|
+
// exports mid-initialization and see an empty object. The require and the table it builds are
|
|
30
30
|
// therefore both deferred to first use -- the documented circular-load exception to top-of-file
|
|
31
31
|
// requires. Guards sit BELOW the codec in the dependency order; this is the one place that
|
|
32
32
|
// order is inverted, and it is inverted lazily.
|