Skip to content

Commit 7cc8e15

Browse files
committed
upstream: remove DSA from the regression/unit test suite too.
OpenBSD-Regress-ID: 4424d2eaf0bce3887318ef6d18de6c06f3617d6e
1 parent 0404fa7 commit 7cc8e15

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+126
-843
lines changed

INSTALL

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ manually using the following commands:
245245

246246
ssh-keygen -t [type] -f /etc/ssh/ssh_host_key -N ""
247247

248-
for each of the types you wish to generate (rsa, dsa or ecdsa) or
248+
for each of the types you wish to generate (rsa, ed25519 or ecdsa) or
249249

250250
ssh-keygen -A
251251

Makefile.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ PATHSUBS = \
194194
-e 's|/etc/shosts.equiv|$(sysconfdir)/shosts.equiv|g' \
195195
-e 's|/etc/ssh/ssh_host_key|$(sysconfdir)/ssh_host_key|g' \
196196
-e 's|/etc/ssh/ssh_host_ecdsa_key|$(sysconfdir)/ssh_host_ecdsa_key|g' \
197-
-e 's|/etc/ssh/ssh_host_dsa_key|$(sysconfdir)/ssh_host_dsa_key|g' \
198197
-e 's|/etc/ssh/ssh_host_rsa_key|$(sysconfdir)/ssh_host_rsa_key|g' \
199198
-e 's|/etc/ssh/ssh_host_ed25519_key|$(sysconfdir)/ssh_host_ed25519_key|g' \
200199
-e 's|/var/run/sshd.pid|$(piddir)/sshd.pid|g' \
@@ -494,7 +493,6 @@ host-key: ssh-keygen$(EXEEXT)
494493
fi
495494

496495
host-key-force: ssh-keygen$(EXEEXT) ssh$(EXEEXT)
497-
./ssh-keygen -t dsa -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key -N ""
498496
./ssh-keygen -t rsa -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key -N ""
499497
./ssh-keygen -t ed25519 -f $(DESTDIR)$(sysconfdir)/ssh_host_ed25519_key -N ""
500498
if ./ssh -Q key | grep ecdsa >/dev/null ; then \

contrib/redhat/openssh.spec

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -281,20 +281,6 @@ if [ "$1" != 0 -a -r /var/run/sshd.pid ] ; then
281281
touch /var/run/sshd.restart
282282
fi
283283

284-
%triggerun server -- openssh-server < 2.5.0p1
285-
# Count the number of HostKey and HostDsaKey statements we have.
286-
gawk 'BEGIN {IGNORECASE=1}
287-
/^hostkey/ || /^hostdsakey/ {sawhostkey = sawhostkey + 1}
288-
END {exit sawhostkey}' /etc/ssh/sshd_config
289-
# And if we only found one, we know the client was relying on the old default
290-
# behavior, which loaded the the SSH2 DSA host key when HostDsaKey wasn't
291-
# specified. Now that HostKey is used for both SSH1 and SSH2 keys, specifying
292-
# one nullifies the default, which would have loaded both.
293-
if [ $? -eq 1 ] ; then
294-
echo HostKey /etc/ssh/ssh_host_rsa_key >> /etc/ssh/sshd_config
295-
echo HostKey /etc/ssh/ssh_host_dsa_key >> /etc/ssh/sshd_config
296-
fi
297-
298284
%triggerpostun server -- ssh-server
299285
if [ "$1" != 0 ] ; then
300286
/sbin/chkconfig --add sshd

contrib/redhat/sshd.init

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ start()
4141
/usr/bin/ssh-keygen -A
4242
if [ -x /sbin/restorecon ]; then
4343
/sbin/restorecon /etc/ssh/ssh_host_rsa_key.pub
44-
/sbin/restorecon /etc/ssh/ssh_host_dsa_key.pub
44+
/sbin/restorecon /etc/ssh/ssh_host_ed25519_key.pub
4545
/sbin/restorecon /etc/ssh/ssh_host_ecdsa_key.pub
4646
fi
4747

openbsd-compat/openssl-compat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include <openssl/crypto.h>
2525
#include <openssl/evp.h>
2626
#include <openssl/rsa.h>
27-
#include <openssl/dsa.h>
2827
#ifdef OPENSSL_HAS_ECC
2928
#include <openssl/ecdsa.h>
3029
#endif

regress/Makefile

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
tests: prep file-tests t-exec unit
44

5-
REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12
5+
REGRESS_TARGETS= t1 t2 t3 t4 t5 t7 t9 t10 t11 t12
66

