summaryrefslogtreecommitdiffhomepage
path: root/cli-authinteract.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2015-06-04 23:08:50 +0800
committerMatt Johnston <matt@ucc.asn.au>2015-06-04 23:08:50 +0800
commit1a4db21fe4e06f4a5e5b74e35027091370b54abb (patch)
tree7543bf0e7a5d133c5564dd0ddcf35685bc308a98 /cli-authinteract.c
parente7ac4c1ab3eee827d781ececf6c7342c432b91d3 (diff)
buf_getstring and buf_putstring now use non-unsigned char*
Diffstat (limited to 'cli-authinteract.c')
-rw-r--r--cli-authinteract.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/cli-authinteract.c b/cli-authinteract.c
index 02aeab8..49d65a7 100644
--- a/cli-authinteract.c
+++ b/cli-authinteract.c
@@ -84,8 +84,8 @@ void recv_msg_userauth_info_request() {
}
cli_ses.interact_request_received = 1;
- name = (char *)buf_getstring(ses.payload, NULL);
- instruction = (char *)buf_getstring(ses.payload, NULL);
+ name = buf_getstring(ses.payload, NULL);
+ instruction = buf_getstring(ses.payload, NULL);
/* language tag */
buf_eatstring(ses.payload);
@@ -115,7 +115,7 @@ void recv_msg_userauth_info_request() {
for (i = 0; i < num_prompts; i++) {
unsigned int response_len = 0;
- prompt = (char *)buf_getstring(ses.payload, NULL);
+ prompt = buf_getstring(ses.payload, NULL);
cleantext(prompt);
echo = buf_getbool(ses.payload);
@@ -129,7 +129,7 @@ void recv_msg_userauth_info_request() {
}
response_len = strlen(response);
- buf_putstring(ses.writepayload, (const unsigned char *)response, response_len);
+ buf_putstring(ses.writepayload, response, response_len);
m_burn(response, response_len);
m_free(prompt);
m_free(response);
@@ -149,22 +149,22 @@ void cli_auth_interactive() {
buf_putbyte(ses.writepayload, SSH_MSG_USERAUTH_REQUEST);
/* username */
- buf_putstring(ses.writepayload, (const unsigned char *)cli_opts.username,
+ buf_putstring(ses.writepayload, cli_opts.username,
strlen(cli_opts.username));
/* service name */
- buf_putstring(ses.writepayload, (const unsigned char *)SSH_SERVICE_CONNECTION,
+ buf_putstring(ses.writepayload, SSH_SERVICE_CONNECTION,
SSH_SERVICE_CONNECTION_LEN);
/* method */
- buf_putstring(ses.writepayload, (const unsigned char *)AUTH_METHOD_INTERACT,
+ buf_putstring(ses.writepayload, AUTH_METHOD_INTERACT,
AUTH_METHOD_INTERACT_LEN);
/* empty language tag */
- buf_putstring(ses.writepayload, (const unsigned char *)"", 0);
+ buf_putstring(ses.writepayload, "", 0);
/* empty submethods */
- buf_putstring(ses.writepayload, (const unsigned char *)"", 0);
+ buf_putstring(ses.writepayload, "", 0);
encrypt_packet();
cli_ses.interact_request_received = 0;