fix attemptCleanCertsSync function for non tls amt
Signed-off-by: si458 <simonsmith5521@gmail.com>
si458 committed
May 10, 2025 at 22:05 UTC
5e031aaa62f1f6a978d07d56703814fd0e360d1f
1 file changed
+2
-1
amtmanager.js
+2
-1
@@ -2354,7 +2354,8 @@ module.exports.CreateAmtManager = function (parent) {
2354
const dev = stack.dev;
2355
if (isAmtDeviceValid(dev) == false) return; // Device no longer exists, ignore this request.
2356
const domain = parent.config.domains[dev.domainid];
2357
- if ((responses['AMT_PublicKeyCertificate'].status != 200) || (responses['AMT_PublicKeyCertificate'].status != 200)) { func(dev); return; } // We can't get the certificate list, fail and carry on.
2357
+ if ((responses['AMT_PublicKeyCertificate'].status != 200) || (responses['AMT_PublicPrivateKeyPair'].status != 200)) { func(dev); return; } // We can't get the certificate list, fail and carry on.
2358
+ if ((responses['AMT_PublicKeyCertificate'].responses.length == 0) || (responses['AMT_PublicPrivateKeyPair'].responses.length == 0)) { func(dev); return; } // Empty certificate list, fail and carry on.
2359
2360
// Sort out the certificates
2361
var xxCertificates = responses['AMT_PublicKeyCertificate'].responses;