mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
tests: modify proxyjump tests to check for ssh_jump_info_struct tests: add proxyjump functionality test feat: add SSH_OPTIONS_PROXYJUMP tests: proxyjump, check authentication fix: ssh_socket_connect_proxyjump add exit label to exit on error feat: implement io forwarding using pthread feat: proxyjump: use threading instead of forking feat: proxyjump: cancel forwarding threads on ssh_disconnect fix: proxyjump remove ProxyJump bool and put pthread ifdefs feat: use ssh_event for io forwarding instead of threads reformat: tests to use assert_int_not_equal fix: link to pthread refactor: make function to free proxy jump list docs: add comment for proxy jump channel feat: add env variable to enable libssh proxy jump feat: open channel for proxyjump like OpenSSH feat: add more tests for proxy jump fix: use a global variable to close io forwarding, this prevents segfaults fix: handle proxy list in thread without creating copy Signed-off-by: Gauravsingh Sisodia <xaerru@gmail.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Eshan Kelkar <eshankelkar@galorithm.com>
37 lines
1.3 KiB
CMake
37 lines
1.3 KiB
CMake
project(fuzzing CXX)
|
|
|
|
macro(fuzzer name)
|
|
add_executable(${name} ${name}.c)
|
|
target_link_libraries(${name}
|
|
PRIVATE
|
|
ssh::static pthread)
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
|
set_target_properties(${name}
|
|
PROPERTIES
|
|
COMPILE_FLAGS "-fsanitize=fuzzer"
|
|
LINK_FLAGS "-fsanitize=fuzzer")
|
|
# Run the fuzzer to make sure it works
|
|
add_test(${name} ${CMAKE_CURRENT_BINARY_DIR}/${name} -runs=1)
|
|
else()
|
|
target_sources(${name} PRIVATE fuzzer.c)
|
|
# Run the fuzzer to make sure it works
|
|
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${name}_corpus")
|
|
file(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/${name}_corpus/*")
|
|
set(i 0)
|
|
foreach(file ${files})
|
|
add_test(${name}_${i}
|
|
${CMAKE_CURRENT_BINARY_DIR}/${name} ${file})
|
|
math(EXPR i "${i} + 1")
|
|
endforeach()
|
|
endif()
|
|
endif()
|
|
endmacro()
|
|
|
|
fuzzer(ssh_client_fuzzer)
|
|
fuzzer(ssh_server_fuzzer)
|
|
fuzzer(ssh_client_config_fuzzer)
|
|
fuzzer(ssh_bind_config_fuzzer)
|
|
fuzzer(ssh_known_hosts_fuzzer)
|
|
fuzzer(ssh_privkey_fuzzer)
|
|
fuzzer(ssh_pubkey_fuzzer)
|