77
# File based tests
88
file-tests: $(REGRESS_TARGETS)
@@ -130,9 +130,9 @@ CLEANFILES= *.core actual agent-key.* authorized_keys_${USERNAME} \
130130
ed25519-agent.pub ed25519 ed25519.pub empty.in \
131131
expect failed-regress.log failed-ssh.log failed-sshd.log \
132132
hkr.* host.ecdsa-sha2-nistp256 host.ecdsa-sha2-nistp384 \
133-
host.ecdsa-sha2-nistp521 host.ssh-dss host.ssh-ed25519 \
133+
host.ecdsa-sha2-nistp521 host.ssh-ed25519 \
134134
host.ssh-rsa host_ca_key* host_krl_* host_revoked_* key.* \
135-
key.dsa-* key.ecdsa-* key.ed25519-512 \
135+
key.ecdsa-* key.ed25519-512 \
136136
key.ed25519-512.pub key.rsa-* keys-command-args kh.* askpass \
137137
known_hosts known_hosts-cert known_hosts.* krl-* ls.copy \
138138
modpipe netcat no_identity_config \
@@ -191,36 +191,18 @@ t5:
191191
${TEST_SSH_SSHKEYGEN} -Bf ${.CURDIR}/rsa_openssh.pub |\
192192
awk '{print $$2}' | diff - ${.CURDIR}/t5.ok ; \
193193
fi
194-
t6:
195-
set -xe ; if ${TEST_SSH_SSH} -Q key | grep -q "^ssh-dss" ; then \
196-
${TEST_SSH_SSHKEYGEN} -if ${.CURDIR}/dsa_ssh2.prv > $(OBJ)/t6.out1 ; \
197-
${TEST_SSH_SSHKEYGEN} -if ${.CURDIR}/dsa_ssh2.pub > $(OBJ)/t6.out2 ; \
198-
chmod 600 $(OBJ)/t6.out1 ; \
199-
${TEST_SSH_SSHKEYGEN} -yf $(OBJ)/t6.out1 | diff - $(OBJ)/t6.out2 ; \
200-
fi
201194

202195
$(OBJ)/t7.out:
203-
set -xe ; if ${TEST_SSH_SSH} -Q key | grep -q "^ssh-dss" ; then \
196+
set -xe ; if ${TEST_SSH_SSH} -Q key | grep -q "^ssh-rsa" ; then \
204197
${TEST_SSH_SSHKEYGEN} -q -t rsa -N '' -f $@ ; \
205198
fi
206199

207200
t7: $(OBJ)/t7.out
208-
set -xe ; if ${TEST_SSH_SSH} -Q key | grep -q "^ssh-dss" ; then \
201+
set -xe ; if ${TEST_SSH_SSH} -Q key | grep -q "^ssh-rsa" ; then \
209202
${TEST_SSH_SSHKEYGEN} -lf $(OBJ)/t7.out > /dev/null ; \
210203
${TEST_SSH_SSHKEYGEN} -Bf $(OBJ)/t7.out > /dev/null ; \
211204
fi
212205

213-
$(OBJ)/t8.out:
214-
set -xe ; if ssh -Q key | grep -q "^ssh-dss" ; then \
215-
${TEST_SSH_SSHKEYGEN} -q -t dsa -N '' -f $@ ; \
216-
fi
217-
218-
t8: $(OBJ)/t8.out
219-
set -xe ; if ssh -Q key | grep -q "^ssh-dss" ; then \
220-
${TEST_SSH_SSHKEYGEN} -lf $(OBJ)/t8.out > /dev/null ; \
221-
${TEST_SSH_SSHKEYGEN} -Bf $(OBJ)/t8.out > /dev/null ; \
222-
fi
223-
224206
$(OBJ)/t9.out:
225207
! ${TEST_SSH_SSH} -Q key-plain | grep ecdsa >/dev/null || \
226208
${TEST_SSH_SSHKEYGEN} -q -t ecdsa -N '' -f $@
@@ -240,7 +222,7 @@ t10: $(OBJ)/t10.out
240222
${TEST_SSH_SSHKEYGEN} -Bf $(OBJ)/t10.out > /dev/null
241223

242224
t11:
243-
set -xe ; if ${TEST_SSH_SSH} -Q key | grep -q "^ssh-dss" ; then \
225+
set -xe ; if ${TEST_SSH_SSH} -Q key | grep -q "^ssh-rsa" ; then \
244226
${TEST_SSH_SSHKEYGEN} -E sha256 -lf ${.CURDIR}/rsa_openssh.pub |\
245227
awk '{print $$2}' | diff - ${.CURDIR}/t11.ok ; \
246228
fi

