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

Rolled back agent tunnel TLS check.

This commit is contained in:
Ylian Saint-Hilaire 2020-11-10 13:24:24 -08:00
parent a8fd0510de
commit 6e67fc14c4
3 changed files with 9 additions and 1 deletions

View file

@ -780,7 +780,11 @@ 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) { if ((checkServerIdentity.servertlshash != null) && (checkServerIdentity.servertlshash != certs[0].fingerprint.split(':').join('').toLowerCase())) { throw new Error('BadCert') } }
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.servertlshash = data.servertlshash;
//sendConsoleText(JSON.stringify(woptions));