20260418 优化去掉冗余存储repo object,mix quick最快170s
This commit is contained in:
@@ -823,10 +823,7 @@ fn discover_children_from_fresh_snapshot_with_audit<P: PublicationPointData>(
|
||||
let bytes = f
|
||||
.bytes_cloned()
|
||||
.map_err(|e| format!("snapshot CRL bytes load failed: {e}"))?;
|
||||
Ok((
|
||||
f.rsync_uri.clone(),
|
||||
CachedIssuerCrl::Pending(bytes),
|
||||
))
|
||||
Ok((f.rsync_uri.clone(), CachedIssuerCrl::Pending(bytes)))
|
||||
})
|
||||
.collect::<Result<_, String>>()?;
|
||||
|
||||
@@ -1480,7 +1477,11 @@ fn build_publication_point_audit_from_snapshot(
|
||||
if !f.rsync_uri.ends_with(".crl") {
|
||||
continue;
|
||||
}
|
||||
let ok = f.bytes().ok().and_then(|bytes| RpkixCrl::decode_der(bytes).ok()).is_some();
|
||||
let ok = f
|
||||
.bytes()
|
||||
.ok()
|
||||
.and_then(|bytes| RpkixCrl::decode_der(bytes).ok())
|
||||
.is_some();
|
||||
audit_by_uri.insert(
|
||||
f.rsync_uri.clone(),
|
||||
ObjectAuditEntry {
|
||||
@@ -2477,7 +2478,7 @@ fn select_manifest_current_crl_from_snapshot(
|
||||
file.bytes()
|
||||
.map_err(|e| format!("load current CRL bytes for VCIR failed: {e}"))?,
|
||||
)
|
||||
.map_err(|e| format!("decode current CRL for VCIR failed: {e}"))?;
|
||||
.map_err(|e| format!("decode current CRL for VCIR failed: {e}"))?;
|
||||
return Ok(CurrentCrlRef { file, crl });
|
||||
}
|
||||
}
|
||||
@@ -2519,7 +2520,7 @@ fn build_vcir_local_outputs(
|
||||
file.bytes()
|
||||
.map_err(|e| format!("load accepted ROA bytes for VCIR failed: {e}"))?,
|
||||
)
|
||||
.map_err(|e| format!("decode accepted ROA for VCIR failed: {e}"))?;
|
||||
.map_err(|e| format!("decode accepted ROA for VCIR failed: {e}"))?;
|
||||
let ee = &roa.signed_object.signed_data.certificates[0];
|
||||
let source_ee_cert_hash = sha256_hex(ee.raw_der.as_slice());
|
||||
let item_effective_until =
|
||||
@@ -2561,7 +2562,7 @@ fn build_vcir_local_outputs(
|
||||
file.bytes()
|
||||
.map_err(|e| format!("load accepted ASPA bytes for VCIR failed: {e}"))?,
|
||||
)
|
||||
.map_err(|e| format!("decode accepted ASPA for VCIR failed: {e}"))?;
|
||||
.map_err(|e| format!("decode accepted ASPA for VCIR failed: {e}"))?;
|
||||
let ee = &aspa.signed_object.signed_data.certificates[0];
|
||||
let source_ee_cert_hash = sha256_hex(ee.raw_der.as_slice());
|
||||
let item_effective_until =
|
||||
@@ -3610,8 +3611,7 @@ authorityKeyIdentifier = keyid:always
|
||||
publication_point_rsync_uri: pack.publication_point_rsync_uri.clone(),
|
||||
rrdp_notification_uri: None,
|
||||
};
|
||||
persist_vcir_non_repository_evidence(&store, &ca)
|
||||
.expect("persist embedded evidence");
|
||||
persist_vcir_non_repository_evidence(&store, &ca).expect("persist embedded evidence");
|
||||
|
||||
let issuer_hash = sha256_hex(&issuer_ca_der);
|
||||
let issuer_entry = store
|
||||
@@ -3901,7 +3901,8 @@ authorityKeyIdentifier = keyid:always
|
||||
assert!(
|
||||
!artifacts
|
||||
.iter()
|
||||
.any(|artifact| artifact.uri.is_none() && artifact.sha256 == sha256_hex(b"embedded-ee")),
|
||||
.any(|artifact| artifact.uri.is_none()
|
||||
&& artifact.sha256 == sha256_hex(b"embedded-ee")),
|
||||
"embedded EE cert artifacts should no longer be persisted separately"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user