Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions upki-cli/src/bin/upki.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ use tracing_subscriber::layer::SubscriberExt;
use tracing_subscriber::util::SubscriberInitExt;
use upki::revocation::{Index, RevocationCheckInput};
#[cfg(feature = "__fetch")]
use upki::revocation::{Manifest, fetch};
use upki::revocation::Manifest;
use upki::{Config, ConfigPath};
#[cfg(feature = "__fetch")]
use upki::{intermediates, revocation};

#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<ExitCode, Report> {
Expand Down Expand Up @@ -47,7 +49,15 @@ async fn main() -> Result<ExitCode, Report> {

Ok(match args.command {
#[cfg(feature = "__fetch")]
Command::Fetch { dry_run } => fetch(dry_run, &config).await?,
Command::Fetch { dry_run } => {
match (
revocation::fetch(dry_run, &config).await?,
intermediates::fetch(dry_run, &config).await?,
) {
(ExitCode::SUCCESS, ExitCode::SUCCESS) => ExitCode::SUCCESS,
(..) => ExitCode::FAILURE,
}
}
#[cfg(feature = "__fetch")]
Command::Verify => Manifest::from_config(&config)?.verify(&config)?,
Command::ShowConfigPath => unreachable!(),
Expand Down
2 changes: 1 addition & 1 deletion upki-cli/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fn config_unknown_fields() {
|
1 | cache_dir = "tests/data/config_unknown_fields/"
| ^^^^^^^^^
unknown field `cache_dir`, expected `cache-dir` or `revocation`
unknown field `cache_dir`, expected one of `cache-dir`, `revocation`, `intermediates`


Location:
Expand Down
2 changes: 1 addition & 1 deletion upki-mirror/src/bin/intermediates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use eyre::{Context, Report, anyhow};
use rustls_pki_types::CertificateDer;
use rustls_pki_types::pem::PemObject;
use serde::Deserialize;
use upki::revocation::{Manifest, ManifestFile};
use upki::data::{Manifest, ManifestFile};

#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), Report> {
Expand Down
2 changes: 1 addition & 1 deletion upki-mirror/src/bin/mozilla-crlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::time::SystemTime;
use aws_lc_rs::digest::{SHA256, digest};
use clap::{Parser, ValueEnum};
use eyre::{Context, Report, anyhow};
use upki::revocation::{Manifest, ManifestFile};
use upki::data::{Manifest, ManifestFile};

#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), Report> {
Expand Down
Loading
Loading