1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Updated MeshAgent on all platforms.

This commit is contained in:
Ylian Saint-Hilaire 2020-11-11 00:28:53 -08:00
parent 3e537ae8df
commit bf7b1ffd60
34 changed files with 41 additions and 84 deletions

View file

@ -780,11 +780,7 @@ function createMeshCore(agent) {
// Perform manual server TLS certificate checking based on the certificate hash given by the server.
woptions.rejectUnauthorized = 0;
woptions.checkServerIdentity = function checkServerIdentity(certs) {
//sendConsoleText('ca: ' + certs[0].fingerprint.split(':').join('').toLowerCase());
//sendConsoleText('cs: ' + checkServerIdentity.servertlshash);
if ((checkServerIdentity.servertlshash != null) && (checkServerIdentity.servertlshash != certs[0].fingerprint.split(':').join('').toLowerCase())) { throw new Error('BadCert') }
}
woptions.checkServerIdentity = function checkServerIdentity(certs) { if ((checkServerIdentity.servertlshash != null) && (checkServerIdentity.servertlshash != certs[0].fingerprint.split(':').join('').toLowerCase())) { throw new Error('BadCert') } }
woptions.checkServerIdentity.servertlshash = data.servertlshash;
//sendConsoleText(JSON.stringify(woptions));