()
| 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; } |
no test coverage detected