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

Method _negotiateRA2neAuth

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

Source from the content-addressed store, hash-verified

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; }

Callers 1

Calls 5

_failMethod · 0.95
addEventListenerMethod · 0.80
checkInternalEventsMethod · 0.80
removeEventListenerMethod · 0.80

Tested by

no test coverage detected