Mercurial > dropbear
comparison ecdsa.c @ 801:7dcb46da72d9 ecc
merge in HEAD
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 21 May 2013 12:09:35 +0800 |
parents | 069b875031f5 |
children | b298bb438625 |
comparison
equal
deleted
inserted
replaced
799:c344607b7341 | 801:7dcb46da72d9 |
---|---|
240 // returns values in s and r | 240 // returns values in s and r |
241 // returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE | 241 // returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE |
242 static int buf_get_ecdsa_verify_params(buffer *buf, struct dropbear_ecc_curve *curve, | 242 static int buf_get_ecdsa_verify_params(buffer *buf, struct dropbear_ecc_curve *curve, |
243 void *r, void* s) { | 243 void *r, void* s) { |
244 int ret = DROPBEAR_FAILURE; | 244 int ret = DROPBEAR_FAILURE; |
245 unsigned char* ident = NULL; | |
246 unsigned int ident_len; | |
247 unsigned int sig_len; | 245 unsigned int sig_len; |
248 unsigned int sig_pos; | 246 unsigned int sig_pos; |
249 unsigned char key_ident[30]; | |
250 | 247 |
251 sig_len = buf_getint(buf); | 248 sig_len = buf_getint(buf); |
252 sig_pos = buf->pos; | 249 sig_pos = buf->pos; |
253 if (buf_getmpint(buf, r) != DROPBEAR_SUCCESS) { | 250 if (buf_getmpint(buf, r) != DROPBEAR_SUCCESS) { |
254 goto out; | 251 goto out; |
260 goto out; | 257 goto out; |
261 } | 258 } |
262 ret = DROPBEAR_SUCCESS; | 259 ret = DROPBEAR_SUCCESS; |
263 | 260 |
264 out: | 261 out: |
265 m_free(ident); | |
266 return ret; | 262 return ret; |
267 } | 263 } |
268 | 264 |
269 | 265 |
270 int buf_ecdsa_verify(buffer *buf, ecc_key *key, buffer *data_buf) { | 266 int buf_ecdsa_verify(buffer *buf, ecc_key *key, buffer *data_buf) { |