Mercurial > dropbear
diff common-kex.c @ 1251:52a456a3add0
Merge branch '20151231_indent' of https://github.com/fperrad/dropbear into fperrad-20151231_indent
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 15 Mar 2016 21:41:06 +0800 |
parents | 82e2037d34ea 2bb4c662d1c2 |
children | 9169e4e7cbee |
line wrap: on
line diff
--- a/common-kex.c Sat Mar 12 16:21:13 2016 +0800 +++ b/common-kex.c Tue Mar 15 21:41:06 2016 +0800 @@ -308,17 +308,17 @@ ses.hash = NULL; if (IS_DROPBEAR_CLIENT) { - trans_IV = C2S_IV; - recv_IV = S2C_IV; - trans_key = C2S_key; - recv_key = S2C_key; + trans_IV = C2S_IV; + recv_IV = S2C_IV; + trans_key = C2S_key; + recv_key = S2C_key; mactransletter = 'E'; macrecvletter = 'F'; } else { - trans_IV = S2C_IV; - recv_IV = C2S_IV; - trans_key = S2C_key; - recv_key = C2S_key; + trans_IV = S2C_IV; + recv_IV = C2S_IV; + trans_key = S2C_key; + recv_key = C2S_key; mactransletter = 'F'; macrecvletter = 'E'; } @@ -484,18 +484,18 @@ read_kex_algos(); /* V_C, the client's version string (CR and NL excluded) */ - buf_putstring(ses.kexhashbuf, LOCAL_IDENT, local_ident_len); + buf_putstring(ses.kexhashbuf, LOCAL_IDENT, local_ident_len); /* V_S, the server's version string (CR and NL excluded) */ - buf_putstring(ses.kexhashbuf, ses.remoteident, remote_ident_len); + buf_putstring(ses.kexhashbuf, ses.remoteident, remote_ident_len); /* I_C, the payload of the client's SSH_MSG_KEXINIT */ - buf_putstring(ses.kexhashbuf, + buf_putstring(ses.kexhashbuf, (const char*)ses.transkexinit->data, ses.transkexinit->len); /* I_S, the payload of the server's SSH_MSG_KEXINIT */ - buf_setpos(ses.payload, ses.payload_beginning); - buf_putstring(ses.kexhashbuf, - (const char*)buf_getptr(ses.payload, ses.payload->len-ses.payload->pos), - ses.payload->len-ses.payload->pos); + buf_setpos(ses.payload, ses.payload_beginning); + buf_putstring(ses.kexhashbuf, + (const char*)buf_getptr(ses.payload, ses.payload->len-ses.payload->pos), + ses.payload->len-ses.payload->pos); ses.requirenext = SSH_MSG_KEXDH_REPLY; } else { /* SERVER */ @@ -503,18 +503,18 @@ /* read the peer's choice of algos */ read_kex_algos(); /* V_C, the client's version string (CR and NL excluded) */ - buf_putstring(ses.kexhashbuf, ses.remoteident, remote_ident_len); + buf_putstring(ses.kexhashbuf, ses.remoteident, remote_ident_len); /* V_S, the server's version string (CR and NL excluded) */ - buf_putstring(ses.kexhashbuf, LOCAL_IDENT, local_ident_len); + buf_putstring(ses.kexhashbuf, LOCAL_IDENT, local_ident_len); /* I_C, the payload of the client's SSH_MSG_KEXINIT */ - buf_setpos(ses.payload, ses.payload_beginning); - buf_putstring(ses.kexhashbuf, - (const char*)buf_getptr(ses.payload, ses.payload->len-ses.payload->pos), - ses.payload->len-ses.payload->pos); + buf_setpos(ses.payload, ses.payload_beginning); + buf_putstring(ses.kexhashbuf, + (const char*)buf_getptr(ses.payload, ses.payload->len-ses.payload->pos), + ses.payload->len-ses.payload->pos); /* I_S, the payload of the server's SSH_MSG_KEXINIT */ - buf_putstring(ses.kexhashbuf, + buf_putstring(ses.kexhashbuf, (const char*)ses.transkexinit->data, ses.transkexinit->len); ses.requirenext = SSH_MSG_KEXDH_INIT;