summaryrefslogtreecommitdiff
path: root/signkey.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2010-07-21 12:55:25 +0000
committerMatt Johnston <matt@ucc.asn.au>2010-07-21 12:55:25 +0000
commit2f797b76992ce382d13a229cb0882e060cd297fc (patch)
tree6959f8ef7d3488ab5e198de958fbf52467218097 /signkey.c
parent4bdf1aa1eb8e4fb38a8b3f6693e110397712bf5e (diff)
downloaddropbear-2f797b76992ce382d13a229cb0882e060cd297fc.tar.gz
Rename rsa_key to dropbear_rsa_key (and same for dss too) so
we don't conflict with libtomcrypt.
Diffstat (limited to 'signkey.c')
-rw-r--r--signkey.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/signkey.c b/signkey.c
index 612fd58..2c50537 100644
--- a/signkey.c
+++ b/signkey.c
@@ -119,7 +119,7 @@ int buf_get_pub_key(buffer *buf, sign_key *key, int *type) {
#ifdef DROPBEAR_DSS
if (keytype == DROPBEAR_SIGNKEY_DSS) {
dss_key_free(key->dsskey);
- key->dsskey = (dss_key*)m_malloc(sizeof(dss_key));
+ key->dsskey = m_malloc(sizeof(*key->dsskey));
ret = buf_get_dss_pub_key(buf, key->dsskey);
if (ret == DROPBEAR_FAILURE) {
m_free(key->dsskey);
@@ -129,7 +129,7 @@ int buf_get_pub_key(buffer *buf, sign_key *key, int *type) {
#ifdef DROPBEAR_RSA
if (keytype == DROPBEAR_SIGNKEY_RSA) {
rsa_key_free(key->rsakey);
- key->rsakey = (rsa_key*)m_malloc(sizeof(rsa_key));
+ key->rsakey = m_malloc(sizeof(*key->rsakey));
ret = buf_get_rsa_pub_key(buf, key->rsakey);
if (ret == DROPBEAR_FAILURE) {
m_free(key->rsakey);
@@ -172,7 +172,7 @@ int buf_get_priv_key(buffer *buf, sign_key *key, int *type) {
#ifdef DROPBEAR_DSS
if (keytype == DROPBEAR_SIGNKEY_DSS) {
dss_key_free(key->dsskey);
- key->dsskey = (dss_key*)m_malloc(sizeof(dss_key));
+ key->dsskey = m_malloc(sizeof(*key->dsskey));
ret = buf_get_dss_priv_key(buf, key->dsskey);
if (ret == DROPBEAR_FAILURE) {
m_free(key->dsskey);
@@ -182,7 +182,7 @@ int buf_get_priv_key(buffer *buf, sign_key *key, int *type) {
#ifdef DROPBEAR_RSA
if (keytype == DROPBEAR_SIGNKEY_RSA) {
rsa_key_free(key->rsakey);
- key->rsakey = (rsa_key*)m_malloc(sizeof(rsa_key));
+ key->rsakey = m_malloc(sizeof(*key->rsakey));
ret = buf_get_rsa_priv_key(buf, key->rsakey);
if (ret == DROPBEAR_FAILURE) {
m_free(key->rsakey);