Merge branch 'main' into fix/heal-pool-metadata-scope

This commit is contained in:
Hiroaki KAWAI
2026-09-14 14:55:29 +09:00
committed by GitHub
2 changed files with 6 additions and 1 deletions
+5 -1
View File
@@ -471,7 +471,11 @@ pub fn sign_top_export<T: Serialize>(
classification: TOP_CLASSIFICATION,
consent_uid: &request.scope.consent.uid,
policy_revision: request.scope.policy_revision,
produced_at: now.format(&Rfc3339).map_err(|_| TopCaptureError::Serialization)?,
produced_at: now
.replace_nanosecond(0)
.map_err(|_| TopCaptureError::Serialization)?
.format(&Rfc3339)
.map_err(|_| TopCaptureError::Serialization)?,
expires_at: OffsetDateTime::from_unix_timestamp(expires_at_unix)
.map_err(|_| TopCaptureError::Expired)?
.format(&Rfc3339)
+1
View File
@@ -188,6 +188,7 @@ fn top_network_export_is_bounded_redacted_and_signed_over_exact_envelope_bytes()
let envelope: serde_json::Value = serde_json::from_slice(&export.envelope_json).expect("envelope");
assert_eq!(envelope["toolId"], "top.net");
assert_eq!(envelope["classification"], "L3");
assert_eq!(envelope["producedAt"].as_str().expect("producedAt").len(), 20);
assert_eq!(envelope["payload"]["path"], "result.json");
assert_eq!(envelope["payload"]["sha256"], export.result_sha256);
let result_text = String::from_utf8_lossy(&export.result_json);