Home | History | Annotate | Download | only in dropbear

Lines Matching refs:line

217 	buffer * line = NULL;
227 line = buf_new(MAX_KNOWNHOSTS_LINE);
232 if (buf_getline(line, hostsfile) == DROPBEAR_FAILURE) {
233 TRACE(("failed reading line: prob EOF"))
237 /* The line is too short to be sensible */
241 if (line->len < (hostlen+30) ) {
242 TRACE(("line is too short to be sensible"))
247 if (strncmp(cli_opts.remotehost, buf_getptr(line, hostlen),
253 buf_incrpos(line, hostlen);
254 if (buf_getbyte(line) != ' ') {
260 if (strncmp(buf_getptr(line, algolen), algoname, algolen) != 0) {
265 buf_incrpos(line, algolen);
266 if (buf_getbyte(line) != ' ') {
273 line, &fingerprint);
305 buf_setpos(line, 0);
306 buf_setlen(line, 0);
307 buf_putbytes(line, ses.remotehost, hostlen);
308 buf_putbyte(line, ' ');
309 buf_putbytes(line, algoname, algolen);
310 buf_putbyte(line, ' ');
311 len = line->size - line->pos;
315 base64_encode(keyblob, keybloblen, buf_getwriteptr(line, len), &len);
316 buf_incrwritepos(line, len);
317 buf_putbyte(line, '\n');
318 buf_setpos(line, 0);
319 fwrite(buf_getptr(line, line->len), line->len, 1, hostsfile);
327 if (line != NULL) {
328 buf_free(line);