summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--auth-options.c8
-rw-r--r--auth-rsa.c7
-rw-r--r--bufaux.c8
-rw-r--r--buffer.h4
-rw-r--r--channels.c7
-rw-r--r--hostfile.c17
-rw-r--r--hostfile.h4
-rw-r--r--mux.c19
-rw-r--r--packet.c11
-rw-r--r--packet.h4
-rw-r--r--roaming_common.c4
-rw-r--r--serverloop.c5
13 files changed, 60 insertions, 42 deletions
diff --git a/ChangeLog b/ChangeLog
index 5d4855d65..aa66e3b0b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -37,6 +37,10 @@
37 - markus@cvs.openbsd.org 2013/07/02 12:31:43 37 - markus@cvs.openbsd.org 2013/07/02 12:31:43
38 [dh.c] 38 [dh.c]
39 remove extra whitespace 39 remove extra whitespace
40 - djm@cvs.openbsd.org 2013/07/12 00:19:59
41 [auth-options.c auth-rsa.c bufaux.c buffer.h channels.c hostfile.c]
42 [hostfile.h mux.c packet.c packet.h roaming_common.c serverloop.c]
43 fix pointer-signedness warnings from clang/llvm-3.3; "seems nice" deraadt@
40 44
4120130702 4520130702
42 - (dtucker) [contrib/cygwin/README contrib/cygwin/ssh-host-config 46 - (dtucker) [contrib/cygwin/README contrib/cygwin/ssh-host-config
diff --git a/auth-options.c b/auth-options.c
index a8d738ace..80d59ee95 100644
--- a/auth-options.c
+++ b/auth-options.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth-options.c,v 1.58 2013/05/17 00:13:13 djm Exp $ */ 1/* $OpenBSD: auth-options.c,v 1.59 2013/07/12 00:19:58 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -432,7 +432,8 @@ parse_option_list(u_char *optblob, size_t optblob_len, struct passwd *pw,
432{ 432{
433 char *command, *allowed; 433 char *command, *allowed;
434 const char *remote_ip; 434 const char *remote_ip;
435 u_char *name = NULL, *data_blob = NULL; 435 char *name = NULL;
436 u_char *data_blob = NULL;
436 u_int nlen, dlen, clen; 437 u_int nlen, dlen, clen;
437 Buffer c, data; 438 Buffer c, data;
438 int ret = -1, found; 439 int ret = -1, found;
@@ -550,7 +551,8 @@ parse_option_list(u_char *optblob, size_t optblob_len, struct passwd *pw,
550 buffer_clear(&data); 551 buffer_clear(&data);
551 free(name); 552 free(name);
552 free(data_blob); 553 free(data_blob);
553 name = data_blob = NULL; 554 name = NULL;
555 data_blob = NULL;
554 } 556 }
555 /* successfully parsed all options */ 557 /* successfully parsed all options */
556 ret = 0; 558 ret = 0;
diff --git a/auth-rsa.c b/auth-rsa.c
index b7a03fdc4..545aa496a 100644
--- a/auth-rsa.c
+++ b/auth-rsa.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth-rsa.c,v 1.84 2013/06/21 00:34:49 djm Exp $ */ 1/* $OpenBSD: auth-rsa.c,v 1.85 2013/07/12 00:19:58 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -165,8 +165,7 @@ rsa_key_allowed_in_file(struct passwd *pw, char *file,
165 const BIGNUM *client_n, Key **rkey) 165 const BIGNUM *client_n, Key **rkey)
166{ 166{
167 char *fp, line[SSH_MAX_PUBKEY_BYTES]; 167 char *fp, line[SSH_MAX_PUBKEY_BYTES];
168 int allowed = 0; 168 int allowed = 0, bits;
169 u_int bits;
170 FILE *f; 169 FILE *f;
171 u_long linenum = 0; 170 u_long linenum = 0;
172 Key *key; 171 Key *key;
@@ -227,7 +226,7 @@ rsa_key_allowed_in_file(struct passwd *pw, char *file,
227 226
228 /* check the real bits */ 227 /* check the real bits */
229 keybits = BN_num_bits(key->rsa->n); 228 keybits = BN_num_bits(key->rsa->n);
230 if (keybits < 0 || bits != (u_int)keybits) 229 if (keybits < 0 || bits != keybits)
231 logit("Warning: %s, line %lu: keysize mismatch: " 230 logit("Warning: %s, line %lu: keysize mismatch: "
232 "actual %d vs. announced %d.", 231 "actual %d vs. announced %d.",
233 file, linenum, BN_num_bits(key->rsa->n), bits); 232 file, linenum, BN_num_bits(key->rsa->n), bits);
diff --git a/bufaux.c b/bufaux.c
index ec8853f8b..de5b3ca1a 100644
--- a/bufaux.c
+++ b/bufaux.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bufaux.c,v 1.51 2013/05/17 00:13:13 djm Exp $ */ 1/* $OpenBSD: bufaux.c,v 1.52 2013/07/12 00:19:58 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -285,7 +285,7 @@ buffer_put_cstring(Buffer *buffer, const char *s)
285 * Returns a character from the buffer (0 - 255). 285 * Returns a character from the buffer (0 - 255).
286 */ 286 */
287int 287int
288buffer_get_char_ret(char *ret, Buffer *buffer) 288buffer_get_char_ret(u_char *ret, Buffer *buffer)
289{ 289{
290 if (buffer_get_ret(buffer, ret, 1) == -1) { 290 if (buffer_get_ret(buffer, ret, 1) == -1) {
291 error("buffer_get_char_ret: buffer_get_ret failed"); 291 error("buffer_get_char_ret: buffer_get_ret failed");
@@ -297,11 +297,11 @@ buffer_get_char_ret(char *ret, Buffer *buffer)
297int 297int
298buffer_get_char(Buffer *buffer) 298buffer_get_char(Buffer *buffer)
299{ 299{
300 char ch; 300 u_char ch;
301 301
302 if (buffer_get_char_ret(&ch, buffer) == -1) 302 if (buffer_get_char_ret(&ch, buffer) == -1)
303 fatal("buffer_get_char: buffer error"); 303 fatal("buffer_get_char: buffer error");
304 return (u_char) ch; 304 return ch;
305} 305}
306 306
307/* 307/*
diff --git a/buffer.h b/buffer.h
index e2a9dd100..4fa2ca112 100644
--- a/buffer.h
+++ b/buffer.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: buffer.h,v 1.21 2010/08/31 11:54:45 djm Exp $ */ 1/* $OpenBSD: buffer.h,v 1.22 2013/07/12 00:19:58 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -84,7 +84,7 @@ int buffer_get_int64_ret(u_int64_t *, Buffer *);
84void *buffer_get_string_ret(Buffer *, u_int *); 84void *buffer_get_string_ret(Buffer *, u_int *);
85char *buffer_get_cstring_ret(Buffer *, u_int *); 85char *buffer_get_cstring_ret(Buffer *, u_int *);
86void *buffer_get_string_ptr_ret(Buffer *, u_int *); 86void *buffer_get_string_ptr_ret(Buffer *, u_int *);
87int buffer_get_char_ret(char *, Buffer *); 87int buffer_get_char_ret(u_char *, Buffer *);
88 88
89#ifdef OPENSSL_HAS_ECC 89#ifdef OPENSSL_HAS_ECC
90#include <openssl/ec.h> 90#include <openssl/ec.h>
diff --git a/channels.c b/channels.c
index b48e6aebb..9e87bfb9e 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.c,v 1.323 2013/06/07 15:37:52 dtucker Exp $ */ 1/* $OpenBSD: channels.c,v 1.324 2013/07/12 00:19:58 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1139,7 +1139,8 @@ channel_decode_socks5(Channel *c, fd_set *readset, fd_set *writeset)
1139 u_int8_t atyp; 1139 u_int8_t atyp;
1140 } s5_req, s5_rsp; 1140 } s5_req, s5_rsp;
1141 u_int16_t dest_port; 1141 u_int16_t dest_port;
1142 u_char *p, dest_addr[255+1], ntop[INET6_ADDRSTRLEN]; 1142 char dest_addr[255+1], ntop[INET6_ADDRSTRLEN];
1143 u_char *p;
1143 u_int have, need, i, found, nmethods, addrlen, af; 1144 u_int have, need, i, found, nmethods, addrlen, af;
1144 1145
1145 debug2("channel %d: decode socks5", c->self); 1146 debug2("channel %d: decode socks5", c->self);
@@ -1209,7 +1210,7 @@ channel_decode_socks5(Channel *c, fd_set *readset, fd_set *writeset)
1209 buffer_consume(&c->input, sizeof(s5_req)); 1210 buffer_consume(&c->input, sizeof(s5_req));
1210 if (s5_req.atyp == SSH_SOCKS5_DOMAIN) 1211 if (s5_req.atyp == SSH_SOCKS5_DOMAIN)
1211 buffer_consume(&c->input, 1); /* host string length */ 1212 buffer_consume(&c->input, 1); /* host string length */
1212 buffer_get(&c->input, (char *)&dest_addr, addrlen); 1213 buffer_get(&c->input, &dest_addr, addrlen);
1213 buffer_get(&c->input, (char *)&dest_port, 2); 1214 buffer_get(&c->input, (char *)&dest_port, 2);
1214 dest_addr[addrlen] = '\0'; 1215 dest_addr[addrlen] = '\0';
1215 free(c->path); 1216 free(c->path);
diff --git a/hostfile.c b/hostfile.c
index 69d0d289e..2ff4c48b4 100644
--- a/hostfile.c
+++ b/hostfile.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: hostfile.c,v 1.51 2013/05/17 00:13:13 djm Exp $ */ 1/* $OpenBSD: hostfile.c,v 1.52 2013/07/12 00:19:58 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -64,7 +64,7 @@ struct hostkeys {
64}; 64};
65 65
66static int 66static int
67extract_salt(const char *s, u_int l, char *salt, size_t salt_len) 67extract_salt(const char *s, u_int l, u_char *salt, size_t salt_len)
68{ 68{
69 char *p, *b64salt; 69 char *p, *b64salt;
70 u_int b64len; 70 u_int b64len;
@@ -115,7 +115,8 @@ host_hash(const char *host, const char *name_from_hostfile, u_int src_len)
115{ 115{
116 const EVP_MD *md = EVP_sha1(); 116 const EVP_MD *md = EVP_sha1();
117 HMAC_CTX mac_ctx; 117 HMAC_CTX mac_ctx;
118 char salt[256], result[256], uu_salt[512], uu_result[512]; 118 u_char salt[256], result[256];
119 char uu_salt[512], uu_result[512];
119 static char encoded[1024]; 120 static char encoded[1024];
120 u_int i, len; 121 u_int i, len;
121 122
@@ -133,7 +134,7 @@ host_hash(const char *host, const char *name_from_hostfile, u_int src_len)
133 } 134 }
134 135
135 HMAC_Init(&mac_ctx, salt, len, md); 136 HMAC_Init(&mac_ctx, salt, len, md);
136 HMAC_Update(&mac_ctx, host, strlen(host)); 137 HMAC_Update(&mac_ctx, (u_char *)host, strlen(host));
137 HMAC_Final(&mac_ctx, result, NULL); 138 HMAC_Final(&mac_ctx, result, NULL);
138 HMAC_cleanup(&mac_ctx); 139 HMAC_cleanup(&mac_ctx);
139 140
@@ -153,7 +154,7 @@ host_hash(const char *host, const char *name_from_hostfile, u_int src_len)
153 */ 154 */
154 155
155int 156int
156hostfile_read_key(char **cpp, u_int *bitsp, Key *ret) 157hostfile_read_key(char **cpp, int *bitsp, Key *ret)
157{ 158{
158 char *cp; 159 char *cp;
159 160
@@ -170,8 +171,10 @@ hostfile_read_key(char **cpp, u_int *bitsp, Key *ret)
170 171
171 /* Return results. */ 172 /* Return results. */
172 *cpp = cp; 173 *cpp = cp;
173 if (bitsp != NULL) 174 if (bitsp != NULL) {
174 *bitsp = key_size(ret); 175 if ((*bitsp = key_size(ret)) <= 0)
176 return 0;
177 }
175 return 1; 178 return 1;
176} 179}
177 180
diff --git a/hostfile.h b/hostfile.h
index d84d422ff..679c034f3 100644
--- a/hostfile.h
+++ b/hostfile.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: hostfile.h,v 1.19 2010/11/29 23:45:51 djm Exp $ */ 1/* $OpenBSD: hostfile.h,v 1.20 2013/07/12 00:19:58 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -40,7 +40,7 @@ HostStatus check_key_in_hostkeys(struct hostkeys *, Key *,
40int lookup_key_in_hostkeys_by_type(struct hostkeys *, int, 40int lookup_key_in_hostkeys_by_type(struct hostkeys *, int,
41 const struct hostkey_entry **); 41 const struct hostkey_entry **);
42 42
43int hostfile_read_key(char **, u_int *, Key *); 43int hostfile_read_key(char **, int *, Key *);
44int add_host_to_hostfile(const char *, const char *, const Key *, int); 44int add_host_to_hostfile(const char *, const char *, const Key *, int);
45 45
46#define HASH_MAGIC "|1|" 46#define HASH_MAGIC "|1|"
diff --git a/mux.c b/mux.c
index 314ee8cd2..882fa61b5 100644
--- a/mux.c
+++ b/mux.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: mux.c,v 1.43 2013/06/05 02:07:29 dtucker Exp $ */ 1/* $OpenBSD: mux.c,v 1.44 2013/07/12 00:19:58 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
4 * 4 *
@@ -630,19 +630,22 @@ process_mux_open_fwd(u_int rid, Channel *c, Buffer *m, Buffer *r)
630 Forward fwd; 630 Forward fwd;
631 char *fwd_desc = NULL; 631 char *fwd_desc = NULL;
632 u_int ftype; 632 u_int ftype;
633 u_int lport, cport;
633 int i, ret = 0, freefwd = 1; 634 int i, ret = 0, freefwd = 1;
634 635
635 fwd.listen_host = fwd.connect_host = NULL; 636 fwd.listen_host = fwd.connect_host = NULL;
636 if (buffer_get_int_ret(&ftype, m) != 0 || 637 if (buffer_get_int_ret(&ftype, m) != 0 ||
637 (fwd.listen_host = buffer_get_string_ret(m, NULL)) == NULL || 638 (fwd.listen_host = buffer_get_string_ret(m, NULL)) == NULL ||
638 buffer_get_int_ret(&fwd.listen_port, m) != 0 || 639 buffer_get_int_ret(&lport, m) != 0 ||
639 (fwd.connect_host = buffer_get_string_ret(m, NULL)) == NULL || 640 (fwd.connect_host = buffer_get_string_ret(m, NULL)) == NULL ||
640 buffer_get_int_ret(&fwd.connect_port, m) != 0) { 641 buffer_get_int_ret(&cport, m) != 0 ||
642 lport > 65535 || cport > 65535) {
641 error("%s: malformed message", __func__); 643 error("%s: malformed message", __func__);
642 ret = -1; 644 ret = -1;
643 goto out; 645 goto out;
644 } 646 }
645 647 fwd.listen_port = lport;
648 fwd.connect_port = cport;
646 if (*fwd.listen_host == '\0') { 649 if (*fwd.listen_host == '\0') {
647 free(fwd.listen_host); 650 free(fwd.listen_host);
648 fwd.listen_host = NULL; 651 fwd.listen_host = NULL;
@@ -778,17 +781,21 @@ process_mux_close_fwd(u_int rid, Channel *c, Buffer *m, Buffer *r)
778 const char *error_reason = NULL; 781 const char *error_reason = NULL;
779 u_int ftype; 782 u_int ftype;
780 int i, listen_port, ret = 0; 783 int i, listen_port, ret = 0;
784 u_int lport, cport;
781 785
782 fwd.listen_host = fwd.connect_host = NULL; 786 fwd.listen_host = fwd.connect_host = NULL;
783 if (buffer_get_int_ret(&ftype, m) != 0 || 787 if (buffer_get_int_ret(&ftype, m) != 0 ||
784 (fwd.listen_host = buffer_get_string_ret(m, NULL)) == NULL || 788 (fwd.listen_host = buffer_get_string_ret(m, NULL)) == NULL ||
785 buffer_get_int_ret(&fwd.listen_port, m) != 0 || 789 buffer_get_int_ret(&lport, m) != 0 ||
786 (fwd.connect_host = buffer_get_string_ret(m, NULL)) == NULL || 790 (fwd.connect_host = buffer_get_string_ret(m, NULL)) == NULL ||
787 buffer_get_int_ret(&fwd.connect_port, m) != 0) { 791 buffer_get_int_ret(&cport, m) != 0 ||
792 lport > 65535 || cport > 65535) {
788 error("%s: malformed message", __func__); 793 error("%s: malformed message", __func__);
789 ret = -1; 794 ret = -1;
790 goto out; 795 goto out;
791 } 796 }
797 fwd.listen_port = lport;
798 fwd.connect_port = cport;
792 799
793 if (*fwd.listen_host == '\0') { 800 if (*fwd.listen_host == '\0') {
794 free(fwd.listen_host); 801 free(fwd.listen_host);
diff --git a/packet.c b/packet.c
index b25395d4b..0d27e7592 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.c,v 1.187 2013/06/01 13:15:52 dtucker Exp $ */ 1/* $OpenBSD: packet.c,v 1.188 2013/07/12 00:19:58 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1048,7 +1048,7 @@ packet_send(void)
1048int 1048int
1049packet_read_seqnr(u_int32_t *seqnr_p) 1049packet_read_seqnr(u_int32_t *seqnr_p)
1050{ 1050{
1051 int type, len, ret, ms_remain, cont; 1051 int type, len, ret, cont, ms_remain = 0;
1052 fd_set *setp; 1052 fd_set *setp;
1053 char buf[8192]; 1053 char buf[8192];
1054 struct timeval timeout, start, *timeoutp = NULL; 1054 struct timeval timeout, start, *timeoutp = NULL;
@@ -1487,6 +1487,8 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p)
1487 } else { 1487 } else {
1488 type = packet_read_poll1(); 1488 type = packet_read_poll1();
1489 switch (type) { 1489 switch (type) {
1490 case SSH_MSG_NONE:
1491 return SSH_MSG_NONE;
1490 case SSH_MSG_IGNORE: 1492 case SSH_MSG_IGNORE:
1491 break; 1493 break;
1492 case SSH_MSG_DEBUG: 1494 case SSH_MSG_DEBUG:
@@ -1501,8 +1503,7 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p)
1501 cleanup_exit(255); 1503 cleanup_exit(255);
1502 break; 1504 break;
1503 default: 1505 default:
1504 if (type) 1506 DBG(debug("received packet type %d", type));
1505 DBG(debug("received packet type %d", type));
1506 return type; 1507 return type;
1507 } 1508 }
1508 } 1509 }
@@ -1739,7 +1740,7 @@ void
1739packet_write_wait(void) 1740packet_write_wait(void)
1740{ 1741{
1741 fd_set *setp; 1742 fd_set *setp;
1742 int ret, ms_remain; 1743 int ret, ms_remain = 0;
1743 struct timeval start, timeout, *timeoutp = NULL; 1744 struct timeval start, timeout, *timeoutp = NULL;
1744 1745
1745 setp = (fd_set *)xcalloc(howmany(active_state->connection_out + 1, 1746 setp = (fd_set *)xcalloc(howmany(active_state->connection_out + 1,
diff --git a/packet.h b/packet.h
index bc548f2b1..f8edf851c 100644
--- a/packet.h
+++ b/packet.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.h,v 1.58 2013/05/16 02:00:34 dtucker Exp $ */ 1/* $OpenBSD: packet.h,v 1.59 2013/07/12 00:19:59 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -71,7 +71,7 @@ void *packet_get_raw(u_int *length_ptr);
71void *packet_get_string(u_int *length_ptr); 71void *packet_get_string(u_int *length_ptr);
72char *packet_get_cstring(u_int *length_ptr); 72char *packet_get_cstring(u_int *length_ptr);
73void *packet_get_string_ptr(u_int *length_ptr); 73void *packet_get_string_ptr(u_int *length_ptr);
74void packet_disconnect(const char *fmt,...) __attribute__((format(printf, 1, 2))); 74void packet_disconnect(const char *fmt,...) __attribute__((noreturn)) __attribute__((format(printf, 1, 2)));
75void packet_send_debug(const char *fmt,...) __attribute__((format(printf, 1, 2))); 75void packet_send_debug(const char *fmt,...) __attribute__((format(printf, 1, 2)));
76 76
77void set_newkeys(int mode); 77void set_newkeys(int mode);
diff --git a/roaming_common.c b/roaming_common.c
index 8d0b6054a..50d6177d0 100644
--- a/roaming_common.c
+++ b/roaming_common.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: roaming_common.c,v 1.9 2011/12/07 05:44:38 djm Exp $ */ 1/* $OpenBSD: roaming_common.c,v 1.10 2013/07/12 00:19:59 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2004-2009 AppGate Network Security AB 3 * Copyright (c) 2004-2009 AppGate Network Security AB
4 * 4 *
@@ -227,7 +227,7 @@ calculate_new_key(u_int64_t *key, u_int64_t cookie, u_int64_t challenge)
227{ 227{
228 const EVP_MD *md = EVP_sha1(); 228 const EVP_MD *md = EVP_sha1();
229 EVP_MD_CTX ctx; 229 EVP_MD_CTX ctx;
230 char hash[EVP_MAX_MD_SIZE]; 230 u_char hash[EVP_MAX_MD_SIZE];
231 Buffer b; 231 Buffer b;
232 232
233 buffer_init(&b); 233 buffer_init(&b);
diff --git a/serverloop.c b/serverloop.c
index 7c250b22f..ccbad617d 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: serverloop.c,v 1.167 2013/05/17 00:13:14 djm Exp $ */ 1/* $OpenBSD: serverloop.c,v 1.168 2013/07/12 00:19:59 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -823,7 +823,8 @@ void
823server_loop2(Authctxt *authctxt) 823server_loop2(Authctxt *authctxt)
824{ 824{
825 fd_set *readset = NULL, *writeset = NULL; 825 fd_set *readset = NULL, *writeset = NULL;
826 int rekeying = 0, max_fd, nalloc = 0; 826 int rekeying = 0, max_fd;
827 u_int nalloc = 0;
827 u_int64_t rekey_timeout_ms = 0; 828 u_int64_t rekey_timeout_ms = 0;
828 829
829 debug("Entering interactive session for SSH2."); 830 debug("Entering interactive session for SSH2.");