summaryrefslogtreecommitdiffhomepage
path: root/cli-authpubkey.c
diff options
context:
space:
mode:
authorGaël PORTAY <gael.portay@gmail.com>2015-05-02 15:59:06 +0200
committerGaël PORTAY <gael.portay@gmail.com>2015-05-05 20:39:13 +0200
commit224b16b2470ab764e854eb4a7cdd568353655afc (patch)
treeeba9e3ed33fd1c66c6286abaf3f3e383f2eb8504 /cli-authpubkey.c
parentef0aac432c986f52a1b973bcd73ddf7324e0e70f (diff)
Fix pointer differ in signess warnings [-Werror=pointer-sign]
Diffstat (limited to 'cli-authpubkey.c')
-rw-r--r--cli-authpubkey.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/cli-authpubkey.c b/cli-authpubkey.c
index cdef36e..fa04f17 100644
--- a/cli-authpubkey.c
+++ b/cli-authpubkey.c
@@ -63,7 +63,7 @@ void recv_msg_userauth_pk_ok() {
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 @@ void cli_buf_put_sign(buffer* buf, sign_key *key, int type,
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 @@ static void send_msg_userauth_pubkey(sign_key *key, int type, int realsign) {
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) {