mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-31 00:03:07 +03:00
tests: add sftp server test
Signed-off-by: tatataeki <shengzeyu19_98@163.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
This commit is contained in:
@ -10,7 +10,8 @@ set(server_SRCS
|
||||
|
||||
add_library(testserver STATIC
|
||||
test_server.c
|
||||
default_cb.c)
|
||||
default_cb.c
|
||||
sftpserver_cb.c)
|
||||
|
||||
set(LIBSSH_SERVER_TESTS
|
||||
# torture_server_kbdint
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <libssh/libssh.h>
|
||||
#include <libssh/sftp.h>
|
||||
#include <libssh/callbacks.h>
|
||||
|
||||
#define SSHD_DEFAULT_USER "libssh"
|
||||
@ -70,6 +71,7 @@ struct channel_data_st {
|
||||
void *server_state;
|
||||
/* This pointer is useful to set data for custom callbacks */
|
||||
void *extra_data;
|
||||
sftp_session sftp;
|
||||
};
|
||||
|
||||
/* A userdata struct for session. */
|
||||
|
1338
tests/server/test_server/sftpserver_cb.c
Normal file
1338
tests/server/test_server/sftpserver_cb.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user