aboutsummaryrefslogtreecommitdiff
path: root/libssh/kex.c
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-04-05 09:46:47 +0000
committerAndreas Schneider <mail@cynapses.org>2009-04-05 09:46:47 +0000
commitb7c65baef3d073e3afbee9724e5d9ca5aff0d95b (patch)
tree3bf2b1720b064859d77d18b4aa48ce5520ab0faa /libssh/kex.c
parent139eb4696c990e8429f2bc3abf1d9bb144effdee (diff)
downloadlibssh-b7c65baef3d073e3afbee9724e5d9ca5aff0d95b.tar.gz
libssh-b7c65baef3d073e3afbee9724e5d9ca5aff0d95b.tar.xz
libssh-b7c65baef3d073e3afbee9724e5d9ca5aff0d95b.zip
Fix build warnings in key exchange functions.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@395 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh/kex.c')
-rw-r--r--libssh/kex.c53
1 files changed, 42 insertions, 11 deletions
diff --git a/libssh/kex.c b/libssh/kex.c
index f26c4bd1..4ad622e0 100644
--- a/libssh/kex.c
+++ b/libssh/kex.c
@@ -56,17 +56,48 @@
#define ZLIB "none"
#endif
-char *default_methods[]={
- "diffie-hellman-group1-sha1","ssh-dss,ssh-rsa",AES BLOWFISH DES,AES BLOWFISH
- DES, "hmac-sha1","hmac-sha1","none","none","","",NULL };
-char *supported_methods[]={
- "diffie-hellman-group1-sha1","ssh-dss,ssh-rsa",AES BLOWFISH DES,AES BLOWFISH
- DES, "hmac-sha1","hmac-sha1",ZLIB,ZLIB,"","",NULL };
+const char *default_methods[] = {
+ "diffie-hellman-group1-sha1",
+ "ssh-dss,ssh-rsa",
+ AES BLOWFISH DES,
+ AES BLOWFISH DES,
+ "hmac-sha1",
+ "hmac-sha1",
+ "none",
+ "none",
+ "",
+ "",
+ NULL
+};
+
+const char *supported_methods[] = {
+ "diffie-hellman-group1-sha1",
+ "ssh-dss,ssh-rsa",
+ AES BLOWFISH DES,
+ AES BLOWFISH DES,
+ "hmac-sha1",
+ "hmac-sha1",
+ ZLIB,
+ ZLIB,
+ "",
+ "",
+ NULL
+};
+
/* descriptions of the key exchange packet */
-char *ssh_kex_nums[]={
- "kex algos","server host key algo","encryption client->server","encryption server->client",
- "mac algo client->server","mac algo server->client","compression algo client->server",
- "compression algo server->client","languages client->server","languages server->client",NULL};
+const char *ssh_kex_nums[] = {
+ "kex algos",
+ "server host key algo",
+ "encryption client->server",
+ "encryption server->client",
+ "mac algo client->server",
+ "mac algo server->client",
+ "compression algo client->server",
+ "compression algo server->client",
+ "languages client->server",
+ "languages server->client",
+ NULL
+};
/* tokenize will return a token of strings delimited by ",". the first element has to be freed */
static char **tokenize(const char *chain){
@@ -269,7 +300,7 @@ int set_kex(SSH_SESSION *session){
KEX *client=&session->client_kex;
SSH_OPTIONS *options=session->options;
int i;
- char *wanted;
+ const char *wanted;
enter_function();
/* the client might ask for a specific cookie to be sent. useful for server debugging */
if(options->wanted_cookie)