Skip to content

Commit 3b2caba

Browse files
committed
WIP fuzzing
1 parent 3a80a3b commit 3b2caba

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

quiche/src/build.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -391,10 +391,15 @@ fn main() {
391391
let mut cfg = get_boringssl_cmake_config(&bssl_src);
392392

393393
if cfg!(feature = "fuzzing") {
394-
cfg.cxxflag("-DBORINGSSL_UNSAFE_DETERMINISTIC_MODE")
395-
.cxxflag("-DBORINGSSL_UNSAFE_FUZZER_MODE");
396-
cfg.cflag("-DBORINGSSL_UNSAFE_DETERMINISTIC_MODE")
397-
.cflag("-DBORINGSSL_UNSAFE_FUZZER_MODE");
394+
// BoringSSL 5.x consolidated the older
395+
// `BORINGSSL_UNSAFE_{DETERMINISTIC,FUZZER}_MODE`
396+
// defines into the single
397+
// `FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION` switch.
398+
// Setting it makes BoringSSL build the deterministic
399+
// RNG path (so `RAND_reset_for_fuzzing` is exported)
400+
// and enables the fuzzer-mode TLS shortcuts.
401+
cfg.cflag("-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION")
402+
.cxxflag("-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION");
398403
}
399404

400405
cfg.build_target("ssl").build();

0 commit comments

Comments
 (0)