diff options
author | Matt Johnston <matt@ucc.asn.au> | 2013-05-23 22:18:16 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2013-05-23 22:18:16 +0800 |
commit | d9e790e7dc7737158c9affb7087035dd2c31c003 (patch) | |
tree | 0e610eace4bd5b3f25812e30b85b0c22063c28ef /gendss.c | |
parent | 51b5cdd4308f4236d4d1453d482d0086d11a851e (diff) |
Add m_mp_alloc_init_multi() helper
--HG--
branch : ecc
Diffstat (limited to 'gendss.c')
-rw-r--r-- | gendss.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -53,12 +53,7 @@ dropbear_dss_key * gen_dss_priv_key(unsigned int size) { key = m_malloc(sizeof(*key)); - key->p = (mp_int*)m_malloc(sizeof(mp_int)); - key->q = (mp_int*)m_malloc(sizeof(mp_int)); - key->g = (mp_int*)m_malloc(sizeof(mp_int)); - key->y = (mp_int*)m_malloc(sizeof(mp_int)); - key->x = (mp_int*)m_malloc(sizeof(mp_int)); - m_mp_init_multi(key->p, key->q, key->g, key->y, key->x, NULL); + m_mp_alloc_init_multi(&key->p, &key->q, &key->g, &key->y, &key->x, NULL); getq(key); getp(key, size/8); |