Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions sdk/typescript/scripts/release-automation.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
6 changes: 0 additions & 6 deletions sdk/typescript/tests-ts/release-automation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]),
Expand Down
Loading