diff keyimport.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 71e7d31f7671
children d7d9f1612d51 d4ce5269a439
line wrap: on
line diff
--- a/keyimport.c	Thu May 23 22:18:33 2013 +0800
+++ b/keyimport.c	Sat May 25 00:54:19 2013 +0800
@@ -680,7 +680,7 @@
 		int private_key_len = 0;
 		unsigned char* public_key_bytes = NULL;
 		int public_key_len = 0;
-		ecc_key *ecc;
+		ecc_key *ecc = NULL;
 		const struct dropbear_ecc_curve *curve = NULL;
 
 		// See SEC1 v2, Appendix C.4
@@ -774,7 +774,7 @@
 			goto error;
 		}
 
-		retkey->ecckey = ecc;
+		*signkey_ecc_key_ptr(retkey, retkey->type) = ecc;
 	}
 #endif // DROPBEAR_ECDSA