]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Construct list of key types to test based on the types
authordtucker@openbsd.org <dtucker@openbsd.org>
Tue, 23 Jul 2019 13:49:14 +0000 (13:49 +0000)
committerDarren Tucker <dtucker@dtucker.net>
Wed, 24 Jul 2019 06:51:17 +0000 (16:51 +1000)
supported by the binaries.

OpenBSD-Regress-ID: fcbd115efacec8ab0ecbdb3faef79ac696cb1d62

regress/keytype.sh

index f78a2c171fa5e3b05bafb317cc84c35ec806c104..13095088ec083c8267ece0a18314d3fb39fb0185 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: keytype.sh,v 1.7 2018/03/12 00:54:04 djm Exp $
+#      $OpenBSD: keytype.sh,v 1.8 2019/07/23 13:49:14 dtucker Exp $
 #      Placed in the Public Domain.
 
 tid="login with different key types"
@@ -6,11 +6,13 @@ tid="login with different key types"
 cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
 cp $OBJ/ssh_proxy $OBJ/ssh_proxy_bak
 
-# Traditional and builtin key types.
-ktypes="dsa-1024 rsa-2048 rsa-3072 ed25519-512"
-# Types not present in all OpenSSL versions.
-for i in `$SSH -Q key`; do
+# Construct list of key types based on what the built binaries support.
+ktypes=""
+for i in ${SSH_KEYTYPES}; do
        case "$i" in
+               ssh-dss)                ktypes="$ktypes dsa-1024" ;;
+               ssh-rsa)                ktypes="$ktypes rsa-2048 rsa-3072" ;;
+               ssh-ed25519)            ktypes="$ktypes ed25519-512" ;;
                ecdsa-sha2-nistp256)    ktypes="$ktypes ecdsa-256" ;;
                ecdsa-sha2-nistp384)    ktypes="$ktypes ecdsa-384" ;;
                ecdsa-sha2-nistp521)    ktypes="$ktypes ecdsa-521" ;;