MeshCmd cert auth fix.

This commit is contained in:
Ylian Saint-Hilaire 2021-05-25 16:35:55 -07:00
parent 574bff2518
commit 428efb3f1b
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ function onVerifyServer(clientName, certs) {
if (certs == null) { certs = clientName; } // Temporary thing until we fix duktape
// If we have the serverid, used delayed server authentication
if (settings.serverid != null) { settings.meshServerTlsHash = certs[certs.length - 1].fingerprint.replace(/:/g, ''); return; }
if (settings.serverid != null) { settings.meshServerTlsHash = certs[0].fingerprint.replace(/:/g, ''); return; }
// Otherwise, use server HTTPS certificate hash
try { for (var i in certs) { if (certs[i].fingerprint.replace(/:/g, '') == settings.serverhttpshash) { return; } } } catch (e) { }