boringssl/fuzz/CMakeLists.txt
David Benjamin 8cd61f710b Fix corner case in cpuinfo parser.
I realized looking at the sigalgs parser that I messed up the
space-splitting logic slightly. If the CPU features are "foo bar baz",
it would not parse "baz". This doesn't particular matter (the last one
is "crc32"), but better to parse it correctly.

Fix this and add a unit test. While I'm here, may as well add a fuzzer
too.

Change-Id: Ifc1603b8f70d975f391d10e51ede95deec31a83d
Reviewed-on: https://boringssl-review.googlesource.com/31464
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Reviewed-by: Adam Langley <agl@google.com>
2018-09-05 00:00:14 +00:00

25 lines
548 B
CMake

include_directories(../include)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-prototypes")
macro(fuzzer name)
add_executable(${name} ${name}.cc)
target_link_libraries(${name} crypto ${ARGN})
set_target_properties(${name} PROPERTIES LINK_FLAGS "-fsanitize=fuzzer")
endmacro()
fuzzer(arm_cpuinfo)
fuzzer(bn_mod_exp)
fuzzer(privkey)
fuzzer(cert)
fuzzer(spki)
fuzzer(pkcs8)
fuzzer(pkcs12)
fuzzer(read_pem)
fuzzer(server ssl)
fuzzer(client ssl)
fuzzer(dtls_server ssl)
fuzzer(dtls_client ssl)
fuzzer(ssl_ctx_api ssl)
fuzzer(session ssl)