summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2015-03-03 21:21:13 +0000
committerdjm <djm@openbsd.org>2015-03-03 21:21:13 +0000
commit2494107cd619fe3890ed0b6454d8fb295113f572 (patch)
treefb3a0a7dec3540525cf36ec8d21ddd0924ef5d5c
parentIf an eqn(7) starts on a new input line, be sure to output whitespace (diff)
downloadwireguard-openbsd-2494107cd619fe3890ed0b6454d8fb295113f572.tar.xz
wireguard-openbsd-2494107cd619fe3890ed0b6454d8fb295113f572.zip
add SSH1 Makefile knob to make it easier to build without SSH1 support;
ok markus@
-rw-r--r--usr.bin/ssh/Makefile.inc13
-rw-r--r--usr.bin/ssh/lib/Makefile8
-rw-r--r--usr.bin/ssh/ssh-agent.c4
-rw-r--r--usr.bin/ssh/ssh/Makefile4
-rw-r--r--usr.bin/ssh/sshd/Makefile4
5 files changed, 24 insertions, 9 deletions
diff --git a/usr.bin/ssh/Makefile.inc b/usr.bin/ssh/Makefile.inc
index 46f34fd343f..0c4c901b2c3 100644
--- a/usr.bin/ssh/Makefile.inc
+++ b/usr.bin/ssh/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.46 2014/04/29 18:01:49 markus Exp $
+# $OpenBSD: Makefile.inc,v 1.47 2015/03/03 21:21:13 djm Exp $
.include <bsd.own.mk>
@@ -39,9 +39,18 @@ CDIAGFLAGS+= -Wno-unused-parameter # Not clean for this yet
WARNINGS=yes
+SSH1?= yes
OPENSSL?= yes
+
.if (${OPENSSL:L} == "yes")
-CFLAGS+= -DWITH_OPENSSL -DWITH_SSH1
+CFLAGS+= -DWITH_OPENSSL
+.else
+# SSH v.1 requires OpenSSL.
+SSH1= no
+.endif
+
+.if (${SSH1:L} == "yes")
+CFLAGS+= -DWITH_SSH1
.endif
CFLAGS+= -DENABLE_PKCS11
diff --git a/usr.bin/ssh/lib/Makefile b/usr.bin/ssh/lib/Makefile
index fa5386e2782..ed505b44511 100644
--- a/usr.bin/ssh/lib/Makefile
+++ b/usr.bin/ssh/lib/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.82 2015/01/19 20:30:24 markus Exp $
+# $OpenBSD: Makefile,v 1.83 2015/03/03 21:21:13 djm Exp $
.PATH: ${.CURDIR}/..
.include "${.CURDIR}/../Makefile.inc"
@@ -36,8 +36,12 @@ SRCS= ${LIB_SRCS} \
roaming_dummy.c \
chacha.c poly1305.c cipher-chachapoly.c ssh-ed25519.c hmac.c umac.c
+.if (${SSH1:L} == "yes")
+SRCS+= cipher-3des1.c cipher-bf1.c
+.endif
+
.if (${OPENSSL:L} == "yes")
-SRCS+= bufec.c bufbn.c cipher-3des1.c cipher-bf1.c rsa.c \
+SRCS+= bufec.c bufbn.c rsa.c \
ssh-dss.c ssh-rsa.c ssh-ecdsa.c dh.c \
kexdh.c kexgex.c kexecdh.c \
kexdhc.c kexgexc.c kexecdhc.c \
diff --git a/usr.bin/ssh/ssh-agent.c b/usr.bin/ssh/ssh-agent.c
index 11775dc5886..efc4cf01637 100644
--- a/usr.bin/ssh/ssh-agent.c
+++ b/usr.bin/ssh/ssh-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.197 2015/01/28 22:36:00 djm Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.198 2015/03/03 21:21:13 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -525,6 +525,7 @@ reaper(void)
* XXX this and the corresponding serialisation function probably belongs
* in key.c
*/
+#ifdef WITH_SSH1
static int
agent_decode_rsa1(struct sshbuf *m, struct sshkey **kp)
{
@@ -562,6 +563,7 @@ agent_decode_rsa1(struct sshbuf *m, struct sshkey **kp)
sshkey_free(k);
return r;
}
+#endif /* WITH_SSH1 */
static void
process_add_identity(SocketEntry *e, int version)
diff --git a/usr.bin/ssh/ssh/Makefile b/usr.bin/ssh/ssh/Makefile
index ed46c36fcfb..e515e9e850c 100644
--- a/usr.bin/ssh/ssh/Makefile
+++ b/usr.bin/ssh/ssh/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.63 2014/04/29 18:01:49 markus Exp $
+# $OpenBSD: Makefile,v 1.64 2015/03/03 21:21:13 djm Exp $
.PATH: ${.CURDIR}/..
.include "${.CURDIR}/../Makefile.inc"
@@ -19,7 +19,7 @@ SRCS= ssh.c readconf.c clientloop.c sshtty.c \
.include <bsd.own.mk>
-.if (${OPENSSL:L} == "yes")
+.if (${SSH1:L} == "yes")
SRCS+= sshconnect1.c
.endif
diff --git a/usr.bin/ssh/sshd/Makefile b/usr.bin/ssh/sshd/Makefile
index 276ff53678a..f5ca82cea7b 100644
--- a/usr.bin/ssh/sshd/Makefile
+++ b/usr.bin/ssh/sshd/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.84 2015/01/19 20:30:24 markus Exp $
+# $OpenBSD: Makefile,v 1.85 2015/03/03 21:21:13 djm Exp $
.PATH: ${.CURDIR}/..
.include "${.CURDIR}/../Makefile.inc"
@@ -19,7 +19,7 @@ SRCS= sshd.c auth-rhosts.c auth-passwd.c \
sftp-server.c sftp-common.c \
roaming_common.c roaming_serv.c sandbox-systrace.c
-.if (${OPENSSL:L} == "yes")
+.if (${SSH1:L} == "yes")
SRCS+= auth-rsa.c auth-rh-rsa.c auth1.c
.endif