Skip to content

Commit

Permalink
Merge pull request #33 from assaabloy-ppi/fuzz-strategy
Browse files Browse the repository at this point in the history
Fuzz strategy
  • Loading branch information
sijohans authored Apr 18, 2018
2 parents 73917ad + 97ef162 commit db6dbea
Show file tree
Hide file tree
Showing 80 changed files with 1,057 additions and 886 deletions.
1 change: 1 addition & 0 deletions fuzz-tests/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
_build
output
build_*
45 changes: 45 additions & 0 deletions fuzz-tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
cmake_minimum_required(VERSION 2.8)
project(pot-c-fuzz)

set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake" ${CMAKE_MODULE_PATH})
find_package(Sanitizers)

include_directories(../src)
include_directories(../tests)
include_directories(../src/external/tweetnacl_modified)
include_directories(.)

option(USE_SANITIZERS "Use Adress sanitizers" OFF)

set(SOURCES
../src/salt.c
../src/salti_handshake.c
../src/salti_util.c
util.c
crypt_mock.c
test_data_mock.c
)

add_library(salt ${SOURCES})

if(USE_SANITIZERS)
add_sanitizers(salt)
else(USE_SANITIZERS)
endif(USE_SANITIZERS)


macro(add_fuzz arg)
add_executable(${arg} ${arg}.c)
if(USE_SANITIZERS)
add_sanitizers(${arg})
endif(USE_SANITIZERS)
target_link_libraries(${arg} salt)

endmacro(add_fuzz)

add_fuzz(fuzz_client)
add_fuzz(fuzz_a2_client)
add_fuzz(fuzz_a1a2_host)
add_fuzz(fuzz_no_a1a2_host)
add_fuzz(fuzz_read_parse)

112 changes: 0 additions & 112 deletions fuzz-tests/Makefile

This file was deleted.

70 changes: 0 additions & 70 deletions fuzz-tests/client_a2.c

This file was deleted.

90 changes: 0 additions & 90 deletions fuzz-tests/client_app.c

This file was deleted.

63 changes: 0 additions & 63 deletions fuzz-tests/client_m2.c

This file was deleted.

Loading

0 comments on commit db6dbea

Please sign in to comment.