summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compat.c28
-rw-r--r--compat.h8
2 files changed, 2 insertions, 34 deletions
diff --git a/compat.c b/compat.c
index 0624dc6de..7c0e1c230 100644
--- a/compat.c
+++ b/compat.c
@@ -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 ","
161int
162proto_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
186char * 160char *
187compat_cipher_proposal(char *cipher_prop) 161compat_cipher_proposal(char *cipher_prop)
188{ 162{
diff --git a/compat.h b/compat.h
index d611d33e7..66db42cc0 100644
--- a/compat.h
+++ b/compat.h
@@ -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
66u_int compat_datafellows(const char *); 61u_int compat_datafellows(const char *);
67int proto_spec(const char *);
68char *compat_cipher_proposal(char *); 62char *compat_cipher_proposal(char *);
69char *compat_pkalg_proposal(char *); 63char *compat_pkalg_proposal(char *);
70char *compat_kex_proposal(char *); 64char *compat_kex_proposal(char *);