comparison gensignkey.c @ 852:7540c0822374 ecc

Various cleanups and fixes for warnings
author Matt Johnston <matt@ucc.asn.au>
date Tue, 12 Nov 2013 23:02:32 +0800
parents f4bb964c8678
children 04ede40a529a
comparison
equal deleted inserted replaced
851:c1c1b43f78c2 852:7540c0822374
83 } 83 }
84 84
85 /* now we can generate the key */ 85 /* now we can generate the key */
86 key = new_sign_key(); 86 key = new_sign_key();
87 87
88 seedrandom();
89
88 switch(keytype) { 90 switch(keytype) {
89 #ifdef DROPBEAR_RSA 91 #ifdef DROPBEAR_RSA
90 case DROPBEAR_SIGNKEY_RSA: 92 case DROPBEAR_SIGNKEY_RSA:
91 key->rsakey = gen_rsa_priv_key(bits); 93 key->rsakey = gen_rsa_priv_key(bits);
92 break; 94 break;
110 #endif 112 #endif
111 default: 113 default:
112 dropbear_exit("Internal error"); 114 dropbear_exit("Internal error");
113 } 115 }
114 116
117 seedrandom();
118
115 buf = buf_new(MAX_PRIVKEY_SIZE); 119 buf = buf_new(MAX_PRIVKEY_SIZE);
116 120
117 buf_put_priv_key(buf, key, keytype); 121 buf_put_priv_key(buf, key, keytype);
118 sign_key_free(key); 122 sign_key_free(key);
119 key = NULL; 123 key = NULL;