1
1
libssh/tests/fuzz/CMakeLists.txt
Anderson Toshiyuki Sasaki 83b43443e5 threads: Automatically call ssh_init on load
This makes unnecessary to call ssh_init() when the library is
dynamically loaded.  Also removes the threads shared library.  The used
threads implementation is chosen in configuration time, changing the
ssh_threads_get_default() depending on the available threads library.

Internally, it is expected a threads implementation providing:

- void ssh_mutex_lock(void **mutex);
- void ssh_mutex_unlock(void **mutex);
- struct ssh_threads_callbacks_struct *ssh_threads_get_default(void);

and a crypto implementation providing:

- int crypto_thread_init(struct ssh_threads_callbacks_struct *user_callbacks);
- void crypto_thread_finalize(void);

This adds internal threads implementation for pthreads and noop.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-03 16:43:03 +02:00

10 строки
287 B
CMake

project(fuzzing CXX)
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_executable(ssh_server_fuzzer ssh_server_fuzzer.cpp)
set_target_properties(ssh_server_fuzzer
PROPERTIES
COMPILE_FLAGS "-fsanitize=fuzzer"
LINK_FLAGS "-fsanitize=fuzzer")
endif()