fetch cache pp imporved
This commit is contained in:
@@ -9,7 +9,7 @@ use crate::data_model::roa::{IpPrefix, RoaAfi, RoaDecodeError, RoaObject, RoaVal
|
||||
use crate::data_model::signed_object::SignedObjectVerifyError;
|
||||
use crate::policy::{Policy, SignedObjectFailurePolicy};
|
||||
use crate::report::{RfcRef, Warning};
|
||||
use crate::storage::{PackFile, VerifiedPublicationPointPack};
|
||||
use crate::storage::{FetchCachePpPack, PackFile};
|
||||
use crate::validation::cert_path::{CertPathError, validate_ee_cert_path};
|
||||
|
||||
const RFC_NONE: &[RfcRef] = &[];
|
||||
@@ -58,10 +58,10 @@ pub struct ObjectsStats {
|
||||
pub publication_point_dropped: bool,
|
||||
}
|
||||
|
||||
/// Process objects from a verified publication point pack using a known issuer CA certificate
|
||||
/// Process objects from a fetch_cache_pp publication point pack using a known issuer CA certificate
|
||||
/// and its effective resources (resolved via the resource-path, RFC 6487 §7.2).
|
||||
pub fn process_verified_publication_point_pack_for_issuer(
|
||||
pack: &VerifiedPublicationPointPack,
|
||||
pub fn process_fetch_cache_pp_pack_for_issuer(
|
||||
pack: &FetchCachePpPack,
|
||||
policy: &Policy,
|
||||
issuer_ca_der: &[u8],
|
||||
issuer_ca_rsync_uri: Option<&str>,
|
||||
@@ -85,7 +85,7 @@ pub fn process_verified_publication_point_pack_for_issuer(
|
||||
|
||||
// Enforce that `manifest_bytes` is actually a manifest object.
|
||||
let _manifest =
|
||||
ManifestObject::decode_der(&pack.manifest_bytes).expect("verified pack manifest decodes");
|
||||
ManifestObject::decode_der(&pack.manifest_bytes).expect("fetch_cache_pp manifest decodes");
|
||||
|
||||
let crl_files = pack
|
||||
.files
|
||||
@@ -99,7 +99,7 @@ pub fn process_verified_publication_point_pack_for_issuer(
|
||||
if crl_files.is_empty() && (stats.roa_total > 0 || stats.aspa_total > 0) {
|
||||
stats.publication_point_dropped = true;
|
||||
warnings.push(
|
||||
Warning::new("dropping publication point: no CRL files in verified pack")
|
||||
Warning::new("dropping publication point: no CRL files in fetch_cache_pp")
|
||||
.with_rfc_refs(&[RfcRef("RFC 6487 §4.8.6"), RfcRef("RFC 9286 §7")])
|
||||
.with_context(&pack.manifest_rsync_uri),
|
||||
);
|
||||
@@ -110,7 +110,9 @@ pub fn process_verified_publication_point_pack_for_issuer(
|
||||
sha256_hex: sha256_hex_from_32(&f.sha256),
|
||||
kind: AuditObjectKind::Roa,
|
||||
result: AuditObjectResult::Skipped,
|
||||
detail: Some("skipped due to missing CRL files in verified pack".to_string()),
|
||||
detail: Some(
|
||||
"skipped due to missing CRL files in fetch_cache_pp".to_string(),
|
||||
),
|
||||
});
|
||||
} else if f.rsync_uri.ends_with(".asa") {
|
||||
audit.push(ObjectAuditEntry {
|
||||
@@ -118,7 +120,9 @@ pub fn process_verified_publication_point_pack_for_issuer(
|
||||
sha256_hex: sha256_hex_from_32(&f.sha256),
|
||||
kind: AuditObjectKind::Aspa,
|
||||
result: AuditObjectResult::Skipped,
|
||||
detail: Some("skipped due to missing CRL files in verified pack".to_string()),
|
||||
detail: Some(
|
||||
"skipped due to missing CRL files in fetch_cache_pp".to_string(),
|
||||
),
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -357,12 +361,12 @@ enum ObjectValidateError {
|
||||
MissingCrlDpUris,
|
||||
|
||||
#[error(
|
||||
"no CRL available in verified pack (cannot validate certificates) (RFC 9286 §7; RFC 6487 §4.8.6)"
|
||||
"no CRL available in fetch_cache_pp (cannot validate certificates) (RFC 9286 §7; RFC 6487 §4.8.6)"
|
||||
)]
|
||||
MissingCrlInPack,
|
||||
|
||||
#[error(
|
||||
"CRL referenced by CRLDistributionPoints not found in verified pack: {0} (RFC 6487 §4.8.6; RFC 9286 §4.2.1)"
|
||||
"CRL referenced by CRLDistributionPoints not found in fetch_cache_pp: {0} (RFC 6487 §4.8.6; RFC 9286 §4.2.1)"
|
||||
)]
|
||||
CrlNotFound(String),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user