Mercurial > dropbear
comparison svr-authpubkey.c @ 1123:d7b752525b91
buf_getstring and buf_putstring now use non-unsigned char*
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 04 Jun 2015 23:08:50 +0800 |
parents | 83025b7063ec |
children | 9169e4e7cbee |
comparison
equal
deleted
inserted
replaced
1121:bb3a03feb31f | 1123:d7b752525b91 |
---|---|
96 | 96 |
97 /* 0 indicates user just wants to check if key can be used, 1 is an | 97 /* 0 indicates user just wants to check if key can be used, 1 is an |
98 * actual attempt*/ | 98 * actual attempt*/ |
99 testkey = (buf_getbool(ses.payload) == 0); | 99 testkey = (buf_getbool(ses.payload) == 0); |
100 | 100 |
101 algo = (char *) buf_getstring(ses.payload, &algolen); | 101 algo = buf_getstring(ses.payload, &algolen); |
102 keybloblen = buf_getint(ses.payload); | 102 keybloblen = buf_getint(ses.payload); |
103 keyblob = buf_getptr(ses.payload, keybloblen); | 103 keyblob = buf_getptr(ses.payload, keybloblen); |
104 | 104 |
105 /* check if the key is valid */ | 105 /* check if the key is valid */ |
106 if (checkpubkey(algo, algolen, keyblob, keybloblen) == DROPBEAR_FAILURE) { | 106 if (checkpubkey(algo, algolen, keyblob, keybloblen) == DROPBEAR_FAILURE) { |
178 | 178 |
179 TRACE(("enter send_msg_userauth_pk_ok")) | 179 TRACE(("enter send_msg_userauth_pk_ok")) |
180 CHECKCLEARTOWRITE(); | 180 CHECKCLEARTOWRITE(); |
181 | 181 |
182 buf_putbyte(ses.writepayload, SSH_MSG_USERAUTH_PK_OK); | 182 buf_putbyte(ses.writepayload, SSH_MSG_USERAUTH_PK_OK); |
183 buf_putstring(ses.writepayload, (const unsigned char *) algo, algolen); | 183 buf_putstring(ses.writepayload, algo, algolen); |
184 buf_putstring(ses.writepayload, keyblob, keybloblen); | 184 buf_putstring(ses.writepayload, (const char*)keyblob, keybloblen); |
185 | 185 |
186 encrypt_packet(); | 186 encrypt_packet(); |
187 TRACE(("leave send_msg_userauth_pk_ok")) | 187 TRACE(("leave send_msg_userauth_pk_ok")) |
188 | 188 |
189 } | 189 } |