pub struct VerifyOptions {
pub expected_prev_tail: Option<[u8; 32]>,
pub require_eof_hmac: bool,
}Expand description
v0.8.2 #63: knobs that change how strictly verify_audit_log walks
the file. Defaults preserve back-compat with v0.5 #31 callers.
Fields§
§expected_prev_tail: Option<[u8; 32]>Operator-supplied previous-file tail HMAC. When Some(tail), any
# prev_file_tail=<hex> comment in the file is ignored as
authentication (it is still parsed as a sanity check, but the
chain seed is the operator-supplied value). Eliminates H-3
(splice/replay): an attacker who fabricates a # prev_file_tail=
comment cannot forge cross-file linkage when the operator
supplies the real previous-file’s tail out-of-band.
require_eof_hmac: boolWhen true, the file MUST end with a recognized
# eof_hmac=<hex> marker that verifies against the file’s
final chain state; otherwise the verifier returns
VerifyError::EofHmacMissing (or VerifyError::EofHmacMismatch
on a malformed value). Mitigates H-2 (truncation un-detection).
Off by default for back-compat with pre-v0.8.2 audit logs that
don’t yet carry the marker.
Trait Implementations§
Source§impl Clone for VerifyOptions
impl Clone for VerifyOptions
Source§fn clone(&self) -> VerifyOptions
fn clone(&self) -> VerifyOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VerifyOptions
impl Debug for VerifyOptions
Source§impl Default for VerifyOptions
impl Default for VerifyOptions
Source§fn default() -> VerifyOptions
fn default() -> VerifyOptions
Source§impl PartialEq for VerifyOptions
impl PartialEq for VerifyOptions
Source§fn eq(&self, other: &VerifyOptions) -> bool
fn eq(&self, other: &VerifyOptions) -> bool
self and other values to be equal, and is used by ==.impl Eq for VerifyOptions
impl StructuralPartialEq for VerifyOptions
Auto Trait Implementations§
impl Freeze for VerifyOptions
impl RefUnwindSafe for VerifyOptions
impl Send for VerifyOptions
impl Sync for VerifyOptions
impl Unpin for VerifyOptions
impl UnsafeUnpin for VerifyOptions
impl UnwindSafe for VerifyOptions
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.