summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGaël PORTAY <gael.portay@gmail.com>2015-05-02 22:48:11 +0200
committerGaël PORTAY <gael.portay@gmail.com>2015-05-05 20:39:14 +0200
commit947d2697cf01acd28ce7eb619dbcec2ac4a0e381 (patch)
tree09fb9dc3873f5c3e86c7b0ba384bfc18b8c691b0
parent449ddae628ea23f8b1e7179ab3ff2c81cffa57a0 (diff)
Turn sshsession's remoteident attribute into char *
-rw-r--r--common-kex.c6
-rw-r--r--session.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/common-kex.c b/common-kex.c
index c823f19..4de4b52 100644
--- a/common-kex.c
+++ b/common-kex.c
@@ -511,7 +511,7 @@ void recv_msg_kexinit() {
/* start the kex hash */
local_ident_len = strlen(LOCAL_IDENT);
- remote_ident_len = strlen((char*)ses.remoteident);
+ remote_ident_len = strlen(ses.remoteident);
kexhashbuf_len = local_ident_len + remote_ident_len
+ ses.transkexinit->len + ses.payload->len
@@ -528,7 +528,7 @@ void recv_msg_kexinit() {
buf_putstring(ses.kexhashbuf,
(unsigned char*)LOCAL_IDENT, local_ident_len);
/* V_S, the server's version string (CR and NL excluded) */
- buf_putstring(ses.kexhashbuf, ses.remoteident, remote_ident_len);
+ buf_putstring(ses.kexhashbuf, (unsigned char*)ses.remoteident, remote_ident_len);
/* I_C, the payload of the client's SSH_MSG_KEXINIT */
buf_putstring(ses.kexhashbuf,
@@ -545,7 +545,7 @@ void recv_msg_kexinit() {
/* read the peer's choice of algos */
read_kex_algos();
/* V_C, the client's version string (CR and NL excluded) */
- buf_putstring(ses.kexhashbuf, ses.remoteident, remote_ident_len);
+ buf_putstring(ses.kexhashbuf, (unsigned char*)ses.remoteident, remote_ident_len);
/* V_S, the server's version string (CR and NL excluded) */
buf_putstring(ses.kexhashbuf,
(unsigned char*)LOCAL_IDENT, local_ident_len);
diff --git a/session.h b/session.h
index 0c96075..99c96cb 100644
--- a/session.h
+++ b/session.h
@@ -115,7 +115,7 @@ struct sshsession {
/* remotehost will be initially NULL as we delay
* reading the remote version string. it will be set
* by the time any recv_() packet methods are called */
- unsigned char *remoteident;
+ char *remoteident;
int maxfd; /* the maximum file descriptor to check with select() */