Mercurial > dropbear
diff cli-authpubkey.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/cli-authpubkey.c Wed Jun 03 22:59:59 2015 +0800 +++ b/cli-authpubkey.c Thu Jun 04 22:25:28 2015 +0800 @@ -63,7 +63,7 @@ TRACE(("enter recv_msg_userauth_pk_ok")) - algotype = buf_getstring(ses.payload, &algolen); + algotype = (char *)buf_getstring(ses.payload, &algolen); keytype = signkey_type_from_name(algotype, algolen); TRACE(("recv_msg_userauth_pk_ok: type %d", keytype)) m_free(algotype); @@ -141,7 +141,7 @@ static void send_msg_userauth_pubkey(sign_key *key, int type, int realsign) { const char *algoname = NULL; - int algolen; + unsigned int algolen; buffer* sigbuf = NULL; TRACE(("enter send_msg_userauth_pubkey")) @@ -149,20 +149,20 @@ buf_putbyte(ses.writepayload, SSH_MSG_USERAUTH_REQUEST); - buf_putstring(ses.writepayload, cli_opts.username, + buf_putstring(ses.writepayload, (const unsigned char *)cli_opts.username, strlen(cli_opts.username)); - buf_putstring(ses.writepayload, SSH_SERVICE_CONNECTION, + buf_putstring(ses.writepayload, (const unsigned char *)SSH_SERVICE_CONNECTION, SSH_SERVICE_CONNECTION_LEN); - buf_putstring(ses.writepayload, AUTH_METHOD_PUBKEY, + buf_putstring(ses.writepayload, (const unsigned char *)AUTH_METHOD_PUBKEY, AUTH_METHOD_PUBKEY_LEN); buf_putbyte(ses.writepayload, realsign); algoname = signkey_name_from_type(type, &algolen); - buf_putstring(ses.writepayload, algoname, algolen); + buf_putstring(ses.writepayload, (const unsigned char *)algoname, algolen); buf_put_pub_key(ses.writepayload, key, type); if (realsign) {