diff options
author | Yang Tse <yangsita@gmail.com> | 2008-02-08 13:54:02 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2008-02-08 13:54:02 +0000 |
commit | 1a340de0e5f378e58130dd86955e6bcee47b6f19 (patch) | |
tree | ce96dff2f7debdf58432e5e51717ee052e687959 /tests/sshhelp.pm | |
parent | 05c191199dbbc0ac0dbfaebb075b78802edb6f80 (diff) | |
download | curl-1a340de0e5f378e58130dd86955e6bcee47b6f19.tar.gz |
To verify that the sftp server is actually running, responsive and that
all curl's tests generated configuration and key files are fine, a real
connection is established to the test harness sftp server authenticating
and running a simple sftp remote pwd command.
The verification is done using OpenSSH's or SunSSH's sftp client tool with
a configuration file with the same options as the test harness socks server
with the exception that dynamic forwarding is not used for sftp.
Diffstat (limited to 'tests/sshhelp.pm')
-rw-r--r-- | tests/sshhelp.pm | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/tests/sshhelp.pm b/tests/sshhelp.pm index b76c42dcf..7cd4b5c55 100644 --- a/tests/sshhelp.pm +++ b/tests/sshhelp.pm @@ -37,13 +37,17 @@ use vars qw( @EXPORT_OK $sshdexe $sshexe + $sftpsrvexe $sftpexe $sshkeygenexe $sshdconfig $sshconfig + $sftpconfig $knownhosts $sshdlog $sshlog + $sftplog + $sftpcmds $hstprvkeyf $hstpubkeyf $cliprvkeyf @@ -64,24 +68,31 @@ use vars qw( @EXPORT_OK = qw( $sshdexe $sshexe + $sftpsrvexe $sftpexe $sshkeygenexe $sshdconfig $sshconfig + $sftpconfig $knownhosts $sshdlog $sshlog + $sftplog + $sftpcmds $hstprvkeyf $hstpubkeyf $cliprvkeyf $clipubkeyf display_sshdconfig display_sshconfig + display_sftpconfig display_sshdlog display_sshlog + display_sftplog dump_array find_sshd find_ssh + find_sftpsrv find_sftp find_sshkeygen logmsg @@ -94,12 +105,16 @@ use vars qw( # $sshdexe = 'sshd' .exe_ext(); # base name and ext of ssh daemon $sshexe = 'ssh' .exe_ext(); # base name and ext of ssh client -$sftpexe = 'sftp-server' .exe_ext(); # base name and ext of sftp-server +$sftpsrvexe = 'sftp-server' .exe_ext(); # base name and ext of sftp-server +$sftpexe = 'sftp' .exe_ext(); # base name and ext of sftp client $sshkeygenexe = 'ssh-keygen' .exe_ext(); # base name and ext of ssh-keygen $sshdconfig = 'curl_sshd_config'; # ssh daemon config file $sshconfig = 'curl_ssh_config'; # ssh client config file +$sftpconfig = 'curl_sftp_config'; # sftp client config file $sshdlog = 'log/sshd.log'; # ssh daemon log file $sshlog = 'log/ssh.log'; # ssh client log file +$sftplog = 'log/sftp.log'; # sftp client log file +$sftpcmds = 'curl_sftp_cmds'; # sftp client commands batch file $knownhosts = 'curl_client_knownhosts'; # ssh knownhosts file $hstprvkeyf = 'curl_host_dsa_key'; # host private key file $hstpubkeyf = 'curl_host_dsa_key.pub'; # host public key file @@ -214,6 +229,14 @@ sub display_sshconfig { #*************************************************************************** +# Display contents of the sftp client config file +# +sub display_sftpconfig { + display_file($sftpconfig); +} + + +#*************************************************************************** # Display contents of the ssh daemon log file # sub display_sshdlog { @@ -230,6 +253,14 @@ sub display_sshlog { #*************************************************************************** +# Display contents of the sftp client log file +# +sub display_sftplog { + display_file($sftplog); +} + + +#*************************************************************************** # Find a file somewhere in the given path # sub find_file { @@ -276,6 +307,14 @@ sub find_ssh { #*************************************************************************** # Find sftp-server plugin and return canonical filename # +sub find_sftpsrv { + return find_sfile($sftpsrvexe); +} + + +#*************************************************************************** +# Find sftp client and return canonical filename +# sub find_sftp { return find_sfile($sftpexe); } |