mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 23:33:12 +09:00
Expose computed tls_ca config
Provide the loaded file of the tls_ca config available to slave, instance and ctl code. This ensures they can easily use it when connecting to the master server.
This commit is contained in:
1 parent
6a29cd9715
commit
4efd09de31
2 files changed
+16
-5
No files matched your search
+7
-2
@@ -698,10 +698,15 @@ class ControlConnector extends libLink.WebSocketClientConnector {
|
||||
*/
|
||||
class Control extends libLink.Link {
|
||||
|
||||
constructor(connector, controlPlugins) {
|
||||
constructor(connector, tlsCa, controlPlugins) {
|
||||
super("control", "master", connector);
|
||||
libLink.attachAllMessages(this);
|
||||
|
||||
/**
|
||||
* Certificate authority used to validate TLS connections to the master.
|
||||
* @type {?string}
|
||||
*/
|
||||
this.tlsCa = tlsCa;
|
||||
/**
|
||||
* Mapping of plugin names to their instance for loaded plugins.
|
||||
* @type {Map<string, module:lib/plugin.BaseControlPlugin>}
|
||||
@@ -917,7 +922,7 @@ async function startControl() {
|
||||
tlsCa,
|
||||
controlConfig.get("control.master_token")
|
||||
);
|
||||
let control = new Control(controlConnector, controlPlugins);
|
||||
let control = new Control(controlConnector, tlsCa, controlPlugins);
|
||||
try {
|
||||
await controlConnector.connect();
|
||||
} catch (err) {
|
||||
|
||||
Reference in new issue
Block a user