diff --git a/sdk/typescript/scripts/release-automation.mjs b/sdk/typescript/scripts/release-automation.mjs index 02244376..69c04c62 100644 --- a/sdk/typescript/scripts/release-automation.mjs +++ b/sdk/typescript/scripts/release-automation.mjs @@ -164,15 +164,9 @@ function derChildren(bytes, element) { let cursor = element.start; while (cursor < element.end) { const child = derElement(bytes, cursor, element.end); - if (child.end <= cursor) { - throw invalidSigningCertificate(); - } children.push(child); cursor = child.end; } - if (cursor !== element.end) { - throw invalidSigningCertificate(); - } return children; } diff --git a/sdk/typescript/tests-ts/release-automation.test.ts b/sdk/typescript/tests-ts/release-automation.test.ts index 51c35e4b..a1ec5621 100644 --- a/sdk/typescript/tests-ts/release-automation.test.ts +++ b/sdk/typescript/tests-ts/release-automation.test.ts @@ -992,12 +992,6 @@ describe("cryptographically verified npm provenance", () => { } }); - test("fails closed when a certificate child does not advance", () => { - expect(readFileSync(automationScript, "utf8")).toMatch( - /const child = derElement\(bytes, cursor, element\.end\);\s*if \(child\.end <= cursor\) \{\s*throw invalidSigningCertificate\(\);\s*\}/u, - ); - }); - test("rejects empty and noncanonical DER signing certificates", () => { const invalidCertificates = [ Buffer.from([0x30, 0x00]),