()
| 2154 | } |
| 2155 | |
| 2156 | _negotiateRA2neAuth() { |
| 2157 | if (this._rfbRSAAESAuthenticationState === null) { |
| 2158 | this._rfbRSAAESAuthenticationState = new RSAAESAuthenticationState(this._sock, () => this._rfbCredentials); |
| 2159 | this._rfbRSAAESAuthenticationState.addEventListener( |
| 2160 | "serververification", this._eventHandlers.handleRSAAESServerVerification); |
| 2161 | this._rfbRSAAESAuthenticationState.addEventListener( |
| 2162 | "credentialsrequired", this._eventHandlers.handleRSAAESCredentialsRequired); |
| 2163 | } |
| 2164 | this._rfbRSAAESAuthenticationState.checkInternalEvents(); |
| 2165 | if (!this._rfbRSAAESAuthenticationState.hasStarted) { |
| 2166 | this._rfbRSAAESAuthenticationState.negotiateRA2neAuthAsync() |
| 2167 | .catch((e) => { |
| 2168 | if (e.message !== "disconnect normally") { |
| 2169 | this._fail(e.message); |
| 2170 | } |
| 2171 | }) |
| 2172 | .then(() => { |
| 2173 | this._rfbInitState = "SecurityResult"; |
| 2174 | return true; |
| 2175 | }).finally(() => { |
| 2176 | this._rfbRSAAESAuthenticationState.removeEventListener( |
| 2177 | "serververification", this._eventHandlers.handleRSAAESServerVerification); |
| 2178 | this._rfbRSAAESAuthenticationState.removeEventListener( |
| 2179 | "credentialsrequired", this._eventHandlers.handleRSAAESCredentialsRequired); |
| 2180 | this._rfbRSAAESAuthenticationState = null; |
| 2181 | }); |
| 2182 | } |
| 2183 | return false; |
| 2184 | } |
| 2185 | |
| 2186 | _negotiateMSLogonIIAuth() { |
| 2187 | if (this._sock.rQwait("mslogonii dh param", 24)) { return false; } |
no test coverage detected