Skip to content

Commit

Permalink
Revert "As zone signing assumes, but does not check, that the zone is…
Browse files Browse the repository at this point in the history
… ordered, add a check in debug builds (not in release builds as it is too costly) if the zone is correctly sorted before signing."

This reverts commit b1f7a20.
  • Loading branch information
ximon18 committed Jan 9, 2025
1 parent b1f7a20 commit 1056703
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/sign/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,15 +392,6 @@ where

//------------ sign_zone() ---------------------------------------------------

/// DNSSEC sign the given zone records.
///
/// Assumes that the given zone records are sorted according to
/// [`CanonicalOrd`]. The behaviour is undefined otherwise.
///
/// # Panics
///
/// This function will panic in debug builds if the given zone is not sorted
/// according to [`CanonicalOrd`].
pub fn sign_zone<N, Octs, S, DSK, Inner, KeyStrat, Sort, HP, T>(
mut in_out: SignableZoneInOut<N, Octs, S, T, Sort>,
apex: &N,
Expand Down Expand Up @@ -444,8 +435,6 @@ where
return Err(SigningError::NoSoaFound);
};

debug_assert!(in_out.as_slice().is_sorted_by(CanonicalOrd::canonical_le));

// RFC 9077 updated RFC 4034 (NSEC) and RFC 5155 (NSEC3) to say that
// the "TTL of the NSEC(3) RR that is returned MUST be the lesser of
// the MINIMUM field of the SOA record and the TTL of the SOA itself".
Expand Down

0 comments on commit 1056703

Please sign in to comment.