changeset 1108:2ebf450edc2d

Turn sshsession's remoteident attribute into char *
author Gaël PORTAY <gael.portay@gmail.com>
date Sat, 02 May 2015 22:48:11 +0200
parents 4f3335bba3d9
children 2c646a65a1e3
files common-kex.c session.h
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/common-kex.c	Sat May 02 13:59:41 2015 +0200
+++ b/common-kex.c	Sat May 02 22:48:11 2015 +0200
@@ -511,7 +511,7 @@
 
 	/* 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 @@
 	    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 @@
 		/* 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);
--- a/session.h	Sat May 02 13:59:41 2015 +0200
+++ b/session.h	Sat May 02 22:48:11 2015 +0200
@@ -115,7 +115,7 @@
 	/* 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() */