mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Fix test
This commit is contained in:
parent
f61f09a940
commit
bfbec81698
2 changed files with 3 additions and 3 deletions
|
|
@ -177,13 +177,13 @@ export async function installSafeChainCA() {
|
||||||
if (result.status !== 0) {
|
if (result.status !== 0) {
|
||||||
throw new Error(`Failed to install CA certificate into user trust store (exit code ${result.status}).`);
|
throw new Error(`Failed to install CA certificate into user trust store (exit code ${result.status}).`);
|
||||||
}
|
}
|
||||||
ui.writeVerbose("Safe-chain: CA certificate installed in user trust settings (no admin prompt).");
|
ui.writeVerbose("Safe-chain: CA certificate was installed in user trust settings.");
|
||||||
} else if (platform === OS_LINUX) {
|
} else if (platform === OS_LINUX) {
|
||||||
// Linux: use update-ca-certificates
|
// Linux: use update-ca-certificates
|
||||||
await safeSpawn("sudo", ["cp", caPath, LINUX_CA_PATH], { stdio: "inherit" });
|
await safeSpawn("sudo", ["cp", caPath, LINUX_CA_PATH], { stdio: "inherit" });
|
||||||
await safeSpawn("sudo", ["update-ca-certificates"], { stdio: "inherit" });
|
await safeSpawn("sudo", ["update-ca-certificates"], { stdio: "inherit" });
|
||||||
} else if (platform === OS_WINDOWS) {
|
} else if (platform === OS_WINDOWS) {
|
||||||
// Windows: use certutil (with UAC elevation prompt)
|
// Windows: use certutil (will cause UAC elevation prompt)
|
||||||
const psCommand = `Start-Process -FilePath certutil -ArgumentList '-addstore','-f','Root','${caPath}' -Verb RunAs -Wait`;
|
const psCommand = `Start-Process -FilePath certutil -ArgumentList '-addstore','-f','Root','${caPath}' -Verb RunAs -Wait`;
|
||||||
await safeSpawn("powershell", ["-Command", psCommand], { stdio: "inherit" });
|
await safeSpawn("powershell", ["-Command", psCommand], { stdio: "inherit" });
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -266,7 +266,7 @@ describe("E2E: pip coverage", () => {
|
||||||
// Should NOT contain SSL or certificate errors
|
// Should NOT contain SSL or certificate errors
|
||||||
assert.ok(
|
assert.ok(
|
||||||
!result.output.match(
|
!result.output.match(
|
||||||
/SSL|certificate verify failed|CERTIFICATE_VERIFY_FAILED/i
|
/certificate verify failed|CERTIFICATE_VERIFY_FAILED/i
|
||||||
),
|
),
|
||||||
`Should not have SSL/certificate errors. Output was:\n${result.output}`
|
`Should not have SSL/certificate errors. Output was:\n${result.output}`
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue