mirror of https://github.com/wolfSSL/wolfssh.git
move sftp client example to examples directory
parent
fff773213a
commit
d54a42161e
|
@ -52,7 +52,7 @@ examples/client/client
|
|||
examples/echoserver/echoserver
|
||||
examples/server/server
|
||||
examples/portfwd/portfwd
|
||||
wolfsftp/client/wolfsftp
|
||||
examples/sftpclient/wolfsftp
|
||||
|
||||
# test output
|
||||
*.test
|
||||
|
|
|
@ -37,7 +37,6 @@ include examples/include.am
|
|||
include tests/include.am
|
||||
include keys/include.am
|
||||
include ide/include.am
|
||||
include wolfsftp/include.am
|
||||
include scripts/include.am
|
||||
|
||||
|
||||
|
|
6
README
6
README
|
@ -191,10 +191,10 @@ $ make
|
|||
For full API usage and implementation details, please see the wolfSSH User
|
||||
Manual.
|
||||
|
||||
The SFTP client created is located in the directory wolfsftp/client/ and the
|
||||
The SFTP client created is located in the directory examples/sftpclient/ and the
|
||||
server is ran using the same echoserver as with wolfSSH.
|
||||
|
||||
src/wolfssh$ ./wolfsftp/client/wolfsftp
|
||||
src/wolfssh$ ./examples/sftpclient/wolfsftp
|
||||
|
||||
A full list of supported commands can be seen with typeing "help" after a
|
||||
connection.
|
||||
|
@ -221,4 +221,4 @@ reput <remote file> <local file> resume pushing file
|
|||
|
||||
An example of connecting to another system would be
|
||||
|
||||
src/wolfssh$ ./wolfsftp/client/wolfsftp -p 22 -u user -h 192.168.1.111
|
||||
src/wolfssh$ ./examples/sftpclient/wolfsftp -p 22 -u user -h 192.168.1.111
|
||||
|
|
|
@ -191,10 +191,10 @@ define `WOLFSSH_SFTP`:
|
|||
For full API usage and implementation details, please see the wolfSSH User
|
||||
Manual.
|
||||
|
||||
The SFTP client created is located in the directory wolfsftp/client/ and the
|
||||
The SFTP client created is located in the directory examples/sftpclient/ and the
|
||||
server is ran using the same echoserver as with wolfSSH.
|
||||
|
||||
src/wolfssh$ ./wolfsftp/client/wolfsftp
|
||||
src/wolfssh$ ./examples/sftpclient/wolfsftp
|
||||
|
||||
A full list of supported commands can be seen with typeing "help" after a
|
||||
connection.
|
||||
|
@ -221,4 +221,4 @@ reput <remote file> <local file> resume pushing file
|
|||
|
||||
An example of connecting to another system would be
|
||||
|
||||
src/wolfssh$ ./wolfsftp/client/wolfsftp -p 22 -u user -h 192.168.1.111
|
||||
src/wolfssh$ ./examples/sftpclient/wolfsftp -p 22 -u user -h 192.168.1.111
|
||||
|
|
|
@ -6,3 +6,4 @@ include examples/client/include.am
|
|||
include examples/server/include.am
|
||||
include examples/echoserver/include.am
|
||||
include examples/portfwd/include.am
|
||||
include examples/sftpclient/include.am
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
# vim:ft=automake
|
||||
# All paths should be given relative to the root
|
||||
|
||||
if BUILD_SFTP
|
||||
noinst_PROGRAMS += examples/sftpclient/wolfsftp
|
||||
noinst_HEADERS += examples/sftpclient/sftpclient.h
|
||||
examples_sftpclient_wolfsftp_SOURCES = examples/sftpclient/sftpclient.c
|
||||
examples_sftpclient_wolfsftp_LDADD = src/libwolfssh.la
|
||||
examples_sftpclient_wolfsftp_DEPENDENCIES = src/libwolfssh.la
|
||||
endif
|
||||
|
||||
dist_example_DATA+= examples/sftpclient/sftpclient.c
|
||||
DISTCLEANFILES+= examples/sftpclient/.libs/wolfsftp
|
|
@ -24,7 +24,7 @@
|
|||
#include <wolfssh/wolfsftp.h>
|
||||
#include <wolfssh/test.h>
|
||||
#include <wolfssh/port.h>
|
||||
#include "wolfsftp/client/sftpclient.h"
|
||||
#include "examples/sftpclient/sftpclient.h"
|
||||
#ifndef USE_WINDOWS_API
|
||||
#include <termios.h>
|
||||
#endif
|
|
@ -35,7 +35,7 @@
|
|||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\wolfsftp\client\sftpclient.c" />
|
||||
<ClCompile Include="..\..\..\examples\sftpclient\sftpclient.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\wolfssh\wolfssh.vcxproj">
|
||||
|
|
|
@ -38,10 +38,10 @@ echo -e "Success\n"
|
|||
|
||||
|
||||
# not having the sftp client built in is not a failure case
|
||||
./wolfsftp/client/wolfsftp -h
|
||||
./examples/sftpclient/wolfsftp -h
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Testing wolfsftp connection to $host : "
|
||||
echo "exit" | ./wolfsftp/client/wolfsftp -u $user -P $password -h $host -p 22
|
||||
echo "exit" | ./examples/sftpclient/wolfsftp -u $user -P $password -h $host -p 22
|
||||
RESULT=$?
|
||||
if [ $RESULT -ne 0 ]; then
|
||||
echo -e "failed to connect\n"
|
||||
|
|
|
@ -7,7 +7,7 @@ server_pid=$no_pid
|
|||
ready_file=`pwd`/wolfssh_sftp_ready$$
|
||||
counter=0
|
||||
|
||||
[ ! -x ./wolfsftp/client/wolfsftp ] && echo -e "\n\nwolfSFTP client doesn't exist" && exit 1
|
||||
[ ! -x ./examples/sftpclient/wolfsftp ] && echo -e "\n\nwolfSFTP client doesn't exist" && exit 1
|
||||
|
||||
#echo "ready file $ready_file"
|
||||
|
||||
|
@ -56,12 +56,12 @@ do_trap() {
|
|||
|
||||
trap do_trap INT TERM
|
||||
|
||||
[ ! -x ./wolfsftp/client/wolfsftp ] && echo -e "\n\nClient doesn't exist" && exit 1
|
||||
[ ! -x ./examples/sftpclient/wolfsftp ] && echo -e "\n\nClient doesn't exist" && exit 1
|
||||
|
||||
./examples/echoserver/echoserver -1 -R $ready_file &
|
||||
server_pid=$!
|
||||
create_port
|
||||
echo "ls\nexit" | ./wolfsftp/client/wolfsftp -u jill -P upthehill -p $port
|
||||
echo "ls\nexit" | ./examples/sftpclient/wolfsftp -u jill -P upthehill -p $port
|
||||
RESULT=$?
|
||||
remove_ready_file
|
||||
# if fail here then is a settings issue so return 0
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
# vim:ft=automake
|
||||
# All paths should be given relative to the root
|
||||
|
||||
if BUILD_SFTP
|
||||
noinst_PROGRAMS += wolfsftp/client/wolfsftp
|
||||
noinst_HEADERS += wolfsftp/client/sftpclient.h
|
||||
wolfsftp_client_wolfsftp_SOURCES = wolfsftp/client/sftpclient.c
|
||||
wolfsftp_client_wolfsftp_LDADD = src/libwolfssh.la
|
||||
wolfsftp_client_wolfsftp_DEPENDENCIES = src/libwolfssh.la
|
||||
endif
|
||||
|
||||
dist_example_DATA+= wolfsftp/client/sftpclient.c
|
||||
DISTCLEANFILES+= wolfsftp/client/.libs/wolfsftp
|
|
@ -1,5 +0,0 @@
|
|||
# vim:ft=automake
|
||||
# included from Top Level Makefile.am
|
||||
# All paths should be given relative to the root
|
||||
|
||||
include wolfsftp/client/include.am
|
Loading…
Reference in New Issue