Rev 9106 | Rev 9987 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9106 | Rev 9216 | ||
---|---|---|---|
Line 107... | Line 107... | ||
107 | mcall connect, [socketnum], , sizeof.sockaddr_in |
107 | mcall connect, [socketnum], , sizeof.sockaddr_in |
108 | test eax, eax |
108 | test eax, eax |
109 | jnz .err_sock |
109 | jnz .err_sock |
Line 110... | Line 110... | ||
110 | 110 | ||
111 | ; Start calculating hash |
111 | ; Start calculating hash |
112 | invoke sha256_init, [ctx_ptr] |
112 | invoke sha2_256_init, [ctx_ptr] |
113 | ; HASH: string V_C, the client's version string (CR and NL excluded) |
113 | ; HASH: string V_C, the client's version string (CR and NL excluded) |
Line 114... | Line 114... | ||
114 | invoke sha256_update, [ctx_ptr], ssh_ident_ha, ssh_msg_ident.length+4-2 |
114 | invoke sha2_256_update, [ctx_ptr], ssh_ident_ha, ssh_msg_ident.length+4-2 |
115 | 115 | ||
116 | ; >> Send our identification string |
116 | ; >> Send our identification string |
117 | DEBUGF 2, "Sending ID string\n" |
117 | DEBUGF 2, "Sending ID string\n" |
Line 136... | Line 136... | ||
136 | lea ecx, [eax+2] |
136 | lea ecx, [eax+2] |
137 | sub eax, 2 |
137 | sub eax, 2 |
138 | bswap eax |
138 | bswap eax |
139 | sub edx, 4 |
139 | sub edx, 4 |
140 | mov dword[edx], eax |
140 | mov dword[edx], eax |
141 | invoke sha256_update, [ctx_ptr], edx, ecx |
141 | invoke sha2_256_update, [ctx_ptr], edx, ecx |
Line 142... | Line 142... | ||
142 | 142 | ||
143 | ; >> Key Exchange init |
143 | ; >> Key Exchange init |
144 | mov eax, [con_ptr] |
144 | mov eax, [con_ptr] |
Line 189... | Line 189... | ||
189 | dec eax |
189 | dec eax |
190 | lea edx, [eax+4] |
190 | lea edx, [eax+4] |
191 | bswap eax |
191 | bswap eax |
192 | lea esi, [esi+sshlib_connection.tx_buffer+1] |
192 | lea esi, [esi+sshlib_connection.tx_buffer+1] |
193 | mov dword[esi], eax |
193 | mov dword[esi], eax |
194 | invoke sha256_update, [ctx_ptr], esi, edx |
194 | invoke sha2_256_update, [ctx_ptr], esi, edx |
Line 195... | Line 195... | ||
195 | 195 | ||
196 | ; << Check key exchange init of server |
196 | ; << Check key exchange init of server |
197 | stdcall sshlib_recv_packet, [con_ptr], 0 |
197 | stdcall sshlib_recv_packet, [con_ptr], 0 |
198 | cmp eax, -1 |
198 | cmp eax, -1 |
Line 267... | Line 267... | ||
267 | dec eax |
267 | dec eax |
268 | lea edx, [eax+4] |
268 | lea edx, [eax+4] |
269 | bswap eax |
269 | bswap eax |
270 | lea esi, [esi+sshlib_connection.rx_buffer+1] |
270 | lea esi, [esi+sshlib_connection.rx_buffer+1] |
271 | mov dword[esi], eax |
271 | mov dword[esi], eax |
272 | invoke sha256_update, [ctx_ptr], esi, edx |
272 | invoke sha2_256_update, [ctx_ptr], esi, edx |
Line 273... | Line 273... | ||
273 | 273 | ||
Line 274... | Line 274... | ||
274 | ; Exchange keys with the server |
274 | ; Exchange keys with the server |
275 | 275 |