mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 20:20:49 +00:00
Some more cleanup
This commit is contained in:
parent
b0e716b7f2
commit
2b1bf4e728
2 changed files with 5 additions and 4 deletions
|
|
@ -40,8 +40,5 @@ export const LOGGING_SILENT = "silent";
|
||||||
export const LOGGING_NORMAL = "normal";
|
export const LOGGING_NORMAL = "normal";
|
||||||
export const LOGGING_VERBOSE = "verbose";
|
export const LOGGING_VERBOSE = "verbose";
|
||||||
|
|
||||||
// OS trust store paths
|
|
||||||
export const DARWIN_CA_PATH = "/Library/Keychains/System.keychain";
|
|
||||||
export const LINUX_CA_PATH = "/usr/local/share/ca-certificates/safe-chain-ca.crt";
|
|
||||||
export const SAFE_CHAIN_CA_COMMON_NAME = "safe-chain proxy";
|
export const SAFE_CHAIN_CA_COMMON_NAME = "safe-chain proxy";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import path from "path";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import os from "os";
|
import os from "os";
|
||||||
import { safeSpawn } from "../utils/safeSpawn.js";
|
import { safeSpawn } from "../utils/safeSpawn.js";
|
||||||
import { DARWIN_CA_PATH, LINUX_CA_PATH, SAFE_CHAIN_CA_COMMON_NAME } from "../config/settings.js";
|
import { SAFE_CHAIN_CA_COMMON_NAME } from "../config/settings.js";
|
||||||
import { ui } from "../environment/userInteraction.js";
|
import { ui } from "../environment/userInteraction.js";
|
||||||
|
|
||||||
const certFolder = path.join(os.homedir(), ".safe-chain", "certs");
|
const certFolder = path.join(os.homedir(), ".safe-chain", "certs");
|
||||||
|
|
@ -16,6 +16,10 @@ const OS_DARWIN = "darwin";
|
||||||
const OS_LINUX = "linux";
|
const OS_LINUX = "linux";
|
||||||
const OS_WINDOWS = "win32";
|
const OS_WINDOWS = "win32";
|
||||||
|
|
||||||
|
// OS trust store paths
|
||||||
|
const DARWIN_CA_PATH = "/Library/Keychains/System.keychain";
|
||||||
|
const LINUX_CA_PATH = "/usr/local/share/ca-certificates/safe-chain-ca.crt";
|
||||||
|
|
||||||
export function getCaCertPath() {
|
export function getCaCertPath() {
|
||||||
return path.join(certFolder, "ca-cert.pem");
|
return path.join(certFolder, "ca-cert.pem");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue