comparison svr-authpubkey.c @ 854:ccc76acaf4c7

merge ecc again
author Matt Johnston <matt@ucc.asn.au>
date Thu, 14 Nov 2013 20:45:46 +0800
parents b11cb2518116
children 703c7cdd2577
comparison
equal deleted inserted replaced
845:774ad9b112ef 854:ccc76acaf4c7
87 unsigned char* keyblob = NULL; 87 unsigned char* keyblob = NULL;
88 unsigned int keybloblen; 88 unsigned int keybloblen;
89 buffer * signbuf = NULL; 89 buffer * signbuf = NULL;
90 sign_key * key = NULL; 90 sign_key * key = NULL;
91 char* fp = NULL; 91 char* fp = NULL;
92 int type = -1; 92 enum signkey_type type = -1;
93 93
94 TRACE(("enter pubkeyauth")) 94 TRACE(("enter pubkeyauth"))
95 95
96 /* 0 indicates user just wants to check if key can be used, 1 is an 96 /* 0 indicates user just wants to check if key can be used, 1 is an
97 * actual attempt*/ 97 * actual attempt*/
292 options_len++; 292 options_len++;
293 } 293 }
294 options_buf = buf_new(options_len); 294 options_buf = buf_new(options_len);
295 buf_putbytes(options_buf, options_start, options_len); 295 buf_putbytes(options_buf, options_start, options_len);
296 296
297 /* compare the algorithm */ 297 /* compare the algorithm. +3 so we have enough bytes to read a space and some base64 characters too. */
298 if (line->pos + algolen > line->len) { 298 if (line->pos + algolen+3 > line->len) {
299 continue; 299 continue;
300 } 300 }
301 if (strncmp(buf_getptr(line, algolen), algo, algolen) != 0) { 301 if (strncmp(buf_getptr(line, algolen), algo, algolen) != 0) {
302 continue; 302 continue;
303 } 303 }