* Test signing with CA-signed certificate
()
| 352 | * Test signing with CA-signed certificate |
| 353 | */ |
| 354 | async function testCASignedSigning() { |
| 355 | // Create a copy for this test |
| 356 | const testFile = path.join(TEST_DIR, "test-ca-signed.dxt"); |
| 357 | fs.copyFileSync(TEST_MCPB, testFile); |
| 358 | |
| 359 | // Sign the file with intermediate |
| 360 | expect(() => |
| 361 | signMcpbFile(testFile, SIGNED_CERT, SIGNED_KEY, [CA_CERT]), |
| 362 | ).not.toThrow(); |
| 363 | |
| 364 | // Verify the signature |
| 365 | const result = await verifyMcpbFile(testFile); |
| 366 | |
| 367 | // CA-signed status depends on whether test CA is trusted by OS |
| 368 | expect(["signed", "unsigned"]).toContain(result.status); |
| 369 | |
| 370 | // Clean up |
| 371 | fs.unlinkSync(testFile); |
| 372 | } |
| 373 | |
| 374 | /** |
| 375 | * Test tampering detection |
no test coverage detected
searching dependent graphs…