20260511 CIR V3 trust anchors self-contained
This commit is contained in:
@@ -3,8 +3,8 @@ use std::process::Command;
|
||||
|
||||
use rpki::blob_store::ExternalRepoBytesDb;
|
||||
use rpki::cir::{
|
||||
CIR_VERSION_V2, CanonicalInputRepresentation, CirHashAlgorithm, CirObject, CirTal,
|
||||
compute_reject_list_sha256, encode_cir, materialize_cir_from_repo_bytes,
|
||||
CIR_VERSION_V3, CanonicalInputRepresentation, CirHashAlgorithm, CirTrustAnchor,
|
||||
compute_reject_list_sha256, encode_cir, materialize_cir_from_repo_bytes, sha256,
|
||||
};
|
||||
|
||||
fn skip_heavy_script_replay_test() -> bool {
|
||||
@@ -30,26 +30,22 @@ fn build_ta_only_cir() -> (CanonicalInputRepresentation, Vec<u8>) {
|
||||
.expect("tal has rsync uri")
|
||||
.as_str()
|
||||
.to_string();
|
||||
let ta_hash = {
|
||||
use sha2::{Digest, Sha256};
|
||||
Sha256::digest(&ta_bytes).to_vec()
|
||||
};
|
||||
(
|
||||
CanonicalInputRepresentation {
|
||||
version: CIR_VERSION_V2,
|
||||
version: CIR_VERSION_V3,
|
||||
hash_alg: CirHashAlgorithm::Sha256,
|
||||
validation_time: time::OffsetDateTime::parse(
|
||||
"2026-04-07T00:00:00Z",
|
||||
&time::format_description::well_known::Rfc3339,
|
||||
)
|
||||
.unwrap(),
|
||||
objects: vec![CirObject {
|
||||
rsync_uri: ta_rsync_uri,
|
||||
sha256: ta_hash,
|
||||
}],
|
||||
tals: vec![CirTal {
|
||||
objects: Vec::new(),
|
||||
trust_anchors: vec![CirTrustAnchor {
|
||||
ta_rsync_uri,
|
||||
tal_uri: "https://example.test/root.tal".to_string(),
|
||||
tal_bytes,
|
||||
ta_certificate_sha256: sha256(&ta_bytes),
|
||||
ta_certificate_der: ta_bytes.clone(),
|
||||
}],
|
||||
reject_list_sha256: compute_reject_list_sha256(std::iter::empty::<&str>()),
|
||||
rejected_objects: Vec::new(),
|
||||
|
||||
Reference in New Issue
Block a user