comparison dropbearkey.c @ 807:75509065db53 ecc

have separate ecdsa keys for each size fix crash from the mp_alloc_init_multi change in RSA
author Matt Johnston <matt@ucc.asn.au>
date Sat, 25 May 2013 00:54:19 +0800
parents c344607b7341
children 5128e525c8fa
comparison
equal deleted inserted replaced
806:71e7d31f7671 807:75509065db53
264 key->dsskey = gen_dss_priv_key(bits); 264 key->dsskey = gen_dss_priv_key(bits);
265 break; 265 break;
266 #endif 266 #endif
267 #ifdef DROPBEAR_ECDSA 267 #ifdef DROPBEAR_ECDSA
268 case DROPBEAR_SIGNKEY_ECDSA_KEYGEN: 268 case DROPBEAR_SIGNKEY_ECDSA_KEYGEN:
269 key->ecckey = gen_ecdsa_priv_key(bits); 269 {
270 keytype = ecdsa_signkey_type(key->ecckey); 270 ecc_key *ecckey = gen_ecdsa_priv_key(bits);
271 keytype = ecdsa_signkey_type(ecckey);
272 *signkey_ecc_key_ptr(key, keytype) = ecckey;
273 }
271 break; 274 break;
272 #endif 275 #endif
273 default: 276 default:
274 fprintf(stderr, "Internal error, bad key type\n"); 277 fprintf(stderr, "Internal error, bad key type\n");
275 exit(EXIT_FAILURE); 278 exit(EXIT_FAILURE);