20260609 CIR区分fresh和cached验证输入
This commit is contained in:
@@ -6,10 +6,7 @@ use rpki::ccr::{
|
||||
CcrContentInfo, CcrDigestAlgorithm, RpkiCanonicalCacheRepresentation, TrustAnchorState,
|
||||
encode_content_info,
|
||||
};
|
||||
use rpki::cir::{
|
||||
CIR_VERSION_V3, CanonicalInputRepresentation, CirHashAlgorithm, CirObject, CirTrustAnchor,
|
||||
compute_reject_list_sha256, encode_cir, sha256,
|
||||
};
|
||||
use rpki::cir::{CanonicalInputRepresentation, CirObject, CirTrustAnchor, encode_cir, sha256};
|
||||
|
||||
#[test]
|
||||
fn cir_drop_report_counts_dropped_roa_objects_and_vrps() {
|
||||
@@ -33,22 +30,21 @@ fn cir_drop_report_counts_dropped_roa_objects_and_vrps() {
|
||||
.put_blob_bytes_batch(&[(hash.clone(), roa_bytes.clone())])
|
||||
.expect("write repo bytes");
|
||||
|
||||
let cir = CanonicalInputRepresentation {
|
||||
version: CIR_VERSION_V3,
|
||||
hash_alg: CirHashAlgorithm::Sha256,
|
||||
validation_time: time::OffsetDateTime::parse(
|
||||
let cir = CanonicalInputRepresentation::new_v4(
|
||||
time::OffsetDateTime::parse(
|
||||
"2026-04-09T00:00:00Z",
|
||||
&time::format_description::well_known::Rfc3339,
|
||||
)
|
||||
.unwrap(),
|
||||
objects: vec![CirObject {
|
||||
vec![CirObject {
|
||||
rsync_uri: "rsync://example.net/repo/AS4538.roa".to_string(),
|
||||
sha256: hex::decode(&hash).unwrap(),
|
||||
}],
|
||||
trust_anchors: vec![test_trust_anchor()],
|
||||
reject_list_sha256: compute_reject_list_sha256(std::iter::empty::<&str>()),
|
||||
rejected_objects: Vec::new(),
|
||||
};
|
||||
Vec::new(),
|
||||
vec![test_trust_anchor()],
|
||||
Vec::new(),
|
||||
Vec::new(),
|
||||
);
|
||||
std::fs::write(&cir_path, encode_cir(&cir).unwrap()).unwrap();
|
||||
|
||||
let ccr = CcrContentInfo::new(RpkiCanonicalCacheRepresentation {
|
||||
|
||||
Reference in New Issue
Block a user