@@ -8,8 +8,8 @@ use clap::{Parser, Subcommand};
88use eyre:: { Context , Report } ;
99use rustls_pki_types:: CertificateDer ;
1010use rustls_pki_types:: pem:: PemObject ;
11- use upki:: revocation:: { Index , Manifest , RevocationCheckInput , fetch } ;
12- use upki:: { Config , ConfigPath } ;
11+ use upki:: revocation:: { Index , Manifest , RevocationCheckInput } ;
12+ use upki:: { Config , ConfigPath , intermediates , revocation } ;
1313
1414#[ tokio:: main( flavor = "current_thread" ) ]
1515async fn main ( ) -> Result < ExitCode , Report > {
@@ -33,7 +33,15 @@ async fn main() -> Result<ExitCode, Report> {
3333 let config = Config :: from_file_or_default ( & config_path) ?;
3434
3535 Ok ( match args. command {
36- Command :: Fetch { dry_run } => fetch ( dry_run, & config) . await ?,
36+ Command :: Fetch { dry_run } => {
37+ match (
38+ revocation:: fetch ( dry_run, & config) . await ?,
39+ intermediates:: fetch ( dry_run, & config) . await ?,
40+ ) {
41+ ( ExitCode :: SUCCESS , ExitCode :: SUCCESS ) => ExitCode :: SUCCESS ,
42+ ( ..) => ExitCode :: FAILURE ,
43+ }
44+ }
3745 Command :: Verify => Manifest :: from_config ( & config) ?. verify ( & config) ?,
3846 Command :: ShowConfigPath => unreachable ! ( ) ,
3947 Command :: ShowConfig => {
0 commit comments