diff options
author | Yang Tse <yangsita@gmail.com> | 2011-08-31 18:16:14 +0200 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2011-08-31 18:16:14 +0200 |
commit | 38fff918f93408ed71e16bc8cdb5fd45251470bb (patch) | |
tree | 2c442d68ab1484413b971799671f206f75e0689e | |
parent | 5ea65fbc79815cc9223ddb13e6d9e6ab148d090c (diff) |
test harness: fix detection of test harness host and client key files
Regenerate curl's tests host and client key files also when, somehow,
any of these files are empty.
-rwxr-xr-x | tests/sshserver.pl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/sshserver.pl b/tests/sshserver.pl index b4390158d..5fda35fa5 100755 --- a/tests/sshserver.pl +++ b/tests/sshserver.pl @@ -362,8 +362,10 @@ if((($sshid =~ /OpenSSH/) && ($sshvernum < 299)) || #*************************************************************************** # Generate host and client key files for curl's tests # -if((! -e $hstprvkeyf) || (! -e $hstpubkeyf) || - (! -e $cliprvkeyf) || (! -e $clipubkeyf)) { +if((! -e $hstprvkeyf) || (! -s $hstprvkeyf) || + (! -e $hstpubkeyf) || (! -s $hstpubkeyf) || + (! -e $cliprvkeyf) || (! -s $cliprvkeyf) || + (! -e $clipubkeyf) || (! -s $clipubkeyf)) { # Make sure all files are gone so ssh-keygen doesn't complain unlink($hstprvkeyf, $hstpubkeyf, $cliprvkeyf, $clipubkeyf); logmsg 'generating host keys...' if($verbose); |