Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion crates/tinysecurity-module/examples/audit_native_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ impl Interface for Callback {
Ok(reply)
}
}
/// Audit sink wait. One module serves every phase, and its audit settings are
/// immutable across reinit, so this one value has to fit them all. Mode 6
/// reinitializes the module inside the callback, which took about 107 ms on a
/// loaded macOS runner, past the 100 ms this used to be; mode 3 deliberately
/// never replies and must still time out well inside the 3 s client wait.
const AUDIT_TIMEOUT_MS: u32 = 1000;
fn audit_config(required: bool) -> AuditConfig2 {
AuditConfig2 {
scope: SubjectScope {
Expand All @@ -160,7 +166,7 @@ fn audit_config(required: bool) -> AuditConfig2 {
agent: "agent".into(),
},
stream_id: "a".repeat(32),
timeout_ms: 100,
timeout_ms: AUDIT_TIMEOUT_MS,
required,
native_path: None,
max_bytes: 10000,
Expand Down
Loading