regress/agent.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $OpenBSD: agent.sh,v 1.22 2024/10/24 03:28:34 djm Exp $
1+
# $OpenBSD: agent.sh,v 1.23 2025/05/06 06:05:48 djm Exp $
22
# Placed in the Public Domain.
33

44
tid="simple agent test"
@@ -86,10 +86,6 @@ fi
8686

8787
for t in ${SSH_KEYTYPES}; do
8888
trace "connect via agent using $t key"
89-
if [ "$t" = "ssh-dss" ]; then
90-
echo "PubkeyAcceptedAlgorithms +ssh-dss" >> $OBJ/ssh_proxy
91-
echo "PubkeyAcceptedAlgorithms +ssh-dss" >> $OBJ/sshd_proxy
92-
fi
9389
${SSH} -F $OBJ/ssh_proxy -i $OBJ/$t-agent.pub -oIdentitiesOnly=yes \
9490
somehost exit 52
9591
r=$?
@@ -143,7 +139,6 @@ fi
143139
(printf 'cert-authority,principals="estragon" '; cat $OBJ/user_ca_key.pub) \
144140
> $OBJ/authorized_keys_$USER
145141
for t in ${SSH_KEYTYPES}; do
146-
if [ "$t" != "ssh-dss" ]; then
147142
trace "connect via agent using $t key"
148143
${SSH} -F $OBJ/ssh_proxy -i $OBJ/$t-agent.pub \
149144
-oCertificateFile=$OBJ/$t-agent-cert.pub \
@@ -152,7 +147,6 @@ for t in ${SSH_KEYTYPES}; do
152147
if [ $r -ne 52 ]; then
153148
fail "ssh connect with failed (exit code $r)"
154149
fi
155-
fi
156150
done
157151

158152
## Deletion tests.

regress/cert-hostkey.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $OpenBSD: cert-hostkey.sh,v 1.27 2021/09/30 05:26:26 dtucker Exp $
1+
# $OpenBSD: cert-hostkey.sh,v 1.28 2025/05/06 06:05:48 djm Exp $
22
# Placed in the Public Domain.
33

44
tid="certified host keys"
@@ -70,7 +70,7 @@ touch $OBJ/host_revoked_plain
7070
touch $OBJ/host_revoked_cert
7171
cat $OBJ/host_ca_key.pub $OBJ/host_ca_key2.pub > $OBJ/host_revoked_ca
7272

73-
PLAIN_TYPES=`echo "$SSH_KEYTYPES" | sed 's/^ssh-dss/ssh-dsa/g;s/^ssh-//'`
73+
PLAIN_TYPES=`echo "$SSH_KEYTYPES" | sed 's/^ssh-//'`
7474

7575
if echo "$PLAIN_TYPES" | grep '^rsa$' >/dev/null 2>&1 ; then
7676
PLAIN_TYPES="$PLAIN_TYPES rsa-sha2-256 rsa-sha2-512"

regress/cert-userkey.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $OpenBSD: cert-userkey.sh,v 1.29 2024/12/06 16:25:58 djm Exp $
1+
# $OpenBSD: cert-userkey.sh,v 1.30 2025/05/06 06:05:48 djm Exp $
22
# Placed in the Public Domain.
33

44
tid="certified user keys"
@@ -10,7 +10,7 @@ cp $OBJ/ssh_proxy $OBJ/ssh_proxy_bak
1010
grep -v AuthorizedKeysFile $OBJ/sshd_proxy > $OBJ/sshd_proxy_bak
1111
echo "AuthorizedKeysFile $OBJ/authorized_keys_%u_*" >> $OBJ/sshd_proxy_bak
1212

13-
PLAIN_TYPES=`$SSH -Q key-plain | maybe_filter_sk | sed 's/^ssh-dss/ssh-dsa/;s/^ssh-//'`
13+
PLAIN_TYPES=`$SSH -Q key-plain | maybe_filter_sk | sed 's/^ssh-//'`
1414
EXTRA_TYPES=""
1515
rsa=""
1616

@@ -25,7 +25,7 @@ kname() {
2525
sk-ecdsa-*) n="sk-ecdsa" ;;
2626
sk-ssh-ed25519*) n="sk-ssh-ed25519" ;;
2727
# subshell because some seds will add a newline
28-
*) n=$(echo $1 | sed 's/^dsa/ssh-dss/;s/^rsa/ssh-rsa/;s/^ed/ssh-ed/') ;;
28+
*) n=$(echo $1 | sed 's/^rsa/ssh-rsa/;s/^ed/ssh-ed/') ;;
2929
esac
3030
if [ -z "$rsa" ]; then
3131
echo "$n*,ssh-ed25519*"

regress/dsa_ssh2.prv

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)