MCPcopy
hub / github.com/novnc/noVNC / _handleSecurityResult

Method _handleSecurityResult

core/rfb.js:2115–2138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2113 }
2114
2115 _handleSecurityResult() {
2116 if (this._sock.rQwait('VNC auth response ', 4)) { return false; }
2117
2118 const status = this._sock.rQshift32();
2119
2120 if (status === 0) { // OK
2121 this._rfbInitState = 'ClientInitialisation';
2122 Log.Debug('Authentication OK');
2123 return true;
2124 } else {
2125 if (this._rfbVersion >= 3.8) {
2126 this._rfbInitState = "SecurityReason";
2127 this._securityContext = "security result";
2128 this._securityStatus = status;
2129 return true;
2130 } else {
2131 this.dispatchEvent(new CustomEvent(
2132 "securityfailure",
2133 { detail: { status: status } }));
2134
2135 return this._fail("Security handshake failed");
2136 }
2137 }
2138 }
2139
2140 _negotiateServerInit() {
2141 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