Mercurial > dropbear
diff signkey.c @ 1121:bb3a03feb31f
Merge pull request #13 from gazoo74/fix-warnings
Fix warnings
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 04 Jun 2015 22:25:28 +0800 |
parents | c45d65392c1a |
children | aaf576b27a10 |
line wrap: on
line diff
--- a/signkey.c Wed Jun 03 22:59:59 2015 +0800 +++ b/signkey.c Thu Jun 04 22:25:28 2015 +0800 @@ -138,14 +138,14 @@ * on return is set to the type read (useful when type = _ANY) */ int buf_get_pub_key(buffer *buf, sign_key *key, enum signkey_type *type) { - unsigned char* ident; + char *ident; unsigned int len; enum signkey_type keytype; int ret = DROPBEAR_FAILURE; TRACE2(("enter buf_get_pub_key")) - ident = buf_getstring(buf, &len); + ident = (char *) buf_getstring(buf, &len); keytype = signkey_type_from_name(ident, len); m_free(ident); @@ -209,14 +209,14 @@ * on return is set to the type read (useful when type = _ANY) */ int buf_get_priv_key(buffer *buf, sign_key *key, enum signkey_type *type) { - unsigned char* ident; + char *ident; unsigned int len; enum signkey_type keytype; int ret = DROPBEAR_FAILURE; TRACE2(("enter buf_get_priv_key")) - ident = buf_getstring(buf, &len); + ident = (char *)buf_getstring(buf, &len); keytype = signkey_type_from_name(ident, len); m_free(ident); @@ -515,14 +515,14 @@ * signature blob */ int buf_verify(buffer * buf, sign_key *key, buffer *data_buf) { - unsigned char * type_name = NULL; + char *type_name = NULL; unsigned int type_name_len = 0; enum signkey_type type; TRACE(("enter buf_verify")) buf_getint(buf); /* blob length */ - type_name = buf_getstring(buf, &type_name_len); + type_name = (char *) buf_getstring(buf, &type_name_len); type = signkey_type_from_name(type_name, type_name_len); m_free(type_name);