Updated recovery self-update to skip authentication check if agent doesn't expose control channel cert, and server did not supply credentials.

Bryan Roe committed Jan 17, 2021 at 21:57 UTC 872cdfbc9c933fb117c7b9363d0202db05ce34f8
1 file changed +2
agents/recoverycore.js
+2
@@ -245,6 +245,8 @@ function agentUpdate_Start(updateurl, updateoptions)
245 // Check that the certificate is the one expected by the server, fail if not.
246 if (checkServerIdentity.servertlshash == null)
247 {
248 + if (require('MeshAgent').ServerInfo == null || require('MeshAgent').ServerInfo.ControlChannelCertificate == null) { return; }
249 +
250 sendConsoleText('Self Update failed, because the url cannot be verified', sessionid);
251 sendAgentMessage('Self Update failed, because the url cannot be verified', 3);
252 throw new Error('BadCert');