mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-28 17:12:22 +00:00
cloud_discovery: use the correct certificte for CDS
Fixes: WIFI-14694 Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
@@ -160,14 +160,14 @@ function redirector_lookup() {
|
||||
let serial = uci.get('system', '@system[-1]', 'mac');
|
||||
|
||||
fs.unlink(path);
|
||||
system(`curl -k --cert /etc/ucentral/cert.pem --key /etc/ucentral/key.pem --cacert /etc/ucentral/operational.ca https://openlan.keys.tip.build/v1/devices/${serial} --output /tmp/ucentral.redirector`);
|
||||
system(`curl -k --cert /etc/ucentral/operational.pem --key /etc/ucentral/key.pem --cacert /etc/ucentral/operational.ca https://openlan.keys.tip.build/v1/devices/${serial} --output /tmp/ucentral.redirector`);
|
||||
if (!fs.stat(path))
|
||||
return;
|
||||
let redir = readjsonfile(path);
|
||||
if (redir?.controller_endpoint) {
|
||||
let controller_endpoint = split(redir.controller_endpoint, ':');
|
||||
if (gateway_write({ server: controller_endpoint[0], port: controller_endpoint[1] || 15002, valid: false, hostname_validate: 1 })) {
|
||||
ulog(LOG_INFO, `Discovered cloud via lookup service ${redir.server}:${redir.port}\n`);
|
||||
ulog(LOG_INFO, `Discovered cloud via lookup service ${controller_endpoint[0]}:${controller_endpoint[1] || 15002}\n`);
|
||||
client_start();
|
||||
set_state(VALIDATING);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user