diff --git a/.github/workflows/build_and_fuzz.yml b/.github/workflows/build_and_fuzz.yml index 83f76ad6..1576f362 100644 --- a/.github/workflows/build_and_fuzz.yml +++ b/.github/workflows/build_and_fuzz.yml @@ -39,7 +39,7 @@ jobs: fuzz_asan: name: fuzz with AddressSanitizer runs-on: ubuntu-latest - container: ubuntu:23.04 + container: ubuntu:24.04 steps: diff --git a/pkcs11/CMakeLists.txt b/pkcs11/CMakeLists.txt index 43dbe234..838d998f 100644 --- a/pkcs11/CMakeLists.txt +++ b/pkcs11/CMakeLists.txt @@ -59,6 +59,10 @@ set_property(SOURCE ${GGO_C} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-unused- endif() add_library(yubihsm_pkcs11 SHARED ${SOURCE}) +if (FUZZING AND ENABLE_STATIC) + target_sources(yubihsm_pkcs11 PUBLIC ${PROJECT_SOURCE_DIR}/lib/fuzz/yubihsm_fuzz.cc) + set_target_properties (yubihsm_pkcs11 PROPERTIES COMPILE_FLAGS "-DSTATIC ") +endif() add_coverage (yubihsm_pkcs11) # Remove "lib" form the built target