Mercurial > dropbear
diff keyimport.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 | 845922d73e9c |
children | aaf576b27a10 d7b752525b91 |
line wrap: on
line diff
--- a/keyimport.c Wed Jun 03 22:59:59 2015 +0800 +++ b/keyimport.c Thu Jun 04 22:25:28 2015 +0800 @@ -193,7 +193,7 @@ static void base64_encode_fp(FILE * fp, unsigned char *data, int datalen, int cpl) { - char out[100]; + unsigned char out[100]; int n; unsigned long outlen; int rawcpl; @@ -445,7 +445,7 @@ ret->keyblob_size); } outlen = ret->keyblob_size - ret->keyblob_len; - if (base64_decode(buffer, len, + if (base64_decode((const unsigned char *)buffer, len, ret->keyblob + ret->keyblob_len, &outlen) != CRYPT_OK){ errmsg = "Error decoding base64"; goto error; @@ -507,7 +507,7 @@ int i, num_integers = 0; sign_key *retval = NULL; char *errmsg; - char *modptr = NULL; + unsigned char *modptr = NULL; int modlen = -9999; enum signkey_type type; @@ -602,13 +602,13 @@ #ifdef DROPBEAR_DSS if (key->type == OSSH_DSA) { - buf_putstring(blobbuf, "ssh-dss", 7); + buf_putstring(blobbuf, (const unsigned char *)"ssh-dss", 7); retkey->type = DROPBEAR_SIGNKEY_DSS; } #endif #ifdef DROPBEAR_RSA if (key->type == OSSH_RSA) { - buf_putstring(blobbuf, "ssh-rsa", 7); + buf_putstring(blobbuf, (const unsigned char *)"ssh-rsa", 7); retkey->type = DROPBEAR_SIGNKEY_RSA; } #endif @@ -646,7 +646,7 @@ */ if (i == 1) { /* Save the details for after we deal with number 2. */ - modptr = (char *)p; + modptr = p; modlen = len; } else if (i >= 2 && i <= 5) { buf_putstring(blobbuf, p, len); @@ -1043,7 +1043,7 @@ int curve_oid_len = 0; const void* curve_oid = NULL; unsigned long pubkey_size = 2*curve_size+1; - unsigned int k_size; + int k_size; int err = 0; /* version. less than 10 bytes */