1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-02 01:17:52 +03:00

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
This commit is contained in:
Andreas Schneider
2009-04-05 09:46:47 +00:00
parent 139eb4696c
commit b7c65baef3
2 changed files with 44 additions and 13 deletions

View File

@@ -263,7 +263,7 @@ typedef struct ssh_crypto_struct {
unsigned char hmacbuf[EVP_MAX_MD_SIZE]; unsigned char hmacbuf[EVP_MAX_MD_SIZE];
struct crypto_struct *in_cipher, *out_cipher; /* the cipher structures/objects */ struct crypto_struct *in_cipher, *out_cipher; /* the cipher structures/objects */
STRING *server_pubkey; STRING *server_pubkey;
char *server_pubkey_type; const char *server_pubkey_type;
int do_compress_out; /* idem */ int do_compress_out; /* idem */
int do_compress_in; /* don't set them, set the option instead */ int do_compress_in; /* don't set them, set the option instead */
void *compress_out_ctx; /* don't touch it */ void *compress_out_ctx; /* don't touch it */
@@ -562,7 +562,7 @@ socket_t ssh_connect_host(SSH_SESSION *session, const char *host,const char
*bind_addr, int port, long timeout, long usec); *bind_addr, int port, long timeout, long usec);
/* in kex.c */ /* in kex.c */
extern char *ssh_kex_nums[]; extern const char *ssh_kex_nums[];
void ssh_send_kex(SSH_SESSION *session,int server_kex); void ssh_send_kex(SSH_SESSION *session,int server_kex);
void ssh_list_kex(SSH_SESSION *session, KEX *kex); void ssh_list_kex(SSH_SESSION *session, KEX *kex);
int set_kex(SSH_SESSION *session); int set_kex(SSH_SESSION *session);

View File

@@ -56,17 +56,48 @@
#define ZLIB "none" #define ZLIB "none"
#endif #endif
char *default_methods[]={ const char *default_methods[] = {
"diffie-hellman-group1-sha1","ssh-dss,ssh-rsa",AES BLOWFISH DES,AES BLOWFISH "diffie-hellman-group1-sha1",
DES, "hmac-sha1","hmac-sha1","none","none","","",NULL }; "ssh-dss,ssh-rsa",
char *supported_methods[]={ AES BLOWFISH DES,
"diffie-hellman-group1-sha1","ssh-dss,ssh-rsa",AES BLOWFISH DES,AES BLOWFISH AES BLOWFISH DES,
DES, "hmac-sha1","hmac-sha1",ZLIB,ZLIB,"","",NULL }; "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 */ /* descriptions of the key exchange packet */
char *ssh_kex_nums[]={ const char *ssh_kex_nums[] = {
"kex algos","server host key algo","encryption client->server","encryption server->client", "kex algos",
"mac algo client->server","mac algo server->client","compression algo client->server", "server host key algo",
"compression algo server->client","languages client->server","languages server->client",NULL}; "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 */ /* tokenize will return a token of strings delimited by ",". the first element has to be freed */
static char **tokenize(const char *chain){ static char **tokenize(const char *chain){
@@ -269,7 +300,7 @@ int set_kex(SSH_SESSION *session){
KEX *client=&session->client_kex; KEX *client=&session->client_kex;
SSH_OPTIONS *options=session->options; SSH_OPTIONS *options=session->options;
int i; int i;
char *wanted; const char *wanted;
enter_function(); enter_function();
/* the client might ask for a specific cookie to be sent. useful for server debugging */ /* the client might ask for a specific cookie to be sent. useful for server debugging */
if(options->wanted_cookie) if(options->wanted_cookie)