mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-26 07:05:52 -05:00
AMT Manager defaults to TLS on all connection types.
This commit is contained in:
parent
022652f9ac
commit
3572caf2d7
Binary file not shown.
Binary file not shown.
@ -324,7 +324,8 @@ function CreateAPFClient(parent, args) {
|
||||
});
|
||||
|
||||
chan.on('error', function (e) {
|
||||
Debug("Downlink connection error: " + e);
|
||||
//Debug("Downlink connection error: " + e);
|
||||
SendChannelOpenFailure(socket.ws, p_res);
|
||||
});
|
||||
|
||||
chan.on('end', function () {
|
||||
|
@ -324,7 +324,8 @@ function CreateAPFClient(parent, args) {
|
||||
});
|
||||
|
||||
chan.on('error', function (e) {
|
||||
Debug("Downlink connection error: " + e);
|
||||
//Debug("Downlink connection error: " + e);
|
||||
SendChannelOpenFailure(socket.ws, p_res);
|
||||
});
|
||||
|
||||
chan.on('end', function () {
|
||||
|
@ -426,7 +426,7 @@ var CreateWsmanComm = function (host, port, user, pass, tls, tlsoptions, mpsConn
|
||||
if (obj.mpsConnection == null) { obj.socket.end(); } else { obj.socket.close(); }
|
||||
} else {
|
||||
var r = obj.pendingAjaxCall.shift();
|
||||
if (r == null || r.length < 1) { console.log("pendingAjaxCall error, " + r); return; }
|
||||
if ((r == null) || (r.length < 1)) { /*console.log("pendingAjaxCall error, " + r);*/ return; } // Get a response without any pending requests.
|
||||
//if (s != 200) { obj.Debug("Error, status=" + s + "\r\n\r\nreq=" + r[0] + "\r\n\r\nresp=" + data); } // Debug: Display the request & response if something did not work.
|
||||
obj.authcounter = 0;
|
||||
obj.ActiveAjaxCount--;
|
||||
|
@ -418,8 +418,8 @@ module.exports.CreateAmtManager = function (parent) {
|
||||
dev.amtstack.dev = dev;
|
||||
dev.amtstack.BatchEnum(null, ['*AMT_GeneralSettings', '*IPS_HostBasedSetupService'], attemptLocalConnectResponse);
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
case 1: // CIRA-Relay
|
||||
case 2: // CIRA-LMS
|
||||
// Handle the case where the Intel AMT relay or LMS is connected (connType 1 or 2)
|
||||
// Check to see if CIRA is connected on this server.
|
||||
var ciraconn = dev.mpsConnection;
|
||||
@ -433,7 +433,6 @@ module.exports.CreateAmtManager = function (parent) {
|
||||
|
||||
// Connect now
|
||||
var comm;
|
||||
dev.tlsfail = true; // DEBUG!!!!!!!
|
||||
if (dev.tlsfail !== true) {
|
||||
parent.debug('amt', 'Relay-Connect', "TLS", dev.name, user, pass);
|
||||
comm = CreateWsmanComm(dev.nodeid, 16993, user, pass, 1, null, ciraconn); // Perform TLS
|
||||
@ -447,7 +446,7 @@ module.exports.CreateAmtManager = function (parent) {
|
||||
dev.amtstack.dev = dev;
|
||||
dev.amtstack.BatchEnum(null, ['*AMT_GeneralSettings', '*IPS_HostBasedSetupService'], attemptLocalConnectResponse);
|
||||
break;
|
||||
case 3:
|
||||
case 3: // Local LAN
|
||||
// Handle the case where the Intel AMT local scanner found the device (connType 3)
|
||||
parent.debug('amt', "Attempt Initial Local Contact", dev.name, dev.connType, dev.host);
|
||||
if (typeof dev.host != 'string') { removeAmtDevice(dev); return; } // Local connection not valid
|
||||
@ -555,7 +554,7 @@ module.exports.CreateAmtManager = function (parent) {
|
||||
});
|
||||
} else {
|
||||
// We got a bad response
|
||||
if ((dev.conntype == 1) && (dev.tlsfail !== true) && (status == 408)) {
|
||||
if ((dev.conntype != 0) && (dev.tlsfail !== true) && (status == 408)) { // If not using CIRA and we get a 408 error while using TLS, try non-TLS.
|
||||
// TLS error on a local connection, try again without TLS
|
||||
dev.tlsfail = true; attemptInitialContact(dev); return;
|
||||
} else if (status == 401) {
|
||||
|
Loading…
Reference in New Issue
Block a user