Skip to content

Commit

Permalink
aead_fuzzing::Aead::new: Don't panic in release builds. (#1353)
Browse files Browse the repository at this point in the history
The original rationale for this panic was to ensure we never ship
users a Firefox with a crypto-disabled version of aead. However, it is
common for Firefox fuzzing builds to be optimized: fuzzing is often
combined with LLVM's Address Sanitizer, whose docs recommend optimized
builds. Such Firefox builds crash the moment anything tries to
initialize Aead.

There are other safeguards in place that prevent Mozilla from shipping
fuzzing-enabled builds, so this one can be removed.
  • Loading branch information
jimblandy committed Jul 11, 2022
1 parent 26e19e7 commit 888fce8
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions neqo-crypto/src/aead_fuzzing.rs
Expand Up @@ -15,9 +15,6 @@ pub struct Aead {}
#[allow(clippy::unused_self)]
impl Aead {
pub fn new(_version: Version, _cipher: Cipher, _secret: &SymKey, _prefix: &str) -> Res<Self> {
#[cfg(not(debug_assertions))]
panic!("Trying to run a non-debug fuzzing build.");

Ok(Self {})
}

Expand Down

0 comments on commit 888fce8

Please sign in to comment.