Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

test harness: fix detection of test harness client knownhosts file

Regenerate curl's tests client knownhosts file also when, somehow,
this file is empty.
  • Loading branch information...
commit 437848d75443aa1a189cb81dfaaad9f19d0cc60b 1 parent 38fff91
@yangtse yangtse authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 tests/sshserver.pl
View
5 tests/sshserver.pl
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -708,8 +708,9 @@ sub sshd_supports_opt {
#***************************************************************************
# Generate ssh client host key database file for curl's tests
#
-if(! -e $knownhosts) {
+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)) {
Please sign in to comment.
Something went wrong with that request. Please try again.