@vizamodo/aws-sts-core 0.4.22 → 0.4.23
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/dist/sts/issue.js +4 -0
- package/package.json +1 -1
package/dist/sts/issue.js
CHANGED
|
@@ -194,13 +194,17 @@ function parseCertSerialDec(normalizedCertBase64) {
|
|
|
194
194
|
throw new Error("bad tbs");
|
|
195
195
|
readLen(p);
|
|
196
196
|
// Skip optional [0] EXPLICIT version field.
|
|
197
|
+
const p0_before = p[0];
|
|
197
198
|
if (der[p[0]] === 0xa0) {
|
|
198
199
|
p[0]++;
|
|
199
200
|
p[0] += readLen(p);
|
|
200
201
|
}
|
|
202
|
+
const p0_after = p[0];
|
|
203
|
+
console.debug("[parser-v2]", { p0_before, p0_after, nextTag: der[p[0]]?.toString(16) });
|
|
201
204
|
if (der[p[0]++] !== 0x02)
|
|
202
205
|
throw new Error("bad serial tag");
|
|
203
206
|
const serialLen = readLen(p);
|
|
207
|
+
console.debug("[parser-v2-serial]", { serialLen, firstByte: der[p[0]]?.toString(16) });
|
|
204
208
|
if (p[0] + serialLen > der.length)
|
|
205
209
|
throw new Error("DER overflow");
|
|
206
210
|
let serial = der.slice(p[0], p[0] + serialLen);
|