(payload)
| 2029 | } |
| 2030 | |
| 2031 | function onPayload(payload) { |
| 2032 | // XXX: move this to the Decipher implementations? |
| 2033 | |
| 2034 | this._onPacket(); |
| 2035 | |
| 2036 | if (payload.length === 0) { |
| 2037 | this._debug && this._debug('Inbound: Skipping empty packet payload'); |
| 2038 | return; |
| 2039 | } |
| 2040 | |
| 2041 | payload = this._packetRW.read.read(payload); |
| 2042 | |
| 2043 | const type = payload[0]; |
| 2044 | if (type === MESSAGE.USERAUTH_SUCCESS |
| 2045 | && !this._server |
| 2046 | && !this._authenticated) { |
| 2047 | this._authenticated = true; |
| 2048 | if (this._kex.negotiated.cs.compress === 'zlib@openssh.com') |
| 2049 | this._packetRW.write = new ZlibPacketWriter(this); |
| 2050 | if (this._kex.negotiated.sc.compress === 'zlib@openssh.com') |
| 2051 | this._packetRW.read = new ZlibPacketReader(); |
| 2052 | } |
| 2053 | const handler = MESSAGE_HANDLERS[type]; |
| 2054 | if (handler === undefined) { |
| 2055 | this._debug && this._debug(`Inbound: Unsupported message type: ${type}`); |
| 2056 | return; |
| 2057 | } |
| 2058 | |
| 2059 | return handler(this, payload); |
| 2060 | } |
| 2061 | |
| 2062 | function getCompatFlags(header) { |
| 2063 | const software = header.versions.software; |
nothing calls this directly
no test coverage detected
searching dependent graphs…