diff options
-rw-r--r-- | compat.c | 28 | ||||
-rw-r--r-- | compat.h | 8 |
2 files changed, 2 insertions, 34 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: compat.c,v 1.113 2018/08/13 02:41:05 djm Exp $ */ | 1 | /* $OpenBSD: compat.c,v 1.114 2020/06/01 07:11:38 dtucker 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 | * |
@@ -157,32 +157,6 @@ compat_datafellows(const char *version) | |||
157 | return 0; | 157 | return 0; |
158 | } | 158 | } |
159 | 159 | ||
160 | #define SEP "," | ||
161 | int | ||
162 | proto_spec(const char *spec) | ||
163 | { | ||
164 | char *s, *p, *q; | ||
165 | int ret = SSH_PROTO_UNKNOWN; | ||
166 | |||
167 | if (spec == NULL) | ||
168 | return ret; | ||
169 | q = s = strdup(spec); | ||
170 | if (s == NULL) | ||
171 | return ret; | ||
172 | for ((p = strsep(&q, SEP)); p && *p != '\0'; (p = strsep(&q, SEP))) { | ||
173 | switch (atoi(p)) { | ||
174 | case 2: | ||
175 | ret |= SSH_PROTO_2; | ||
176 | break; | ||
177 | default: | ||
178 | logit("ignoring bad proto spec: '%s'.", p); | ||
179 | break; | ||
180 | } | ||
181 | } | ||
182 | free(s); | ||
183 | return ret; | ||
184 | } | ||
185 | |||
186 | char * | 160 | char * |
187 | compat_cipher_proposal(char *cipher_prop) | 161 | compat_cipher_proposal(char *cipher_prop) |
188 | { | 162 | { |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: compat.h,v 1.54 2018/08/13 02:41:05 djm Exp $ */ | 1 | /* $OpenBSD: compat.h,v 1.55 2020/06/01 07:11:38 dtucker Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 1999, 2000, 2001 Markus Friedl. All rights reserved. | 4 | * Copyright (c) 1999, 2000, 2001 Markus Friedl. All rights reserved. |
@@ -27,11 +27,6 @@ | |||
27 | #ifndef COMPAT_H | 27 | #ifndef COMPAT_H |
28 | #define COMPAT_H | 28 | #define COMPAT_H |
29 | 29 | ||
30 | #define SSH_PROTO_UNKNOWN 0x00 | ||
31 | #define SSH_PROTO_1 0x01 | ||
32 | #define SSH_PROTO_1_PREFERRED 0x02 | ||
33 | #define SSH_PROTO_2 0x04 | ||
34 | |||
35 | #define SSH_BUG_UTF8TTYMODE 0x00000001 | 30 | #define SSH_BUG_UTF8TTYMODE 0x00000001 |
36 | #define SSH_BUG_SIGTYPE 0x00000002 | 31 | #define SSH_BUG_SIGTYPE 0x00000002 |
37 | /* #define unused 0x00000004 */ | 32 | /* #define unused 0x00000004 */ |
@@ -64,7 +59,6 @@ | |||
64 | #define SSH_BUG_DHGEX_LARGE 0x40000000 | 59 | #define SSH_BUG_DHGEX_LARGE 0x40000000 |
65 | 60 | ||
66 | u_int compat_datafellows(const char *); | 61 | u_int compat_datafellows(const char *); |
67 | int proto_spec(const char *); | ||
68 | char *compat_cipher_proposal(char *); | 62 | char *compat_cipher_proposal(char *); |
69 | char *compat_pkalg_proposal(char *); | 63 | char *compat_pkalg_proposal(char *); |
70 | char *compat_kex_proposal(char *); | 64 | char *compat_kex_proposal(char *); |