Skip to content

Commit 6d8bd57

Browse files
committed
- (dtucker) [Makefile.in configure.ac fixalgorithms] Remove unsupported
algorithms (Ciphers, MACs and HostKeyAlgorithms) from man pages.
1 parent 3618709 commit 6d8bd57

File tree

4 files changed

+54
-7
lines changed

4 files changed

+54
-7
lines changed

ChangeLog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
on a broken network, the backgrounded mux master will exit when the
1010
Control Persist time expires rather than hanging around indefinitely.
1111
bz#1917, also reported and tested by tedu@. ok djm@ markus@.
12+
- (dtucker) [Makefile.in configure.ac fixalgorithms] Remove unsupported
13+
algorithms (Ciphers, MACs and HostKeyAlgorithms) from man pages.
1214

1315
20130605
1416
- (dtucker) [myproposal.h] Enable sha256 kex methods based on the presence of

Makefile.in

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: Makefile.in,v 1.339 2013/06/05 19:12:35 dtucker Exp $
1+
# $Id: Makefile.in,v 1.340 2013/06/11 01:26:10 dtucker Exp $
22

33
# uncomment if you run a non bourne compatable shell. Ie. csh
44
#SHELL = @SH@
@@ -121,6 +121,8 @@ PATHSUBS = \
121121
-e 's|/usr/bin:/bin:/usr/sbin:/sbin|@user_path@|g'
122122

123123
FIXPATHSCMD = $(SED) $(PATHSUBS)
124+
FIXALGORITHMSCMD= $(SHELL) $(srcdir)/fixalgorithms $(SED) \
125+
@UNSUPPORTED_ALGORITHMS@
124126

125127
all: $(CONFIGFILES) $(MANPAGES) $(TARGETS)
126128

@@ -184,9 +186,10 @@ $(MANPAGES): $(MANPAGES_IN)
184186
manpage=$(srcdir)/`echo $@ | sed 's/\.out$$//'`; \
185187
fi; \
186188
if test "$(MANTYPE)" = "man"; then \
187-
$(FIXPATHSCMD) $${manpage} | $(AWK) -f $(srcdir)/mdoc2man.awk > $@; \
189+
$(FIXPATHSCMD) $${manpage} | $(FIXALGORITHMSCMD) | \
190+
$(AWK) -f $(srcdir)/mdoc2man.awk > $@; \
188191
else \
189-
$(FIXPATHSCMD) $${manpage} > $@; \
192+
$(FIXPATHSCMD) $${manpage} | $(FIXALGORITHMSCMD) > $@; \
190193
fi
191194

192195
$(CONFIGFILES): $(CONFIGFILES_IN)

configure.ac

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: configure.ac,v 1.534 2013/06/05 22:30:21 dtucker Exp $
1+
# $Id: configure.ac,v 1.535 2013/06/11 01:26:10 dtucker Exp $
22
#
33
# Copyright (c) 1999-2004 Damien Miller
44
#
@@ -15,7 +15,7 @@
1515
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1616

1717
AC_INIT([OpenSSH], [Portable], [[email protected]])
18-
AC_REVISION($Revision: 1.534 $)
18+
AC_REVISION($Revision: 1.535 $)
1919
AC_CONFIG_SRCDIR([ssh.c])
2020
AC_LANG([C])
2121

@@ -2394,6 +2394,8 @@ AC_LINK_IFELSE(
23942394
],
23952395
[
23962396
AC_MSG_RESULT([no])
2397+
unsupported_algorithms="$unsupported_cipers \
2398+
23972399
]
23982400
)
23992401

@@ -2434,8 +2436,15 @@ fi
24342436
AC_CHECK_FUNCS([crypt DES_crypt])
24352437

24362438
# Search for SHA256 support in libc and/or OpenSSL
2437-
AC_CHECK_FUNCS([SHA256_Update EVP_sha256], [TEST_SSH_SHA256=yes],
2438-
[TEST_SSH_SHA256=no])
2439+
AC_CHECK_FUNCS([SHA256_Update EVP_sha256],
2440+
[TEST_SSH_SHA256=yes],
2441+
[TEST_SSH_SHA256=no
2442+
unsupported_algorithms="$unsupported_algorithms \
2443+
hmac-sha2-256 hmac-sha2-512 \
2444+
diffie-hellman-group-exchange-sha256 \
2445+
2446+
]
2447+
)
24392448
AC_SUBST([TEST_SSH_SHA256])
24402449

24412450
# Check complete ECC support in OpenSSL
@@ -2466,6 +2475,12 @@ AC_LINK_IFELSE(
24662475
AC_MSG_RESULT([no])
24672476
TEST_SSH_ECC=no
24682477
COMMENT_OUT_ECC="#no ecc#"
2478+
unsupported_algorithms="$unsupported_algorithms \
2479+
ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 \
2480+
2481+
2482+
2483+
ecdsa-sha2-nistp256 ecdsa-sha2-nistp384 ecdsa-sha2-nistp521"
24692484
]
24702485
)
24712486
AC_SUBST([TEST_SSH_ECC])
@@ -4541,6 +4556,7 @@ else
45414556
fi
45424557
AC_CHECK_DECL([BROKEN_GETADDRINFO], [TEST_SSH_IPV6=no])
45434558
AC_SUBST([TEST_SSH_IPV6], [$TEST_SSH_IPV6])
4559+
AC_SUBST([UNSUPPORTED_ALGORITHMS], [$unsupported_algorithms])
45444560

45454561
AC_EXEEXT
45464562
AC_CONFIG_FILES([Makefile buildpkg.sh opensshd.init openssh.xml \

fixalgorithms

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/sh
2+
#
3+
# fixciphers - remove unsupported ciphers from man pages.
4+
# Usage: fixpaths /path/to/sed cipher1 [cipher2] <infile >outfile
5+
#
6+
# Author: Darren Tucker (dtucker at zip com.au). Placed in the public domain.
7+
8+
die() {
9+
echo $*
10+
exit -1
11+
}
12+
13+
SED=$1
14+
shift
15+
16+
for c in $*; do
17+
subs="$subs -e /.Dq.$c.*$/d"
18+
subs="$subs -e s/$c,//g"
19+
done
20+
21+
# now remove any entirely empty lines
22+
subs="$subs -e /^$/d"
23+
24+
${SED} $subs
25+
26+
exit 0

0 commit comments

Comments
 (0)