MCPcopy Create free account
hub / github.com/apache/cloudstack / _handleSecurityResult

Method _handleSecurityResult

systemvm/agent/noVNC/core/rfb.js:2274–2297  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2272 }
2273
2274 _handleSecurityResult() {
2275 if (this._sock.rQwait('VNC auth response ', 4)) { return false; }
2276
2277 const status = this._sock.rQshift32();
2278
2279 if (status === 0) { // OK
2280 this._rfbInitState = 'ClientInitialisation';
2281 Log.Debug('Authentication OK');
2282 return true;
2283 } else {
2284 if (this._rfbVersion >= 3.8) {
2285 this._rfbInitState = "SecurityReason";
2286 this._securityContext = "security result";
2287 this._securityStatus = status;
2288 return true;
2289 } else {
2290 this.dispatchEvent(new CustomEvent(
2291 "securityfailure",
2292 { detail: { status: status } }));
2293
2294 return this._fail("Security handshake failed");
2295 }
2296 }
2297 }
2298
2299 _negotiateServerInit() {
2300 if (this._sock.rQwait("server initialization", 24)) { return false; }

Callers 1

_initMsgMethod · 0.95

Calls 4

_failMethod · 0.95
rQwaitMethod · 0.80
rQshift32Method · 0.80
dispatchEventMethod · 0.80

Tested by

no test coverage detected