Skip to content

Commit

Permalink
Cert check simplification and UI session fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ylianst committed Jun 9, 2021
1 parent 13f9f27 commit 50abd95
Show file tree
Hide file tree
Showing 82 changed files with 11 additions and 89 deletions.
Binary file modified agents/MeshCentralAssistant.exe
Binary file not shown.
Binary file modified agents/MeshCentralRouter.exe
Binary file not shown.
Binary file modified agents/MeshCmd-signed.exe
Binary file not shown.
Binary file modified agents/MeshCmd64-signed.exe
Binary file not shown.
15 changes: 6 additions & 9 deletions agents/meshcore.js
Original file line number Diff line number Diff line change
Expand Up @@ -858,15 +858,12 @@ function handleServerCommand(data) {
try { sendConsoleText("control-fingerprint: " + require('MeshAgent').ServerInfo.ControlChannelCertificate.fingerprint); } catch (ex) { sendConsoleText(ex); }
*/

// Check if this is an old agent, no certificate checks are possible in this situation. Display a warning.
if ((require('MeshAgent').ServerInfo == null) || (require('MeshAgent').ServerInfo.ControlChannelCertificate == null) || (certs[0].digest == null)) { sendAgentMessage("This agent is using insecure tunnels, consider updating.", 3, 119, true); return; }

// If the tunnel certificate matches the control channel certificate, accept the connection
var noErrors = true;
try { if (require('MeshAgent').ServerInfo.ControlChannelCertificate.digest == certs[0].digest) return; } catch (ex) { noErrors = false; }
try { if (require('MeshAgent').ServerInfo.ControlChannelCertificate.fingerprint == certs[0].fingerprint) return; } catch (ex) { noErrors = false; }
if (certs[0].digest == null || noErrors == true)
{
sendAgentMessage("This agent is using insecure tunnels, consider updating.", 3, 119, true);
return;
}
if (require('MeshAgent').ServerInfo.ControlChannelCertificate.digest == certs[0].digest) return; // Control channel certificate matches using full cert hash
if ((certs[0].fingerprint != null) && (require('MeshAgent').ServerInfo.ControlChannelCertificate.fingerprint == certs[0].fingerprint)) return; // Control channel certificate matches using public key hash

// Check that the certificate is the one expected by the server, fail if not.
if ((checkServerIdentity.servertlshash != null) && (checkServerIdentity.servertlshash.toLowerCase() != certs[0].digest.split(':').join('').toLowerCase())) { throw new Error('BadCert') }
Expand Down Expand Up @@ -4472,7 +4469,7 @@ function handleServerConnection(state)
}
else if (global._MSH == null)
{
sendAgentMessage("This agent is outdated, consider updating.", 3, 120);
sendAgentMessage("This is an old agent version, consider updating.", 3, 117);
}

var oldNodeId = db.Get('OldNodeId');
Expand Down
1 change: 0 additions & 1 deletion emails/translations/account-check-min_cs.html

This file was deleted.

1 change: 0 additions & 1 deletion emails/translations/account-check-min_de.html

This file was deleted.

1 change: 0 additions & 1 deletion emails/translations/account-check-min_es.html

This file was deleted.

1 change: 0 additions & 1 deletion emails/translations/account-check-min_fi.html

This file was deleted.

1 change: 0 additions & 1 deletion emails/translations/account-check-min_fr.html

This file was deleted.

1 change: 0 additions & 1 deletion emails/translations/account-check-min_hi.html

This file was deleted.

1 change: 0 additions & 1 deletion emails/translations/account-check-min_it.html

This file was deleted.

1 change: 0 additions & 1 deletion emails/translations/account-check-min_ja.html

This file was deleted.

1 change: 0 additions & 1 deletion emails/translations/account-check-min_ko.html

This file was deleted.

1 change: 0 additions & 1 deletion emails/translations/account-check-min_nl.html

This file was deleted.

1 change: 0 additions & 1 deletion emails/translations/account-check-min_pt.html

This file was deleted.

1 change: 0 additions & 1 deletion emails/translations/account-check-min_ru.html

This file was deleted.

1 change: 0 additions & 1 deletion emails/translations/account-check-min_tr.html

This file was deleted.

1 change: 0 additions & 1 deletion emails/translations/account-check-min_zh-chs.html

This file was deleted.

1 change: 0 additions & 1 deletion emails/translations/account-check-min_zh-cht.html

This file was deleted.

1 change: 0 additions & 1 deletion emails/translations/account-invite-min_cs.html

This file was deleted.

1 change: 0 additions & 1 deletion emails/translations/account-invite-min_de.html

This file was deleted.

1 change: 0 additions & 1 deletion emails/translations/account-invite-min_es.html

This file was deleted.

1 change: 0 additions & 1 deletion emails/translations/account-invite-min_fi.html

This file was deleted.

1 change: 0 additions & 1 deletion emails/translations/account-invite-min_fr.html

This file was deleted.

1 change: 0 additions & 1 deletion emails/translations/account-invite-min_hi.html

This file was deleted.

1 change: 0 additions & 1 deletion emails/translations/account-invite-min_it.html

This file was deleted.

1 change: 0 additions & 1 deletion emails/translations/account-invite-min_ja.html

This file was deleted.

Loading

0 comments on commit 50abd95

Please sign in to comment.