diff options
author | Kamil Dudka <kdudka@redhat.com> | 2016-02-23 10:31:52 +0100 |
---|---|---|
committer | Kamil Dudka <kdudka@redhat.com> | 2016-02-23 11:55:18 +0100 |
commit | effa575fc7f028ee71fda16209d3d81af336b730 (patch) | |
tree | 0ce6fb38630c73ac74514a67cb0a4f00c0e7676b /tests/sshserver.pl | |
parent | 186546f1c5ffa62526bd57deb5b9fd6e68da2a5e (diff) | |
download | curl-effa575fc7f028ee71fda16209d3d81af336b730.tar.gz |
tests/sshserver.pl: use RSA instead of DSA for host auth
DSA is no longer supported by OpenSSH 7.0, which causes all SCP/SFTP
test cases to be skipped. Using RSA for host authentication works with
both old and new versions of OpenSSH.
Reported-by: Karlson2k
Closes #676
Diffstat (limited to 'tests/sshserver.pl')
-rwxr-xr-x | tests/sshserver.pl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/sshserver.pl b/tests/sshserver.pl index 77554643f..b0c0229b6 100755 --- a/tests/sshserver.pl +++ b/tests/sshserver.pl @@ -371,12 +371,12 @@ if((! -e $hstprvkeyf) || (! -s $hstprvkeyf) || # Make sure all files are gone so ssh-keygen doesn't complain unlink($hstprvkeyf, $hstpubkeyf, $cliprvkeyf, $clipubkeyf); logmsg 'generating host keys...' if($verbose); - if(system "\"$sshkeygen\" -q -t dsa -f $hstprvkeyf -C 'curl test server' -N ''") { + if(system "\"$sshkeygen\" -q -t rsa -f $hstprvkeyf -C 'curl test server' -N ''") { logmsg 'Could not generate host key'; exit 1; } logmsg 'generating client keys...' if($verbose); - if(system "\"$sshkeygen\" -q -t dsa -f $cliprvkeyf -C 'curl test client' -N ''") { + if(system "\"$sshkeygen\" -q -t rsa -f $cliprvkeyf -C 'curl test client' -N ''") { logmsg 'Could not generate client key'; exit 1; } @@ -729,11 +729,11 @@ if(system "\"$sshd\" -t -f $sshdconfig > $sshdlog 2>&1") { if((! -e $knownhosts) || (! -s $knownhosts)) { logmsg 'generating ssh client known hosts file...' if($verbose); unlink($knownhosts); - if(open(DSAKEYFILE, "<$hstpubkeyf")) { - my @dsahostkey = do { local $/ = ' '; <DSAKEYFILE> }; - if(close(DSAKEYFILE)) { + if(open(RSAKEYFILE, "<$hstpubkeyf")) { + my @rsahostkey = do { local $/ = ' '; <RSAKEYFILE> }; + if(close(RSAKEYFILE)) { if(open(KNOWNHOSTS, ">$knownhosts")) { - print KNOWNHOSTS "$listenaddr ssh-dss $dsahostkey[1]\n"; + print KNOWNHOSTS "$listenaddr ssh-rsa $rsahostkey[1]\n"; if(!close(KNOWNHOSTS)) { $error = "Error: cannot close file $knownhosts"; } |