Intel AMT 802.1x fixes.
Ylian Saint-Hilaire committed
Apr 5, 2022 at 23:22 UTC
1d374a5f905d19343a5a59ed9ca84a20f462a277
1 file changed
+6
-4
amtmanager.js
+6
-4
@@ -77,8 +77,9 @@ module.exports.CreateAmtManager = function (parent) {
77
}
78
}
79
80
- if ((domain.amtmanager['802.1x'].satellitecredentials != null) && (typeof domain.amtmanager['802.1x'].servercertificatename != 'string')) {
80
+ if (typeof domain.amtmanager['802.1x'].servercertificatename != 'string') {
81
delete domain.amtmanager['802.1x'].servercertificatenamecomparison;
82
+ } else {
83
const serverCertCompareStrings = ['', '', 'fullname', 'domainsuffix'];
84
if (typeof domain.amtmanager['802.1x'].servercertificatenamecomparison == 'string') {
85
domain.amtmanager['802.1x'].servercertificatenamecomparison = serverCertCompareStrings.indexOf(domain.amtmanager['802.1x'].servercertificatenamecomparison.toLowerCase());
@@ -86,7 +87,7 @@ module.exports.CreateAmtManager = function (parent) {
87
}
88
}
89
89
- if ((domain.amtmanager['802.1x'].satellitecredentials != null) && (typeof domain.amtmanager['802.1x'].authenticationprotocol == 'string')) {
90
+ if (typeof domain.amtmanager['802.1x'].authenticationprotocol == 'string') {
91
domain.amtmanager['802.1x'].authenticationprotocol = netAuthStrings.indexOf(domain.amtmanager['802.1x'].authenticationprotocol.toLowerCase());
92
if (domain.amtmanager['802.1x'].authenticationprotocol == -1) { delete domain.amtmanager['802.1x']; }
93
}
@@ -136,6 +137,7 @@ module.exports.CreateAmtManager = function (parent) {
137
goodWifiProfiles.push(wifiProfile);
138
}
139
}
140
+
141
domain.amtmanager.wifiprofiles = goodWifiProfiles;
142
} else {
143
delete domain.amtmanager.wifiprofiles;
@@ -1502,7 +1504,7 @@ module.exports.CreateAmtManager = function (parent) {
1504
}
1505
}
1506
1505
- if (newNetAuthProfileRequested) {
1507
+ if (newNetAuthProfileRequested && (typeof srvNetAuthProfile.satellitecredentials == 'string')) {
1508
// Credentials for this 802.1x profile are provided using MeshCentral Satellite
1509
// Send a message to Satellite requesting a 802.1x profile for this device
1510
dev.consoleMsg("Requesting 802.1x credentials for " + netAuthStrings[srvNetAuthProfile.authenticationprotocol] + " from MeshCentral Satellite...");
@@ -1525,7 +1527,7 @@ module.exports.CreateAmtManager = function (parent) {
1527
return;
1528
} else {
1529
// No need to call MeshCentral Satellite for a 802.1x profile, so configure everything now.
1528
- attemptWifiSyncEx(dev, { domain: domain, wiredConfig: wiredConfig, wirelessConfig: wirelessConfig, devNetAuthProfile: devNetAuthProfile, srvNetAuthProfile: srvNetAuthProfile, profilesToAdd: profilesToAdd, prioritiesInUse: prioritiesInUse, responses: responses });
1530
+ attempt8021xSyncEx(dev, { domain: domain, wiredConfig: wiredConfig, wirelessConfig: wirelessConfig, devNetAuthProfile: devNetAuthProfile, srvNetAuthProfile: srvNetAuthProfile, profilesToAdd: profilesToAdd, prioritiesInUse: prioritiesInUse, responses: responses });
1531
}
1532
}
1533
});