mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 23:33:12 +09:00
Remove tlsCa option
The migration from phin to fetch in #755 was hampred by the lack of an option to set the CA when using fetch. This meant places that used phin to talk to the controller with the tlsCa option could not be migrated to use fetch. Remove the tlsCa option to unblock this dependency. The replacement for this option is to set the NODE_EXTRA_CA_CERTS environment variable to a path to the certificate file instead, which works with fetch.
This commit is contained in:
1 parent
a106851cdc
commit
fb3fe09466
21 files changed
+66
-120
No files matched your search
@@ -41,7 +41,6 @@ async function startAltHost() {
|
||||
await fs.remove(path.join("temp", "test", "alt-instances"));
|
||||
await fs.remove(path.join("temp", "test", "alt-mods"));
|
||||
await execCtl(`host create-config --id 5 --name alt-host --generate-token --output ${config}`);
|
||||
await execHost(`--config ${config} config set host.tls_ca ../../test/file/tls/cert.pem`);
|
||||
await execHost(`--config ${config} config set host.instances_directory alt-instances`);
|
||||
const dir = path.isAbsolute(factorioDir) ? factorioDir : path.join("..", "..", factorioDir);
|
||||
await execHost(`--config ${config} config set host.factorio_directory ${dir}`);
|
||||
@@ -168,8 +167,7 @@ describe("Integration of Clusterio", function() {
|
||||
describe("run", function() {
|
||||
it("should handle resume of an active connection", async function() {
|
||||
slowTest(this);
|
||||
let tlsCa = await fs.readFile("test/file/tls/cert.pem");
|
||||
let connectorA = new TestControlConnector(url, 2, tlsCa);
|
||||
let connectorA = new TestControlConnector(url, 2);
|
||||
connectorA.token = controlToken;
|
||||
let controlA = new TestControl(connectorA);
|
||||
await connectorA.connect();
|
||||
@@ -177,7 +175,7 @@ describe("Integration of Clusterio", function() {
|
||||
connectorA.stopHeartbeat();
|
||||
connectorA.on("error", () => {});
|
||||
|
||||
let connectorB = new TestControlConnector(url, 2, tlsCa);
|
||||
let connectorB = new TestControlConnector(url, 2);
|
||||
connectorB.token = controlToken;
|
||||
connectorB.src = connectorA.src;
|
||||
let controlB = new TestControl(connectorB);
|
||||
@@ -1679,8 +1677,7 @@ describe("Integration of Clusterio", function() {
|
||||
it("should kick existing sessions for the user", async function() {
|
||||
slowTest(this);
|
||||
await getControl().send(new lib.UserCreateRequest("revokee"));
|
||||
let tlsCa = await fs.readFile("test/file/tls/cert.pem");
|
||||
let connector = new TestControlConnector(url, 2, tlsCa);
|
||||
let connector = new TestControlConnector(url, 2);
|
||||
connector.token = jwt.sign(
|
||||
{ aud: "user", user: "revokee" }, Buffer.from("TestSecretDoNotUse", "base64")
|
||||
);
|
||||
@@ -1709,8 +1706,7 @@ describe("Integration of Clusterio", function() {
|
||||
await execCtl("user set-roles temp Player");
|
||||
let tempControl;
|
||||
try {
|
||||
let tlsCa = await fs.readFile("test/file/tls/cert.pem");
|
||||
let connector = new TestControlConnector(url, 2, tlsCa);
|
||||
let connector = new TestControlConnector(url, 2);
|
||||
connector.token = jwt.sign(
|
||||
{ aud: "user", user: "temp" }, Buffer.from("TestSecretDoNotUse", "base64")
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user