@@ -34,6 +34,9 @@ pub struct Cli {
3434 /// The location of TLS Private Key file
3535 pub tls_key_path : Option < PathBuf > ,
3636
37+ /// The location of other certificates to accept
38+ pub other_cert_path : Option < PathBuf > ,
39+
3740 /// The address on which the http server will listen.
3841 pub address : String ,
3942
@@ -115,6 +118,7 @@ impl Cli {
115118 // identifiers for arguments
116119 pub const TLS_CERT : & ' static str = "tls-cert-path" ;
117120 pub const TLS_KEY : & ' static str = "tls-key-path" ;
121+ pub const OTHER_CERT : & ' static str = "other-cert-path" ;
118122 pub const ADDRESS : & ' static str = "address" ;
119123 pub const DOMAIN_URI : & ' static str = "origin" ;
120124 pub const STAGING : & ' static str = "local-staging-path" ;
@@ -175,6 +179,14 @@ impl Cli {
175179 . value_parser ( validation:: file_path)
176180 . help ( "Local path on this device where private key file is located. Required to enable TLS" ) ,
177181 )
182+ . arg (
183+ Arg :: new ( Self :: OTHER_CERT )
184+ . long ( Self :: OTHER_CERT )
185+ . env ( "P_OTHER_CERT_PATH" )
186+ . value_name ( "DIR" )
187+ . value_parser ( validation:: canonicalize_path)
188+ . help ( "Local path on this device where other certificate files are located." )
189+ )
178190 . arg (
179191 Arg :: new ( Self :: ADDRESS )
180192 . long ( Self :: ADDRESS )
@@ -455,6 +467,7 @@ impl FromArgMatches for Cli {
455467 self . query_cache_path = m. get_one :: < PathBuf > ( Self :: QUERY_CACHE ) . cloned ( ) ;
456468 self . tls_cert_path = m. get_one :: < PathBuf > ( Self :: TLS_CERT ) . cloned ( ) ;
457469 self . tls_key_path = m. get_one :: < PathBuf > ( Self :: TLS_KEY ) . cloned ( ) ;
470+ self . other_cert_path = m. get_one :: < PathBuf > ( Self :: OTHER_CERT ) . cloned ( ) ;
458471 self . domain_address = m. get_one :: < Url > ( Self :: DOMAIN_URI ) . cloned ( ) ;
459472
460473 self . address = m
0 commit comments