summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-12-06 18:00:18 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-12-06 18:00:18 +0000
commit1c37c6a51842f8bed3283ef18ec16cf6a0ae8640 (patch)
treee17ea7a703397ef0b7f7c76d668bb5ac0d4f4fec
parent3c36bb29ca67d459ef9d8c1961415d77efc20e55 (diff)
- deraadt@cvs.openbsd.org 2001/12/05 10:06:12
[authfd.c authfile.c bufaux.c channels.c compat.c kex.c kexgex.c key.c misc.c packet.c servconf.c ssh-agent.c sshconnect2.c sshconnect.c sshd.c ssh-dss.c ssh-keygen.c ssh-rsa.c] minor KNF
-rw-r--r--ChangeLog7
-rw-r--r--authfd.c8
-rw-r--r--authfile.c4
-rw-r--r--bufaux.c4
-rw-r--r--channels.c10
-rw-r--r--compat.c6
-rw-r--r--kex.c6
-rw-r--r--kexgex.c4
-rw-r--r--key.c27
-rw-r--r--misc.c6
-rw-r--r--packet.c6
-rw-r--r--servconf.c8
-rw-r--r--ssh-agent.c10
-rw-r--r--ssh-dss.c4
-rw-r--r--ssh-keygen.c6
-rw-r--r--ssh-rsa.c4
-rw-r--r--sshconnect.c22
-rw-r--r--sshconnect2.c8
-rw-r--r--sshd.c8
19 files changed, 82 insertions, 76 deletions
diff --git a/ChangeLog b/ChangeLog
index 7d2766c01..d8e24b05d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -57,6 +57,11 @@
57 [auth1.c auth2.c canohost.c channels.c deattack.c packet.c scp.c 57 [auth1.c auth2.c canohost.c channels.c deattack.c packet.c scp.c
58 sshconnect2.c] 58 sshconnect2.c]
59 make it compile with more strict prototype checking 59 make it compile with more strict prototype checking
60 - deraadt@cvs.openbsd.org 2001/12/05 10:06:12
61 [authfd.c authfile.c bufaux.c channels.c compat.c kex.c kexgex.c
62 key.c misc.c packet.c servconf.c ssh-agent.c sshconnect2.c
63 sshconnect.c sshd.c ssh-dss.c ssh-keygen.c ssh-rsa.c]
64 minor KNF
60 65
6120011126 6620011126
62 - (tim) [contrib/cygwin/README, openbsd-compat/bsd-cygwin_util.c, 67 - (tim) [contrib/cygwin/README, openbsd-compat/bsd-cygwin_util.c,
@@ -6979,4 +6984,4 @@
6979 - Wrote replacements for strlcpy and mkdtemp 6984 - Wrote replacements for strlcpy and mkdtemp
6980 - Released 1.0pre1 6985 - Released 1.0pre1
6981 6986
6982$Id: ChangeLog,v 1.1683 2001/12/06 17:55:26 mouring Exp $ 6987$Id: ChangeLog,v 1.1684 2001/12/06 18:00:18 mouring Exp $
diff --git a/authfd.c b/authfd.c
index d6366ee36..c66ce4199 100644
--- a/authfd.c
+++ b/authfd.c
@@ -35,7 +35,7 @@
35 */ 35 */
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$OpenBSD: authfd.c,v 1.45 2001/09/19 19:35:30 stevesk Exp $"); 38RCSID("$OpenBSD: authfd.c,v 1.46 2001/12/05 10:06:12 deraadt Exp $");
39 39
40#include <openssl/evp.h> 40#include <openssl/evp.h>
41 41
@@ -217,7 +217,7 @@ ssh_get_num_identities(AuthenticationConnection *auth, int version)
217 int type, code1 = 0, code2 = 0; 217 int type, code1 = 0, code2 = 0;
218 Buffer request; 218 Buffer request;
219 219
220 switch(version){ 220 switch (version) {
221 case 1: 221 case 1:
222 code1 = SSH_AGENTC_REQUEST_RSA_IDENTITIES; 222 code1 = SSH_AGENTC_REQUEST_RSA_IDENTITIES;
223 code2 = SSH_AGENT_RSA_IDENTITIES_ANSWER; 223 code2 = SSH_AGENT_RSA_IDENTITIES_ANSWER;
@@ -286,7 +286,7 @@ ssh_get_next_identity(AuthenticationConnection *auth, char **comment, int versio
286 * Get the next entry from the packet. These will abort with a fatal 286 * Get the next entry from the packet. These will abort with a fatal
287 * error if the packet is too short or contains corrupt data. 287 * error if the packet is too short or contains corrupt data.
288 */ 288 */
289 switch(version){ 289 switch (version) {
290 case 1: 290 case 1:
291 key = key_new(KEY_RSA1); 291 key = key_new(KEY_RSA1);
292 bits = buffer_get_int(&auth->identities); 292 bits = buffer_get_int(&auth->identities);
@@ -438,7 +438,7 @@ ssh_encode_identity_ssh2(Buffer *b, Key *key, const char *comment)
438 buffer_clear(b); 438 buffer_clear(b);
439 buffer_put_char(b, SSH2_AGENTC_ADD_IDENTITY); 439 buffer_put_char(b, SSH2_AGENTC_ADD_IDENTITY);
440 buffer_put_cstring(b, key_ssh_name(key)); 440 buffer_put_cstring(b, key_ssh_name(key));
441 switch(key->type){ 441 switch (key->type) {
442 case KEY_RSA: 442 case KEY_RSA:
443 buffer_put_bignum2(b, key->rsa->n); 443 buffer_put_bignum2(b, key->rsa->n);
444 buffer_put_bignum2(b, key->rsa->e); 444 buffer_put_bignum2(b, key->rsa->e);
diff --git a/authfile.c b/authfile.c
index 135be76b5..8a6021fc6 100644
--- a/authfile.c
+++ b/authfile.c
@@ -36,7 +36,7 @@
36 */ 36 */
37 37
38#include "includes.h" 38#include "includes.h"
39RCSID("$OpenBSD: authfile.c,v 1.39 2001/10/07 10:29:52 markus Exp $"); 39RCSID("$OpenBSD: authfile.c,v 1.40 2001/12/05 10:06:12 deraadt Exp $");
40 40
41#include <openssl/err.h> 41#include <openssl/err.h>
42#include <openssl/evp.h> 42#include <openssl/evp.h>
@@ -586,7 +586,7 @@ key_try_load_public(Key *k, const char *filename, char **commentp)
586 while (fgets(line, sizeof(line), f)) { 586 while (fgets(line, sizeof(line), f)) {
587 line[sizeof(line)-1] = '\0'; 587 line[sizeof(line)-1] = '\0';
588 cp = line; 588 cp = line;
589 switch(*cp){ 589 switch (*cp) {
590 case '#': 590 case '#':
591 case '\n': 591 case '\n':
592 case '\0': 592 case '\0':
diff --git a/bufaux.c b/bufaux.c
index b17256db6..f6ca7e9ae 100644
--- a/bufaux.c
+++ b/bufaux.c
@@ -37,7 +37,7 @@
37 */ 37 */
38 38
39#include "includes.h" 39#include "includes.h"
40RCSID("$OpenBSD: bufaux.c,v 1.17 2001/01/21 19:05:45 markus Exp $"); 40RCSID("$OpenBSD: bufaux.c,v 1.18 2001/12/05 10:06:12 deraadt Exp $");
41 41
42#include <openssl/bn.h> 42#include <openssl/bn.h>
43#include "bufaux.h" 43#include "bufaux.h"
@@ -121,7 +121,7 @@ buffer_put_bignum2(Buffer *buffer, BIGNUM *value)
121 log("negativ!"); 121 log("negativ!");
122 for(i = bytes-1, carry = 1; i>=0; i--) { 122 for(i = bytes-1, carry = 1; i>=0; i--) {
123 uc[i] ^= 0xff; 123 uc[i] ^= 0xff;
124 if(carry) 124 if (carry)
125 carry = !++uc[i]; 125 carry = !++uc[i];
126 } 126 }
127 } 127 }
diff --git a/channels.c b/channels.c
index da6fc0008..4c14ed491 100644
--- a/channels.c
+++ b/channels.c
@@ -39,7 +39,7 @@
39 */ 39 */
40 40
41#include "includes.h" 41#include "includes.h"
42RCSID("$OpenBSD: channels.c,v 1.142 2001/12/05 03:56:39 itojun Exp $"); 42RCSID("$OpenBSD: channels.c,v 1.143 2001/12/05 10:06:12 deraadt Exp $");
43 43
44#include "ssh.h" 44#include "ssh.h"
45#include "ssh1.h" 45#include "ssh1.h"
@@ -1277,7 +1277,7 @@ channel_handle_rfd(Channel *c, fd_set * readset, fd_set * writeset)
1277 } 1277 }
1278 return -1; 1278 return -1;
1279 } 1279 }
1280 if(c->input_filter != NULL) { 1280 if (c->input_filter != NULL) {
1281 if (c->input_filter(c, buf, len) == -1) { 1281 if (c->input_filter(c, buf, len) == -1) {
1282 debug("channel %d: filter stops", c->self); 1282 debug("channel %d: filter stops", c->self);
1283 chan_read_failed(c); 1283 chan_read_failed(c);
@@ -1725,7 +1725,7 @@ channel_input_data(int type, int plen, void *ctxt)
1725 data = packet_get_string(&data_len); 1725 data = packet_get_string(&data_len);
1726 packet_done(); 1726 packet_done();
1727 1727
1728 if (compat20){ 1728 if (compat20) {
1729 if (data_len > c->local_maxpacket) { 1729 if (data_len > c->local_maxpacket) {
1730 log("channel %d: rcvd big packet %d, maxpack %d", 1730 log("channel %d: rcvd big packet %d, maxpack %d",
1731 c->self, data_len, c->local_maxpacket); 1731 c->self, data_len, c->local_maxpacket);
@@ -1909,7 +1909,7 @@ channel_input_open_confirmation(int type, int plen, void *ctxt)
1909static char * 1909static char *
1910reason2txt(int reason) 1910reason2txt(int reason)
1911{ 1911{
1912 switch(reason) { 1912 switch (reason) {
1913 case SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED: 1913 case SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED:
1914 return "administratively prohibited"; 1914 return "administratively prohibited";
1915 case SSH2_OPEN_CONNECT_FAILED: 1915 case SSH2_OPEN_CONNECT_FAILED:
@@ -2719,7 +2719,7 @@ void
2719deny_input_open(int type, int plen, void *ctxt) 2719deny_input_open(int type, int plen, void *ctxt)
2720{ 2720{
2721 int rchan = packet_get_int(); 2721 int rchan = packet_get_int();
2722 switch(type){ 2722 switch (type) {
2723 case SSH_SMSG_AGENT_OPEN: 2723 case SSH_SMSG_AGENT_OPEN:
2724 error("Warning: ssh server tried agent forwarding."); 2724 error("Warning: ssh server tried agent forwarding.");
2725 break; 2725 break;
diff --git a/compat.c b/compat.c
index 1d3e97056..0b8d53822 100644
--- a/compat.c
+++ b/compat.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: compat.c,v 1.53 2001/09/20 13:50:40 markus Exp $"); 26RCSID("$OpenBSD: compat.c,v 1.54 2001/12/05 10:06:12 deraadt Exp $");
27 27
28#ifdef HAVE_LIBPCRE 28#ifdef HAVE_LIBPCRE
29# include <pcreposix.h> 29# include <pcreposix.h>
@@ -159,7 +159,7 @@ proto_spec(const char *spec)
159 return ret; 159 return ret;
160 q = s = xstrdup(spec); 160 q = s = xstrdup(spec);
161 for ((p = strsep(&q, SEP)); p && *p != '\0'; (p = strsep(&q, SEP))) { 161 for ((p = strsep(&q, SEP)); p && *p != '\0'; (p = strsep(&q, SEP))) {
162 switch(atoi(p)) { 162 switch (atoi(p)) {
163 case 1: 163 case 1:
164 if (ret == SSH_PROTO_UNKNOWN) 164 if (ret == SSH_PROTO_UNKNOWN)
165 ret |= SSH_PROTO_1_PREFERRED; 165 ret |= SSH_PROTO_1_PREFERRED;
@@ -191,7 +191,7 @@ compat_cipher_proposal(char *cipher_prop)
191 fix_ciphers = xmalloc(len); 191 fix_ciphers = xmalloc(len);
192 *fix_ciphers = '\0'; 192 *fix_ciphers = '\0';
193 tmp = orig_prop = xstrdup(cipher_prop); 193 tmp = orig_prop = xstrdup(cipher_prop);
194 while((cp = strsep(&tmp, ",")) != NULL) { 194 while ((cp = strsep(&tmp, ",")) != NULL) {
195 if (strncmp(cp, "aes", 3) && strncmp(cp, "rijndael", 8)) { 195 if (strncmp(cp, "aes", 3) && strncmp(cp, "rijndael", 8)) {
196 if (*fix_ciphers) 196 if (*fix_ciphers)
197 strlcat(fix_ciphers, ",", len); 197 strlcat(fix_ciphers, ",", len);
diff --git a/kex.c b/kex.c
index 1a412ce0f..658da6d8a 100644
--- a/kex.c
+++ b/kex.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: kex.c,v 1.36 2001/06/25 08:25:37 markus Exp $"); 26RCSID("$OpenBSD: kex.c,v 1.37 2001/12/05 10:06:12 deraadt Exp $");
27 27
28#include <openssl/crypto.h> 28#include <openssl/crypto.h>
29 29
@@ -219,7 +219,7 @@ kex_kexinit_finish(Kex *kex)
219 219
220 kex_choose_conf(kex); 220 kex_choose_conf(kex);
221 221
222 switch(kex->kex_type) { 222 switch (kex->kex_type) {
223 case DH_GRP1_SHA1: 223 case DH_GRP1_SHA1:
224 kexdh(kex); 224 kexdh(kex);
225 break; 225 break;
@@ -444,7 +444,7 @@ dump_digest(char *msg, u_char *digest, int len)
444 int i; 444 int i;
445 445
446 fprintf(stderr, "%s\n", msg); 446 fprintf(stderr, "%s\n", msg);
447 for (i = 0; i< len; i++){ 447 for (i = 0; i< len; i++) {
448 fprintf(stderr, "%02x", digest[i]); 448 fprintf(stderr, "%02x", digest[i]);
449 if (i%32 == 31) 449 if (i%32 == 31)
450 fprintf(stderr, "\n"); 450 fprintf(stderr, "\n");
diff --git a/kexgex.c b/kexgex.c
index f06f2c355..a35b301fc 100644
--- a/kexgex.c
+++ b/kexgex.c
@@ -24,7 +24,7 @@
24 */ 24 */
25 25
26#include "includes.h" 26#include "includes.h"
27RCSID("$OpenBSD: kexgex.c,v 1.9 2001/09/17 19:27:15 stevesk Exp $"); 27RCSID("$OpenBSD: kexgex.c,v 1.10 2001/12/05 10:06:12 deraadt Exp $");
28 28
29#include <openssl/bn.h> 29#include <openssl/bn.h>
30 30
@@ -270,7 +270,7 @@ kexgex_server(Kex *kex)
270 fatal("Unsupported hostkey type %d", kex->hostkey_type); 270 fatal("Unsupported hostkey type %d", kex->hostkey_type);
271 271
272 type = packet_read(&plen); 272 type = packet_read(&plen);
273 switch(type){ 273 switch (type) {
274 case SSH2_MSG_KEX_DH_GEX_REQUEST: 274 case SSH2_MSG_KEX_DH_GEX_REQUEST:
275 debug("SSH2_MSG_KEX_DH_GEX_REQUEST received"); 275 debug("SSH2_MSG_KEX_DH_GEX_REQUEST received");
276 min = packet_get_int(); 276 min = packet_get_int();
diff --git a/key.c b/key.c
index 220c476cd..87aeefa6b 100644
--- a/key.c
+++ b/key.c
@@ -32,7 +32,7 @@
32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34#include "includes.h" 34#include "includes.h"
35RCSID("$OpenBSD: key.c,v 1.34 2001/11/21 15:51:24 markus Exp $"); 35RCSID("$OpenBSD: key.c,v 1.35 2001/12/05 10:06:12 deraadt Exp $");
36 36
37#include <openssl/evp.h> 37#include <openssl/evp.h>
38 38
@@ -285,7 +285,7 @@ key_fingerprint(Key *k, enum fp_type dgst_type, enum fp_rep dgst_rep)
285 dgst_raw = key_fingerprint_raw(k, dgst_type, &dgst_raw_len); 285 dgst_raw = key_fingerprint_raw(k, dgst_type, &dgst_raw_len);
286 if (!dgst_raw) 286 if (!dgst_raw)
287 fatal("key_fingerprint: null from key_fingerprint_raw()"); 287 fatal("key_fingerprint: null from key_fingerprint_raw()");
288 switch(dgst_rep) { 288 switch (dgst_rep) {
289 case SSH_FP_HEX: 289 case SSH_FP_HEX:
290 retval = key_fingerprint_hex(dgst_raw, dgst_raw_len); 290 retval = key_fingerprint_hex(dgst_raw, dgst_raw_len);
291 break; 291 break;
@@ -371,7 +371,7 @@ key_read(Key *ret, char **cpp)
371 371
372 cp = *cpp; 372 cp = *cpp;
373 373
374 switch(ret->type) { 374 switch (ret->type) {
375 case KEY_RSA1: 375 case KEY_RSA1:
376 /* Get number of bits. */ 376 /* Get number of bits. */
377 if (*cp < '0' || *cp > '9') 377 if (*cp < '0' || *cp > '9')
@@ -533,7 +533,8 @@ key_ssh_name(Key *k)
533 return "ssh-unknown"; 533 return "ssh-unknown";
534} 534}
535u_int 535u_int
536key_size(Key *k){ 536key_size(Key *k)
537{
537 switch (k->type) { 538 switch (k->type) {
538 case KEY_RSA1: 539 case KEY_RSA1:
539 case KEY_RSA: 540 case KEY_RSA:
@@ -616,15 +617,15 @@ key_from_private(Key *k)
616int 617int
617key_type_from_name(char *name) 618key_type_from_name(char *name)
618{ 619{
619 if (strcmp(name, "rsa1") == 0){ 620 if (strcmp(name, "rsa1") == 0) {
620 return KEY_RSA1; 621 return KEY_RSA1;
621 } else if (strcmp(name, "rsa") == 0){ 622 } else if (strcmp(name, "rsa") == 0) {
622 return KEY_RSA; 623 return KEY_RSA;
623 } else if (strcmp(name, "dsa") == 0){ 624 } else if (strcmp(name, "dsa") == 0) {
624 return KEY_DSA; 625 return KEY_DSA;
625 } else if (strcmp(name, "ssh-rsa") == 0){ 626 } else if (strcmp(name, "ssh-rsa") == 0) {
626 return KEY_RSA; 627 return KEY_RSA;
627 } else if (strcmp(name, "ssh-dss") == 0){ 628 } else if (strcmp(name, "ssh-dss") == 0) {
628 return KEY_DSA; 629 return KEY_DSA;
629 } 630 }
630 debug2("key_type_from_name: unknown key type '%s'", name); 631 debug2("key_type_from_name: unknown key type '%s'", name);
@@ -669,7 +670,7 @@ key_from_blob(u_char *blob, int blen)
669 ktype = buffer_get_string(&b, NULL); 670 ktype = buffer_get_string(&b, NULL);
670 type = key_type_from_name(ktype); 671 type = key_type_from_name(ktype);
671 672
672 switch(type){ 673 switch (type) {
673 case KEY_RSA: 674 case KEY_RSA:
674 key = key_new(type); 675 key = key_new(type);
675 buffer_get_bignum2(&b, key->rsa->e); 676 buffer_get_bignum2(&b, key->rsa->e);
@@ -715,7 +716,7 @@ key_to_blob(Key *key, u_char **blobp, u_int *lenp)
715 return 0; 716 return 0;
716 } 717 }
717 buffer_init(&b); 718 buffer_init(&b);
718 switch(key->type){ 719 switch (key->type) {
719 case KEY_DSA: 720 case KEY_DSA:
720 buffer_put_cstring(&b, key_ssh_name(key)); 721 buffer_put_cstring(&b, key_ssh_name(key));
721 buffer_put_bignum2(&b, key->dsa->p); 722 buffer_put_bignum2(&b, key->dsa->p);
@@ -751,7 +752,7 @@ key_sign(
751 u_char **sigp, int *lenp, 752 u_char **sigp, int *lenp,
752 u_char *data, int datalen) 753 u_char *data, int datalen)
753{ 754{
754 switch(key->type){ 755 switch (key->type) {
755 case KEY_DSA: 756 case KEY_DSA:
756 return ssh_dss_sign(key, sigp, lenp, data, datalen); 757 return ssh_dss_sign(key, sigp, lenp, data, datalen);
757 break; 758 break;
@@ -774,7 +775,7 @@ key_verify(
774 if (signaturelen == 0) 775 if (signaturelen == 0)
775 return -1; 776 return -1;
776 777
777 switch(key->type){ 778 switch (key->type) {
778 case KEY_DSA: 779 case KEY_DSA:
779 return ssh_dss_verify(key, signature, signaturelen, data, datalen); 780 return ssh_dss_verify(key, signature, signaturelen, data, datalen);
780 break; 781 break;
diff --git a/misc.c b/misc.c
index 620121fdc..b74ebb894 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: misc.c,v 1.12 2001/06/26 17:27:24 markus Exp $ */ 1/* $OpenBSD: misc.c,v 1.13 2001/12/05 10:06:12 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -25,7 +25,7 @@
25 */ 25 */
26 26
27#include "includes.h" 27#include "includes.h"
28RCSID("$OpenBSD: misc.c,v 1.12 2001/06/26 17:27:24 markus Exp $"); 28RCSID("$OpenBSD: misc.c,v 1.13 2001/12/05 10:06:12 deraadt Exp $");
29 29
30#include "misc.h" 30#include "misc.h"
31#include "log.h" 31#include "log.h"
@@ -37,7 +37,7 @@ chop(char *s)
37{ 37{
38 char *t = s; 38 char *t = s;
39 while (*t) { 39 while (*t) {
40 if(*t == '\n' || *t == '\r') { 40 if (*t == '\n' || *t == '\r') {
41 *t = '\0'; 41 *t = '\0';
42 return s; 42 return s;
43 } 43 }
diff --git a/packet.c b/packet.c
index 441f87ac0..32d797122 100644
--- a/packet.c
+++ b/packet.c
@@ -37,7 +37,7 @@
37 */ 37 */
38 38
39#include "includes.h" 39#include "includes.h"
40RCSID("$OpenBSD: packet.c,v 1.73 2001/12/05 03:56:39 itojun Exp $"); 40RCSID("$OpenBSD: packet.c,v 1.74 2001/12/05 10:06:12 deraadt Exp $");
41 41
42#include "xmalloc.h" 42#include "xmalloc.h"
43#include "buffer.h" 43#include "buffer.h"
@@ -900,7 +900,7 @@ packet_read_poll(int *payload_len_ptr)
900 type = packet_read_poll2(payload_len_ptr); 900 type = packet_read_poll2(payload_len_ptr);
901 if (type) 901 if (type)
902 DBG(debug("received packet type %d", type)); 902 DBG(debug("received packet type %d", type));
903 switch(type) { 903 switch (type) {
904 case SSH2_MSG_IGNORE: 904 case SSH2_MSG_IGNORE:
905 break; 905 break;
906 case SSH2_MSG_DEBUG: 906 case SSH2_MSG_DEBUG:
@@ -925,7 +925,7 @@ packet_read_poll(int *payload_len_ptr)
925 } 925 }
926 } else { 926 } else {
927 type = packet_read_poll1(payload_len_ptr); 927 type = packet_read_poll1(payload_len_ptr);
928 switch(type) { 928 switch (type) {
929 case SSH_MSG_IGNORE: 929 case SSH_MSG_IGNORE:
930 break; 930 break;
931 case SSH_MSG_DEBUG: 931 case SSH_MSG_DEBUG:
diff --git a/servconf.c b/servconf.c
index 9274c7e6c..bd5588609 100644
--- a/servconf.c
+++ b/servconf.c
@@ -10,7 +10,7 @@
10 */ 10 */
11 11
12#include "includes.h" 12#include "includes.h"
13RCSID("$OpenBSD: servconf.c,v 1.92 2001/11/17 19:14:34 stevesk Exp $"); 13RCSID("$OpenBSD: servconf.c,v 1.93 2001/12/05 10:06:12 deraadt Exp $");
14 14
15#if defined(KRB4) || defined(KRB5) 15#if defined(KRB4) || defined(KRB5)
16#include <krb.h> 16#include <krb.h>
@@ -792,7 +792,7 @@ parse_flag:
792 break; 792 break;
793 793
794 case sSubsystem: 794 case sSubsystem:
795 if(options->num_subsystems >= MAX_SUBSYSTEMS) { 795 if (options->num_subsystems >= MAX_SUBSYSTEMS) {
796 fatal("%s line %d: too many subsystems defined.", 796 fatal("%s line %d: too many subsystems defined.",
797 filename, linenum); 797 filename, linenum);
798 } 798 }
@@ -801,7 +801,7 @@ parse_flag:
801 fatal("%s line %d: Missing subsystem name.", 801 fatal("%s line %d: Missing subsystem name.",
802 filename, linenum); 802 filename, linenum);
803 for (i = 0; i < options->num_subsystems; i++) 803 for (i = 0; i < options->num_subsystems; i++)
804 if(strcmp(arg, options->subsystem_name[i]) == 0) 804 if (strcmp(arg, options->subsystem_name[i]) == 0)
805 fatal("%s line %d: Subsystem '%s' already defined.", 805 fatal("%s line %d: Subsystem '%s' already defined.",
806 filename, linenum, arg); 806 filename, linenum, arg);
807 options->subsystem_name[options->num_subsystems] = xstrdup(arg); 807 options->subsystem_name[options->num_subsystems] = xstrdup(arg);
@@ -862,7 +862,7 @@ parse_flag:
862 case sDeprecated: 862 case sDeprecated:
863 log("%s line %d: Deprecated option %s", 863 log("%s line %d: Deprecated option %s",
864 filename, linenum, arg); 864 filename, linenum, arg);
865 while(arg) 865 while (arg)
866 arg = strdelim(&cp); 866 arg = strdelim(&cp);
867 break; 867 break;
868 868
diff --git a/ssh-agent.c b/ssh-agent.c
index dbef400c4..4db16e45e 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-agent.c,v 1.73 2001/11/17 19:14:34 stevesk Exp $ */ 1/* $OpenBSD: ssh-agent.c,v 1.74 2001/12/05 10:06:12 deraadt Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -36,7 +36,7 @@
36 */ 36 */
37 37
38#include "includes.h" 38#include "includes.h"
39RCSID("$OpenBSD: ssh-agent.c,v 1.73 2001/11/17 19:14:34 stevesk Exp $"); 39RCSID("$OpenBSD: ssh-agent.c,v 1.74 2001/12/05 10:06:12 deraadt Exp $");
40 40
41#include <openssl/evp.h> 41#include <openssl/evp.h>
42#include <openssl/md5.h> 42#include <openssl/md5.h>
@@ -109,7 +109,7 @@ static void
109idtab_init(void) 109idtab_init(void)
110{ 110{
111 int i; 111 int i;
112 for (i = 0; i <=2; i++){ 112 for (i = 0; i <=2; i++) {
113 idtable[i].identities = NULL; 113 idtable[i].identities = NULL;
114 idtable[i].nentries = 0; 114 idtable[i].nentries = 0;
115 } 115 }
@@ -293,7 +293,7 @@ process_remove_identity(SocketEntry *e, int version)
293 u_int bits; 293 u_int bits;
294 int success = 0; 294 int success = 0;
295 295
296 switch(version){ 296 switch (version) {
297 case 1: 297 case 1:
298 key = key_new(KEY_RSA1); 298 key = key_new(KEY_RSA1);
299 bits = buffer_get_int(&e->input); 299 bits = buffer_get_int(&e->input);
@@ -395,7 +395,7 @@ process_add_identity(SocketEntry *e, int version)
395 type_name = buffer_get_string(&e->input, NULL); 395 type_name = buffer_get_string(&e->input, NULL);
396 type = key_type_from_name(type_name); 396 type = key_type_from_name(type_name);
397 xfree(type_name); 397 xfree(type_name);
398 switch(type) { 398 switch (type) {
399 case KEY_DSA: 399 case KEY_DSA:
400 k = key_new_private(type); 400 k = key_new_private(type);
401 buffer_get_bignum2(&e->input, k->dsa->p); 401 buffer_get_bignum2(&e->input, k->dsa->p);
diff --git a/ssh-dss.c b/ssh-dss.c
index 9f3a28706..30bd1f8cb 100644
--- a/ssh-dss.c
+++ b/ssh-dss.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: ssh-dss.c,v 1.9 2001/11/07 22:10:28 markus Exp $"); 26RCSID("$OpenBSD: ssh-dss.c,v 1.10 2001/12/05 10:06:12 deraadt Exp $");
27 27
28#include <openssl/bn.h> 28#include <openssl/bn.h>
29#include <openssl/evp.h> 29#include <openssl/evp.h>
@@ -145,7 +145,7 @@ ssh_dss_verify(
145 sigblob = buffer_get_string(&b, &len); 145 sigblob = buffer_get_string(&b, &len);
146 rlen = buffer_len(&b); 146 rlen = buffer_len(&b);
147 buffer_free(&b); 147 buffer_free(&b);
148 if(rlen != 0) { 148 if (rlen != 0) {
149 error("ssh_dss_verify: " 149 error("ssh_dss_verify: "
150 "remaining bytes in signature %d", rlen); 150 "remaining bytes in signature %d", rlen);
151 xfree(sigblob); 151 xfree(sigblob);
diff --git a/ssh-keygen.c b/ssh-keygen.c
index a3f60cf01..9b3b7f4c7 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$OpenBSD: ssh-keygen.c,v 1.84 2001/11/17 19:14:34 stevesk Exp $"); 15RCSID("$OpenBSD: ssh-keygen.c,v 1.85 2001/12/05 10:06:12 deraadt Exp $");
16 16
17#include <openssl/evp.h> 17#include <openssl/evp.h>
18#include <openssl/pem.h> 18#include <openssl/pem.h>
@@ -272,7 +272,7 @@ do_convert_private_ssh2_from_blob(u_char *blob, int blen)
272 break; 272 break;
273 } 273 }
274 rlen = buffer_len(&b); 274 rlen = buffer_len(&b);
275 if(rlen != 0) 275 if (rlen != 0)
276 error("do_convert_private_ssh2_from_blob: " 276 error("do_convert_private_ssh2_from_blob: "
277 "remaining bytes in key blob %d", rlen); 277 "remaining bytes in key blob %d", rlen);
278 buffer_free(&b); 278 buffer_free(&b);
@@ -393,7 +393,7 @@ do_print_public(struct passwd *pw)
393 debug("#bytes %d", len); \ 393 debug("#bytes %d", len); \
394 if (BN_bn2bin(prv->rsa->x, elements[i]) < 0) \ 394 if (BN_bn2bin(prv->rsa->x, elements[i]) < 0) \
395 goto done; \ 395 goto done; \
396 } while(0) 396 } while (0)
397 397
398static int 398static int
399get_AUT0(char *aut0) 399get_AUT0(char *aut0)
diff --git a/ssh-rsa.c b/ssh-rsa.c
index a6a703b95..27522ef68 100644
--- a/ssh-rsa.c
+++ b/ssh-rsa.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: ssh-rsa.c,v 1.13 2001/11/10 13:22:42 markus Exp $"); 26RCSID("$OpenBSD: ssh-rsa.c,v 1.14 2001/12/05 10:06:12 deraadt Exp $");
27 27
28#include <openssl/evp.h> 28#include <openssl/evp.h>
29#include <openssl/err.h> 29#include <openssl/err.h>
@@ -150,7 +150,7 @@ ssh_rsa_verify(
150 sigblob = buffer_get_string(&b, &len); 150 sigblob = buffer_get_string(&b, &len);
151 rlen = buffer_len(&b); 151 rlen = buffer_len(&b);
152 buffer_free(&b); 152 buffer_free(&b);
153 if(rlen != 0) { 153 if (rlen != 0) {
154 error("ssh_rsa_verify: remaining bytes in signature %d", rlen); 154 error("ssh_rsa_verify: remaining bytes in signature %d", rlen);
155 xfree(sigblob); 155 xfree(sigblob);
156 return -1; 156 return -1;
diff --git a/sshconnect.c b/sshconnect.c
index de6cc2204..31cd238ee 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -13,7 +13,7 @@
13 */ 13 */
14 14
15#include "includes.h" 15#include "includes.h"
16RCSID("$OpenBSD: sshconnect.c,v 1.115 2001/10/08 19:05:05 markus Exp $"); 16RCSID("$OpenBSD: sshconnect.c,v 1.116 2001/12/05 10:06:13 deraadt Exp $");
17 17
18#include <openssl/bn.h> 18#include <openssl/bn.h>
19 19
@@ -49,15 +49,15 @@ sockaddr_ntop(struct sockaddr *sa)
49 static char addrbuf[INET6_ADDRSTRLEN]; 49 static char addrbuf[INET6_ADDRSTRLEN];
50 50
51 switch (sa->sa_family) { 51 switch (sa->sa_family) {
52 case AF_INET: 52 case AF_INET:
53 addr = &((struct sockaddr_in *)sa)->sin_addr; 53 addr = &((struct sockaddr_in *)sa)->sin_addr;
54 break; 54 break;
55 case AF_INET6: 55 case AF_INET6:
56 addr = &((struct sockaddr_in6 *)sa)->sin6_addr; 56 addr = &((struct sockaddr_in6 *)sa)->sin6_addr;
57 break; 57 break;
58 default: 58 default:
59 /* This case should be protected against elsewhere */ 59 /* This case should be protected against elsewhere */
60 abort(); 60 abort(); /* XXX abort is bad -- do something else */
61 } 61 }
62 inet_ntop(sa->sa_family, addr, addrbuf, sizeof(addrbuf)); 62 inet_ntop(sa->sa_family, addr, addrbuf, sizeof(addrbuf));
63 return addrbuf; 63 return addrbuf;
@@ -434,7 +434,7 @@ ssh_exchange_identification(void)
434 compat_datafellows(remote_version); 434 compat_datafellows(remote_version);
435 mismatch = 0; 435 mismatch = 0;
436 436
437 switch(remote_major) { 437 switch (remote_major) {
438 case 1: 438 case 1:
439 if (remote_minor == 99 && 439 if (remote_minor == 99 &&
440 (options.protocol & SSH_PROTO_2) && 440 (options.protocol & SSH_PROTO_2) &&
diff --git a/sshconnect2.c b/sshconnect2.c
index bb062939a..514637f2d 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: sshconnect2.c,v 1.86 2001/12/05 03:56:39 itojun Exp $"); 26RCSID("$OpenBSD: sshconnect2.c,v 1.87 2001/12/05 10:06:13 deraadt Exp $");
27 27
28#include <openssl/bn.h> 28#include <openssl/bn.h>
29#include <openssl/md5.h> 29#include <openssl/md5.h>
@@ -407,7 +407,7 @@ input_userauth_pk_ok(int type, int plen, void *ctxt)
407 } 407 }
408 sent = sign_and_send_pubkey(authctxt, key, 408 sent = sign_and_send_pubkey(authctxt, key,
409 authctxt->last_key_sign); 409 authctxt->last_key_sign);
410 } while(0); 410 } while (0);
411 411
412 if (key != NULL) 412 if (key != NULL)
413 key_free(key); 413 key_free(key);
@@ -446,7 +446,7 @@ userauth_passwd(Authctxt *authctxt)
446 if (attempt++ >= options.number_of_password_prompts) 446 if (attempt++ >= options.number_of_password_prompts)
447 return 0; 447 return 0;
448 448
449 if(attempt != 1) 449 if (attempt != 1)
450 error("Permission denied, please try again."); 450 error("Permission denied, please try again.");
451 451
452 snprintf(prompt, sizeof(prompt), "%.30s@%.128s's password: ", 452 snprintf(prompt, sizeof(prompt), "%.30s@%.128s's password: ",
@@ -710,7 +710,7 @@ userauth_pubkey(Authctxt *authctxt)
710 if (authctxt->agent != NULL) { 710 if (authctxt->agent != NULL) {
711 do { 711 do {
712 sent = userauth_pubkey_agent(authctxt); 712 sent = userauth_pubkey_agent(authctxt);
713 } while(!sent && authctxt->agent->howmany > 0); 713 } while (!sent && authctxt->agent->howmany > 0);
714 } 714 }
715 while (!sent && idx < options.num_identity_files) { 715 while (!sent && idx < options.num_identity_files) {
716 key = options.identity_keys[idx]; 716 key = options.identity_keys[idx];
diff --git a/sshd.c b/sshd.c
index 9b3179bca..74175a6fc 100644
--- a/sshd.c
+++ b/sshd.c
@@ -40,7 +40,7 @@
40 */ 40 */
41 41
42#include "includes.h" 42#include "includes.h"
43RCSID("$OpenBSD: sshd.c,v 1.213 2001/12/05 03:50:01 itojun Exp $"); 43RCSID("$OpenBSD: sshd.c,v 1.214 2001/12/05 10:06:13 deraadt Exp $");
44 44
45#include <openssl/dh.h> 45#include <openssl/dh.h>
46#include <openssl/bn.h> 46#include <openssl/bn.h>
@@ -410,7 +410,7 @@ sshd_exchange_identification(int sock_in, int sock_out)
410 } 410 }
411 411
412 mismatch = 0; 412 mismatch = 0;
413 switch(remote_major) { 413 switch (remote_major) {
414 case 1: 414 case 1:
415 if (remote_minor == 99) { 415 if (remote_minor == 99) {
416 if (options.protocol & SSH_PROTO_2) 416 if (options.protocol & SSH_PROTO_2)
@@ -487,7 +487,7 @@ list_hostkey_types(void)
487 Key *key = sensitive_data.host_keys[i]; 487 Key *key = sensitive_data.host_keys[i];
488 if (key == NULL) 488 if (key == NULL)
489 continue; 489 continue;
490 switch(key->type) { 490 switch (key->type) {
491 case KEY_RSA: 491 case KEY_RSA:
492 case KEY_DSA: 492 case KEY_DSA:
493 strlcat(buf, key_ssh_name(key), sizeof buf); 493 strlcat(buf, key_ssh_name(key), sizeof buf);
@@ -737,7 +737,7 @@ main(int ac, char **av)
737 sensitive_data.host_keys[i] = NULL; 737 sensitive_data.host_keys[i] = NULL;
738 continue; 738 continue;
739 } 739 }
740 switch(key->type){ 740 switch (key->type) {
741 case KEY_RSA1: 741 case KEY_RSA1:
742 sensitive_data.ssh1_host_key = key; 742 sensitive_data.ssh1_host_key = key;
743 sensitive_data.have_ssh1_key = 1; 743 sensitive_data.have_ssh1_key = 1;