diff options
author | djm@openbsd.org <djm@openbsd.org> | 2015-04-07 23:00:42 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-04-13 14:37:17 +1000 |
commit | 4492a4f222da4cf1e8eab12689196322e27b08c4 (patch) | |
tree | d8c8f2d94e1dd3be23f018788ce19ab856656dbd /compat.c | |
parent | c265e2e6e932efc6d86f6cc885dea33637a67564 (diff) |
upstream commit
treat Protocol=1,2|2,1 as Protocol=2 when compiled
without SSH1 support; ok dtucker@ millert@
Diffstat (limited to 'compat.c')
-rw-r--r-- | compat.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: compat.c,v 1.87 2015/01/19 20:20:20 markus Exp $ */ | 1 | /* $OpenBSD: compat.c,v 1.88 2015/04/07 23:00:42 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -199,9 +199,11 @@ proto_spec(const char *spec) | |||
199 | for ((p = strsep(&q, SEP)); p && *p != '\0'; (p = strsep(&q, SEP))) { | 199 | for ((p = strsep(&q, SEP)); p && *p != '\0'; (p = strsep(&q, SEP))) { |
200 | switch (atoi(p)) { | 200 | switch (atoi(p)) { |
201 | case 1: | 201 | case 1: |
202 | #ifdef WITH_SSH1 | ||
202 | if (ret == SSH_PROTO_UNKNOWN) | 203 | if (ret == SSH_PROTO_UNKNOWN) |
203 | ret |= SSH_PROTO_1_PREFERRED; | 204 | ret |= SSH_PROTO_1_PREFERRED; |
204 | ret |= SSH_PROTO_1; | 205 | ret |= SSH_PROTO_1; |
206 | #endif | ||
205 | break; | 207 | break; |
206 | case 2: | 208 | case 2: |
207 | ret |= SSH_PROTO_2; | 209 | ret |= SSH_PROTO_2; |