View | Details | Raw Unified | Return to bug 132 | Differences between
and this patch

Collapse All | Expand All

(-)compat.h~ (+1 lines)
Lines 51-56 Link Here
51
#define SSH_BUG_OPENFAILURE	0x00020000
51
#define SSH_BUG_OPENFAILURE	0x00020000
52
#define SSH_BUG_DERIVEKEY	0x00040000
52
#define SSH_BUG_DERIVEKEY	0x00040000
53
#define SSH_BUG_DUMMYCHAN	0x00100000
53
#define SSH_BUG_DUMMYCHAN	0x00100000
54
#define SSH_BUG_SERVERLIESSIZE	0x00200000
54
55
55
void     enable_compat13(void);
56
void     enable_compat13(void);
56
void     enable_compat20(void);
57
void     enable_compat20(void);
(-)compat.c~ (+2 lines)
Lines 122-127 Link Here
122
		  "1.2.20*,"
122
		  "1.2.20*,"
123
		  "1.2.21*,"
123
		  "1.2.21*,"
124
		  "1.2.22*",		SSH_BUG_IGNOREMSG },
124
		  "1.2.22*",		SSH_BUG_IGNOREMSG },
125
		{ "1.2.2*,"
126
		  "1.2.3*",		SSH_BUG_SERVERLIESSIZE },
125
		{ "1.3.2*",		SSH_BUG_IGNOREMSG },	/* f-secure */
127
		{ "1.3.2*",		SSH_BUG_IGNOREMSG },	/* f-secure */
126
		{ "*SSH Compatible Server*",			/* Netscreen */
128
		{ "*SSH Compatible Server*",			/* Netscreen */
127
					SSH_BUG_PASSWORDPAD },
129
					SSH_BUG_PASSWORDPAD },
(-)sshconnect1.c~ (-1 / +3 lines)
Lines 37-42 Link Here
37
#include "packet.h"
37
#include "packet.h"
38
#include "mpaux.h"
38
#include "mpaux.h"
39
#include "uidswap.h"
39
#include "uidswap.h"
40
#include "compat.h"
40
#include "log.h"
41
#include "log.h"
41
#include "readconf.h"
42
#include "readconf.h"
42
#include "key.h"
43
#include "key.h"
Lines 944-950 Link Here
944
	packet_get_bignum(host_key->rsa->n);
945
	packet_get_bignum(host_key->rsa->n);
945
946
946
	rbits = BN_num_bits(host_key->rsa->n);
947
	rbits = BN_num_bits(host_key->rsa->n);
947
	if (bits != rbits) {
948
	if (bits != rbits &&
949
	    !((datafellows & SSH_BUG_SERVERLIESSIZE) && (rbits + 1 == bits))) {
948
		log("Warning: Server lies about size of server host key: "
950
		log("Warning: Server lies about size of server host key: "
949
		    "actual size is %d bits vs. announced %d.", rbits, bits);
951
		    "actual size is %d bits vs. announced %d.", rbits, bits);
950
		log("Warning: This may be due to an old implementation of ssh.");
952
		log("Warning: This may be due to an old implementation of ssh.");
(-)sshd.c~ (-1 / +6 lines)
Lines 1296-1302 Link Here
1296
	packet_put_bignum(sensitive_data.server_key->rsa->n);
1296
	packet_put_bignum(sensitive_data.server_key->rsa->n);
1297
1297
1298
	/* Store our public host RSA key. */
1298
	/* Store our public host RSA key. */
1299
	packet_put_int(BN_num_bits(sensitive_data.ssh1_host_key->rsa->n));
1299
	len = BN_num_bits(sensitive_data.ssh1_host_key->rsa->n);
1300
	if ((datafellows & SSH_BUG_SERVERLIESSIZE) && (len & 1)) {
1301
	    /* old ssh client expects even number for host key */
1302
	    len += 1;
1303
	}
1304
	packet_put_int(len);
1300
	packet_put_bignum(sensitive_data.ssh1_host_key->rsa->e);
1305
	packet_put_bignum(sensitive_data.ssh1_host_key->rsa->e);
1301
	packet_put_bignum(sensitive_data.ssh1_host_key->rsa->n);
1306
	packet_put_bignum(sensitive_data.ssh1_host_key->rsa->n);
1302
1307

Return to bug 132