From 51ae65b5dca20eaf947a2e5baed4ef51ff95e1b6 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Sun, 18 Oct 2020 21:06:39 -0700 Subject: [PATCH] Intel AMT CIRA auto-config almost done. --- agents/MeshCmd-signed.exe | Bin 4361080 -> 4375984 bytes agents/MeshCmd64-signed.exe | Bin 3977080 -> 3991984 bytes amt/amt.js | 2 +- amtmanager.js | 276 ++++++++++++++++++++++++++++++++---- views/default.handlebars | 2 +- 5 files changed, 254 insertions(+), 26 deletions(-) diff --git a/agents/MeshCmd-signed.exe b/agents/MeshCmd-signed.exe index d890cd2b32db6d2d653746b3ce22b2fd270f6569..49297897342ca90e93b07960302e8fbd3f358add 100644 GIT binary patch delta 11886 zcmb6<3wTrI*|Ya1Fo=fSCZZ0A>Ts0hkN$U4UYMc>n~! ze1H;w1po^Ht_4^GPzs;{AORKwXaOjIB>*~rG5|e*0l)}g8homty!Aq7I2G-R$LIuC zN)aW|bfSxkB@={$p~D<)Z)tSkIn5@DCI@0sjfU2VtJCRN#9~RL<8gA^wwzI2oKAFe zJ@YN5N?{Xex|&Z~1~RotT`J7LDV9y}G0b$c78*YEa9qm5(3{dRhSqeJps$@JBupe| zPBjkS#NlX?=?gOvktlpRtc@i567g7KBP*Q~?TdtBku4TI%yF?^o@T_A3Ug_VhjNnx z49%sPgvO)m>IpNBWQ4YJ8aKJvP+3(~Wi(Wh+96X~1G#i*zHuXrSCiUYL|PM>!6#mY zUlXkyLbC4?0c~jazH1s3dh* z(tufwkt$aa)IEftrePGR3EH6Xtah)-N5w`&1vr6h%R<4c#%a8p%w(k(&k{RS{t(rxO}cQm)&F5Q!N31o8RI0gqAx4L6_eb3OaplW&>q!Z)=9nf#oiT zGZb*PwmXAu;+#>O%Na9KEsZN0hOg%lvT~})Xb+iV#KI2&AnP`l6V^RMs$$>R5*-veZdpWVy7W~21k)!+=6O$cRxj!cC3 z-NgmDFvA6taf{G;(lm`UR8o5Uf3=CKs-dbXDU%V!c37W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-M^7TFco( z#dpq2yRR15^0r9(KJOcpkG0#87+(fVhms!@gb&7^eX3kxg|j{$@wycyvOF1P^NeOU znj{pw$?A`ZAoEN^N-y2qYBKqeKCxKlY3?%_6i3L*Bz3mF4g7$JrVf|12lwHZ{>~nV O;ct5QdjF8xxBdn2Ay%0H diff --git a/agents/MeshCmd64-signed.exe b/agents/MeshCmd64-signed.exe index f0af15a3e282ba79503bf44fccd11a21895cf740..bfbf706192f461c78674d7033aa37bc83080edf5 100644 GIT binary patch delta 11865 zcmb6<33yXwwicm4p=A*$+u)^)HkaI{NxJ5yK|&g6$X1fHrBDnZxoK0WQ+7!6|#jA9sL zVT^+@9!3d_2{0zYD1}i5V-k$XFs8tm3gZeG(_l=8F#|?9jF~WI!I%wW4ve`legtD4 zj4NRfFy_OkfUy9^k6~N|<7ya{Ff=eo7z<%&VNfutVCaU97FAnkc7;;Wa6HB&xJrts zh-MODE|yFXHkJu-jJ0*C4X7ut_l(s5)7xB zhi~F^G|Bdd*oa6J#twTU$^JwB2oB)|QMgR!-w27aHmt8XAm-dQv-VNoydRnhMPuVZM>n<^$5!kXejzERttJ z;}rH^sG7$+7cDZ@l2;q+>L?9-25`#fM)9K)O-N_a(LNw*aASxi+?KA2t_sR!0ZDaL zXq}|4FT{m=G}Ss?bvH?Q%>6yFIHU1cT)K2mEXrv}a?q`{_&GL~=+;HqWS^}^xb{NT zSiY-5zX>3C$gC&>!Yz`D(Dfj6l4zV-V_iL|kOEL5u^dL z8Y5M!BB*;9LCZ!^q$a3W<67-pQ;3T7hzf85*_MT(@2P3Llg#F%7taw&I3-yjg6b(S z5cNbY1qP;`KqTi)=qV$q?W(9ks#ZZV=qX@4H^l?=M#`WsxVM%<_L_IxNErZ80l4*) zu^vH)`v|*VOu?c*;Y?rw$&4uZS{o2 zuzE`5SDfLod20+JtLj|_k=48@kxBIwuxFOMz?tJSnr|}Lf<^YQ6)V>3=LG+Ss;RtQ zbXvuo(B7D3(BW|e999>tr&@j9fY;`A1>5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sH5#?9Tbq5@WCZ3>!UB4fudg)KQem7hqZlWY9m?b2nc5)-63sn&T?#*xd1?#4dw zO%8-#KuKE9;xojg8BbWv3A50_ z{u?GIro%!8e?{u?sM?WLA%h0Z^SWlmwkP6}p@DrHX09%KtzEmQHYnQK$6M$&QF*Op zAAhp;s%>e5=9!D%!=ATexsT%eD^i@JC=)}GQL-L|JaFl4Gqh3P8&&p)*obh)-wy6A zqK;&cPZy5z`af2?iJKb-&s~{lIPiF$IiNKW1-feZS-m!HZxqQKW40H^-Hv}9j%fa)sH>3X$4P%At{h;=-l<$)L5Zk{$2B6s zz@F@#hcmgw@>>-TpaUJ$0?oToGc$!p+fS z-_Y7l^ofL|u?u9;g%bCX<@89O&#PeCvvhmOPr-0b&~= za<@cLRH|})mbeB^6R;23w|yzdMa)TYDD`I50497^;UvKL>7laf>pzz1ZYLVsUNicy Fe*yc{Ry6= 3) { dev.aquired.version = verSplit[0] + '.' + verSplit[1] + '.' + verSplit[2]; dev.aquired.majorver = parseInt(verSplit[0]); } + if (verSplit.length >= 3) { dev.aquired.version = verSplit[0] + '.' + verSplit[1] + '.' + verSplit[2]; dev.aquired.majorver = parseInt(verSplit[0]); dev.aquired.minorver = parseInt(verSplit[1]); } dev.aquired.realm = stack.wsman.comm.digestRealm; dev.aquired.user = stack.wsman.comm.user; dev.aquired.pass = stack.wsman.comm.pass; @@ -346,19 +352,22 @@ module.exports.CreateAmtManager = function(parent) { attemptTlsSync(dev, function () { // Check Intel AMT root certificate state attemptRootCertSync(dev, function () { - // See if we need to get hardware inventory - attemptFetchHardwareInventory(dev, function () { - dev.consoleMsg('Done.'); - if (dev.connType != 2) { - // Start power polling if not connected to LMS - var ppfunc = function powerPoleFunction() { fetchPowerState(powerPoleFunction.dev); } - ppfunc.dev = dev; - dev.polltimer = new setTimeout(ppfunc, 290000); // Poll for power state every 4 minutes 50 seconds. - fetchPowerState(dev); - } else { - // For LMS connections, close now. - dev.controlMsg({ action: "close" }); - } + // Check Intel AMT CIRA settings + attemptCiraSync(dev, function () { + // See if we need to get hardware inventory + attemptFetchHardwareInventory(dev, function () { + dev.consoleMsg('Done.'); + if (dev.connType != 2) { + // Start power polling if not connected to LMS + var ppfunc = function powerPoleFunction() { fetchPowerState(powerPoleFunction.dev); } + ppfunc.dev = dev; + dev.polltimer = new setTimeout(ppfunc, 290000); // Poll for power state every 4 minutes 50 seconds. + fetchPowerState(dev); + } else { + // For LMS connections, close now. + dev.controlMsg({ action: 'close' }); + } + }); }); }); }); @@ -382,6 +391,11 @@ module.exports.CreateAmtManager = function(parent) { } } + + // + // Intel AMT Database Update + // + // Change the current core information string and event it function UpdateDevice(dev) { if (isAmtDeviceValid(dev) == false) return; // Device no longer exists, ignore this request. @@ -468,6 +482,11 @@ module.exports.CreateAmtManager = function(parent) { }); } + + // + // Intel AMT Power State + // + // Get the current power state of a device function fetchPowerState(dev) { if (isAmtDeviceValid(dev) == false) return; @@ -529,6 +548,11 @@ module.exports.CreateAmtManager = function(parent) { //console.log('performPowerActionResponse', status); } + + // + // Intel AMT Clock Syncronization + // + // Attempt to sync the Intel AMT clock if needed, call func back when done. // Care should be take not to have many pending WSMAN called when performing clock sync. function attemptSyncClock(dev, func) { @@ -566,6 +590,11 @@ module.exports.CreateAmtManager = function(parent) { devTaskCompleted(dev) } + + // + // Intel AMT TLS setup + // + // Check if Intel AMT TLS state is correct function attemptTlsSync(dev, func) { if (isAmtDeviceValid(dev) == false) return; // Device no longer exists, ignore this request. @@ -605,7 +634,7 @@ module.exports.CreateAmtManager = function(parent) { var xxCertificates = responses['AMT_PublicKeyCertificate'].responses; for (var i in xxCertificates) { xxCertificates[i].TrustedRootCertficate = (xxCertificates[i]['TrustedRootCertficate'] == true); - xxCertificates[i].X509Certificate = Buffer.from(xxCertificates[i]['X509Certificate'], 'base64').toString('binary'); + xxCertificates[i].X509CertificateBin = Buffer.from(xxCertificates[i]['X509Certificate'], 'base64').toString('binary'); xxCertificates[i].XIssuer = parseCertName(xxCertificates[i]['Issuer']); xxCertificates[i].XSubject = parseCertName(xxCertificates[i]['Subject']); } @@ -715,16 +744,21 @@ module.exports.CreateAmtManager = function(parent) { if (isAmtDeviceValid(dev) == false) return; // Device no longer exists, ignore this request. if (status != 200) { dev.consoleMsg("Failed perform commit."); removeAmtDevice(dev); return; } dev.consoleMsg("Enabled TLS"); - // TODO: Switch our communications to TLS. + // TODO: Switch our communications to TLS (Restart our management of this node) devTaskCompleted(dev); }); } } + + // + // Intel AMT Server Root Certificate + // + // Check if Intel AMT has the server root certificate function attemptRootCertSync(dev, func) { if (isAmtDeviceValid(dev) == false) return; // Device no longer exists, ignore this request. - if (dev.policy.ciraPolicy != 2) { func(); return; } // Server root certificate does not need to be present is CIRA is not needed + if ((dev.connType != 2) || (dev.policy.ciraPolicy != 2)) { func(); return; } // Server root certificate does not need to be present is CIRA is not needed // Find the current TLS certificate & MeshCentral root certificate var xxMeshCentralRoot = null; @@ -746,6 +780,193 @@ module.exports.CreateAmtManager = function(parent) { } else { func(); } } + + // + // Intel AMT CIRA Setup + // + + // Check if Intel AMT has the server root certificate + function attemptCiraSync(dev, func) { + if (isAmtDeviceValid(dev) == false) return; // Device no longer exists, ignore this request. + if ((dev.connType != 2) || (dev.policy.ciraPolicy != 2)) { func(); return; } // Only setup CIRA when LMS connection is used and a CIRA policy is enabled. + + // Get current CIRA settings + // TODO: We only deal with remote access starting with Intel AMT 6 and beyond + dev.taskCount = 1; + dev.taskCompleted = func; + var requests = ['*AMT_EnvironmentDetectionSettingData', 'AMT_ManagementPresenceRemoteSAP', 'AMT_RemoteAccessCredentialContext', 'AMT_RemoteAccessPolicyAppliesToMPS', 'AMT_RemoteAccessPolicyRule', '*AMT_UserInitiatedConnectionService', 'AMT_MPSUsernamePassword']; + if (dev.aquired.majorver > 11) { requests.push('*IPS_HTTPProxyService', 'IPS_HTTPProxyAccessPoint'); } + dev.amtstack.BatchEnum(null, requests, function (stack, name, responses, status) { + const dev = stack.dev; + if (isAmtDeviceValid(dev) == false) return; // Device no longer exists, ignore this request. + //dev.consoleMsg("Added server root certificate."); + + if ((dev.aquired.majorver > 11) && (status == 400)) { + // Check if only the HTTP proxy objects failed + status = 200; + if (responses['IPS_HTTPProxyAccessPoint'].status == 400) { delete responses['IPS_HTTPProxyAccessPoint']; } + if (responses['IPS_HTTPProxyService'].status == 400) { delete responses['IPS_HTTPProxyService']; } + for (var i in responses) { if (responses[i].status != 200) { status = responses[i].status; } } + } + if ((status != 200) || (responses['AMT_UserInitiatedConnectionService'] == null) || (responses['AMT_UserInitiatedConnectionService'].response == null)) { dev.consoleMsg("Failed get CIRA state."); removeAmtDevice(dev); return; } + + dev.cira = {}; + dev.cira.xxRemoteAccess = responses; + dev.cira.xxEnvironementDetection = responses['AMT_EnvironmentDetectionSettingData'].response; + dev.cira.xxEnvironementDetection['DetectionStrings'] = MakeToArray(dev.cira.xxEnvironementDetection['DetectionStrings']); + dev.cira.xxCiraServers = responses['AMT_ManagementPresenceRemoteSAP'].responses; + dev.cira.xxUserInitiatedCira = responses['AMT_UserInitiatedConnectionService'].response; + dev.cira.xxRemoteAccessCredentiaLinks = responses['AMT_RemoteAccessCredentialContext'].responses; + dev.cira.xxMPSUserPass = responses['AMT_MPSUsernamePassword'].responses; + + // Set CIRA initiation to BIOS & OS enabled + if (dev.cira.xxUserInitiatedCira['EnabledState'] != 32771) { // 32768: "Disabled", 32769: "BIOS enabled", 32770: "OS enable", 32771: "BIOS & OS enabled" + dev.amtstack.AMT_UserInitiatedConnectionService_RequestStateChange(32771, null, function (stack, name, responses, status) { }); // This is not a critical call. + } + + // Figure out policies attached to servers. Create a policy type to server table. + dev.cira.xxPolicies = { 'User': [], 'Alert': [], 'Periodic': [] }; + for (var i in responses['AMT_RemoteAccessPolicyAppliesToMPS'].responses) { + var policy = responses['AMT_RemoteAccessPolicyAppliesToMPS'].responses[i]; + var server = Clone(getItem(dev.cira.xxCiraServers, 'Name', getItem(policy['ManagedElement']['ReferenceParameters']['SelectorSet']['Selector'], '@Name', 'Name')['Value'])); + server.MpsType = policy['MpsType']; // MpsType was added in Intel AMT 11.6 + var ptype = (getItem(policy['PolicySet']['ReferenceParameters']['SelectorSet']['Selector'], '@Name', 'PolicyRuleName')['Value']).split(' ')[0]; + dev.cira.xxPolicies[ptype].push(server); + } + + // Fetch the server's CIRA settings + dev.cira.mpsPresent = null; + dev.cira.mpsPolicy = false; + if (dev.policy.ciraPolicy == 2) { // DEBUG + dev.cira.meshidx = dev.meshid.split('/')[2].replace(/\@/g, 'X').replace(/\$/g, 'X').substring(0, 16); + dev.cira.mpsName = parent.webserver.certificates.AmtMpsName; + var serverNameSplit = dev.cira.mpsName.split('.'); + dev.cira.mpsPort = ((parent.args.mpsaliasport != null) ? parent.args.mpsaliasport : parent.args.mpsport); + dev.cira.mpsAddressFormat = 201; // 201 = FQDN, 3 = IPv4 + if ((serverNameSplit.length == 4) && (parseInt(serverNameSplit[0]) == serverNameSplit[0]) && (parseInt(serverNameSplit[1]) == serverNameSplit[1]) && (parseInt(serverNameSplit[2]) == serverNameSplit[2]) && (parseInt(serverNameSplit[3]) == serverNameSplit[3])) { dev.cira.mpsAddressFormat = 3; } + + // Check if our server is already present + if (dev.cira.xxCiraServers.length > 0) { + for (var i = 0; i < dev.cira.xxCiraServers.length; i++) { + var mpsServer = dev.cira.xxCiraServers[i]; + if ((mpsServer.AccessInfo == dev.cira.mpsName) && (mpsServer.Port == dev.cira.mpsPort) && (mpsServer.InfoFormat == dev.cira.mpsAddressFormat)) { dev.cira.mpsPresent = mpsServer['Name']; } + } + } + + // Check if our server is already present + if (dev.cira.xxPolicies['Periodic'].length > 0) { + var mpsServer = dev.cira.xxPolicies['Periodic'][0]; + if ((mpsServer.AccessInfo == dev.cira.mpsName) && (mpsServer.Port == dev.cira.mpsPort) && (mpsServer.InfoFormat == dev.cira.mpsAddressFormat)) { dev.cira.mpsPolicy = true; } + } + } + + // Remove all MPS policies that are not ours + if ((dev.cira.xxPolicies['User Initiated'] != null) && (dev.cira.xxPolicies['User Initiated'].length > 0)) { dev.consoleMsg("Removing CIRA user trigger."); dev.amtstack.Delete('AMT_RemoteAccessPolicyRule', { 'PolicyRuleName': 'User Initiated' }, function (stack, name, responses, status) { }); } + if ((dev.cira.xxPolicies['Alert'] != null) && (dev.cira.xxPolicies['Alert'].length > 0)) { dev.consoleMsg("Removing CIRA alert trigger."); dev.amtstack.Delete('AMT_RemoteAccessPolicyRule', { 'PolicyRuleName': 'Alert' }, function (stack, name, responses, status) { }); } + if ((dev.cira.xxPolicies['Periodic'] != null) && (dev.cira.xxPolicies['Periodic'].length > 0) && (dev.cira.mpsPolicy == false)) { dev.consoleMsg("Removing CIRA periodic trigger."); dev.amtstack.Delete('AMT_RemoteAccessPolicyRule', { 'PolicyRuleName': 'Periodic' }, function (stack, name, responses, status) { }); } + + // Remove all MPS servers that are not ours + if (dev.cira.xxCiraServers.length > 0) { + for (var i = 0; i < dev.cira.xxCiraServers.length; i++) { + var mpsServer = dev.cira.xxCiraServers[i]; + if ((mpsServer.AccessInfo != dev.cira.mpsName) || (mpsServer.Port != dev.cira.mpsPort) || (mpsServer.InfoFormat != dev.cira.mpsAddressFormat)) { + dev.consoleMsg("Removing MPS server."); + dev.amtstack.Delete('AMT_ManagementPresenceRemoteSAP', { 'Name': mpsServer['Name'] }, function (stack, name, responses, status) { }); + } + } + } + + // If we need to setup CIRA, start by checking the MPS server + if (dev.policy.ciraPolicy == 2) { addMpsServer(dev); } else { checkEnvironmentDetection(dev); } + }); + } + + function addMpsServer(dev) { + // Add the MPS server if not present + if (dev.cira.mpsPresent == null) { + dev.taskCount++; + dev.amtstack.AMT_RemoteAccessService_AddMpServer(dev.cira.mpsName, dev.cira.mpsAddressFormat, dev.cira.mpsPort, 2, null, dev.cira.meshidx, 'P@ssw0rd', dev.cira.mpsName, function (stack, name, response, status) { + const dev = stack.dev; + if (isAmtDeviceValid(dev) == false) return; // Device no longer exists, ignore this request. + if (status != 200) { dev.consoleMsg("Failed to create new MPS server."); removeAmtDevice(dev); return; } + dev.cira.mpsPresent = getItem(response.Body.MpServer.ReferenceParameters.SelectorSet.Selector, '@Name', 'Name').Value; + dev.consoleMsg("Created new MPS server."); + addMpsPolicy(dev); + }); + } else { + // MPS server is present, check MPS trigger policy + addMpsPolicy(dev); + } + } + + function addMpsPolicy(dev) { + if (dev.cira.mpsPolicy == false) { + var cilaSupport = ((dev.aquired.majorver > 11) || ((dev.aquired.majorver == 11) && (dev.aquired.minorver >= 6))); + var trigger = 2; // 1 = Alert, 2 = Periodic + + // Setup extended data + var extendedData = null; + if (trigger == 2) { + var timertype = 0; // 0 = Periodic, 1 = Time of day + var exdata = IntToStr(10); // Interval trigger, 10 seconds + extendedData = Buffer.from(IntToStr(timertype) + exdata, 'binary').toString('base64'); + } + + // Create the MPS server references + var server1 = '
http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
http://intel.com/wbem/wscim/1/amt-schema/1/AMT_ManagementPresenceRemoteSAP' + dev.cira.mpsPresent + ''; + var server2 = null; + + // Put the CIRA/CILA servers in the right bins. + var ciraServers = [], cilaServers = []; + if (server1) { ciraServers.push(server1); if (server2) { ciraServers.push(server2); } } + + // Go ahead and create the new CIRA/CILA policy. + dev.taskCount++; + dev.amtstack.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(trigger, 0, extendedData, ciraServers, cilaServers, function (stack, name, responses, status) { + const dev = stack.dev; + if (isAmtDeviceValid(dev) == false) return; // Device no longer exists, ignore this request. + if (status != 200) { dev.consoleMsg("Failed to create new MPS policy."); removeAmtDevice(dev); return; } + dev.consoleMsg("Created new MPS policy."); + checkEnvironmentDetection(dev); + }); + } else { + checkEnvironmentDetection(dev); + } + } + + function checkEnvironmentDetection(dev) { + var changes = false; + var editEnvironmentDetectionTmp = []; + + //console.log('checkEnvironmentDetection', dev.cira.xxEnvironementDetection); + if (dev.policy.ciraPolicy == 2) { + // Check that we have a random environment detection + // TODO + } else { + // Check environment detection is clear + // TODO + } + + if (changes == true) { + var t = Clone(dev.cire.xxEnvironementDetection); + t['DetectionStrings'] = editEnvironmentDetectionTmp; + //console.log('AMT_EnvironmentDetectionSettingData', t); + amtstack.Put('AMT_EnvironmentDetectionSettingData', t, function (stack, name, responses, status) { + const dev = stack.dev; + if (isAmtDeviceValid(dev) == false) return; // Device no longer exists, ignore this request. + if (status != 200) { dev.consoleMsg("Failed to set environement detection."); removeAmtDevice(dev); return; } + dev.consoleMsg("Environment detection set."); + devTaskCompleted(dev); + }, 0, 1); + } else { + devTaskCompleted(dev); + } + } + + // + // Intel AMT Hardware Inventory and Networking + // + function attemptFetchHardwareInventory(dev, func) { if (isAmtDeviceValid(dev) == false) return; // Device no longer exists, ignore this request. const mesh = parent.webserver.meshes[dev.meshid]; @@ -761,12 +982,6 @@ module.exports.CreateAmtManager = function(parent) { } } - // Called this when a task is completed, when all tasks are completed the call back function will be called. - function devTaskCompleted(dev) { - dev.taskCount--; - if (dev.taskCount == 0) { var f = dev.taskCompleted; delete dev.taskCount; delete dev.taskCompleted; if (f != null) { f(); } } - } - function attemptFetchNetworkResponse(stack, name, responses, status) { const dev = stack.dev; if (isAmtDeviceValid(dev) == false) return; // Device no longer exists, ignore this request. @@ -928,6 +1143,16 @@ module.exports.CreateAmtManager = function(parent) { devTaskCompleted(dev); } + // + // General Methods + // + + // Called this when a task is completed, when all tasks are completed the call back function will be called. + function devTaskCompleted(dev) { + dev.taskCount--; + if (dev.taskCount == 0) { var f = dev.taskCompleted; delete dev.taskCount; delete dev.taskCompleted; if (f != null) { f(); } } + } + function guidToStr(g) { return g.substring(6, 8) + g.substring(4, 6) + g.substring(2, 4) + g.substring(0, 2) + '-' + g.substring(10, 12) + g.substring(8, 10) + '-' + g.substring(14, 16) + g.substring(12, 14) + '-' + g.substring(16, 20) + '-' + g.substring(20); } // Check which key pair matches the public key in the certificate @@ -936,7 +1161,7 @@ module.exports.CreateAmtManager = function(parent) { var cert = certs[i]; try { if (keys.length == 0) return; - var b = obj.parent.certificateOperations.forge.asn1.fromDer(cert.X509Certificate); + var b = obj.parent.certificateOperations.forge.asn1.fromDer(cert.X509CertificateBin); var a = obj.parent.certificateOperations.forge.pki.certificateFromAsn1(b).publicKey; var publicKeyPEM = obj.parent.certificateOperations.forge.pki.publicKeyToPem(a).substring(28 + 32).replace(/(\r\n|\n|\r)/gm, ""); for (var j = 0; j < keys.length; j++) { @@ -950,6 +1175,9 @@ module.exports.CreateAmtManager = function(parent) { } function Clone(v) { return JSON.parse(JSON.stringify(v)); } + function MakeToArray(v) { if (!v || v == null || typeof v == 'object') return v; return [v]; } + function getItem(x, y, z) { for (var i in x) { if (x[i][y] == z) return x[i]; } return null; } + function IntToStr(v) { return String.fromCharCode((v >> 24) & 0xFF, (v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF); } function parseCertName(x) { var j, r = {}, xx = x.split(','); diff --git a/views/default.handlebars b/views/default.handlebars index 2945e18f..7874e283 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -6542,7 +6542,7 @@ if (os == 16) { osn = "MeshCmd (macOS, 64bit)"; } if (os == 25) { osn = "MeshCmd (Linux ARM, 32bit)"; } QH('meshcmddownloadid', osn); - Q('meshcmddownloadid').setAttribute('href', 'meshagents?meshcmd=' + os + (urlargs.key?('&key=' + urlargs.key):'')); + Q('meshcmddownloadid').onclick = function() { downloadFile('meshagents?meshcmd=' + os + (urlargs.key?('&key=' + urlargs.key):''), null, true); } } function p10showiconselector() {