diff --git a/acmed/Cargo.toml b/acmed/Cargo.toml index 289a395..f0b55a2 100644 --- a/acmed/Cargo.toml +++ b/acmed/Cargo.toml @@ -23,7 +23,7 @@ openssl_vendored = ["crypto_openssl", "acme_common/openssl_vendored", "attohttpc acme_common = { path = "../acme_common" } attohttpc = { version = "0.18", default-features = false, features = ["charsets", "json"] } bincode = "1.3" -clap = "2.32" +clap = "3.0" glob = "0.3" log = "0.4" nom = { version = "7.0", default-features = false, features = [] } diff --git a/acmed/src/main.rs b/acmed/src/main.rs index 9deb3fb..ae4abb8 100644 --- a/acmed/src/main.rs +++ b/acmed/src/main.rs @@ -63,8 +63,8 @@ fn main() { .version(APP_VERSION) .long_version(full_version.as_str()) .arg( - Arg::with_name("config") - .short("c") + Arg::new("config") + .short('c') .long("config") .help("Path to the main configuration file") .takes_value(true) @@ -72,7 +72,7 @@ fn main() { .default_value(DEFAULT_CONFIG_FILE), ) .arg( - Arg::with_name("log-level") + Arg::new("log-level") .long("log-level") .help("Specify the log level") .takes_value(true) @@ -81,25 +81,25 @@ fn main() { .default_value(&default_log_level), ) .arg( - Arg::with_name("to-syslog") + Arg::new("to-syslog") .long("log-syslog") .help("Sends log messages via syslog") .conflicts_with("to-stderr"), ) .arg( - Arg::with_name("to-stderr") + Arg::new("to-stderr") .long("log-stderr") .help("Prints log messages to the standard error output") .conflicts_with("log-syslog"), ) .arg( - Arg::with_name("foreground") - .short("f") + Arg::new("foreground") + .short('f') .long("foreground") .help("Runs in the foreground"), ) .arg( - Arg::with_name("pid-file") + Arg::new("pid-file") .long("pid-file") .help("Path to the PID file") .takes_value(true) @@ -107,11 +107,11 @@ fn main() { .default_value(DEFAULT_PID_FILE), ) .arg( - Arg::with_name("root-cert") + Arg::new("root-cert") .long("root-cert") .help("Add a root certificate to the trust store (can be set multiple times)") .takes_value(true) - .multiple(true) + .multiple_occurrences(true) .value_name("FILE"), ) .get_matches(); diff --git a/tacd/Cargo.toml b/tacd/Cargo.toml index 1a28896..0d0cad7 100644 --- a/tacd/Cargo.toml +++ b/tacd/Cargo.toml @@ -20,6 +20,6 @@ openssl_vendored = ["crypto_openssl", "acme_common/openssl_vendored"] [dependencies] acme_common = { path = "../acme_common" } -clap = "2.32" +clap = "3.0" log = "0.4" openssl = "0.10" diff --git a/tacd/src/main.rs b/tacd/src/main.rs index c1c91b1..f8cc6e5 100644 --- a/tacd/src/main.rs +++ b/tacd/src/main.rs @@ -83,25 +83,25 @@ fn main() { .version(APP_VERSION) .long_version(full_version.as_str()) .arg( - Arg::with_name("listen") + Arg::new("listen") .long("listen") - .short("l") + .short('l') .help("Host and port to listen on") .takes_value(true) .value_name("host:port|unix:path") .default_value(DEFAULT_LISTEN_ADDR), ) .arg( - Arg::with_name("domain") + Arg::new("domain") .long("domain") - .short("d") + .short('d') .help("The domain that is being validated") .takes_value(true) .value_name("STRING") .conflicts_with("domain-file"), ) .arg( - Arg::with_name("domain-file") + Arg::new("domain-file") .long("domain-file") .help("File from which is read the domain that is being validated") .takes_value(true) @@ -109,16 +109,16 @@ fn main() { .conflicts_with("domain"), ) .arg( - Arg::with_name("acme-ext") + Arg::new("acme-ext") .long("acme-ext") - .short("e") + .short('e') .help("The acmeIdentifier extension to set in the self-signed certificate") .takes_value(true) .value_name("STRING") .conflicts_with("acme-ext-file"), ) .arg( - Arg::with_name("acme-ext-file") + Arg::new("acme-ext-file") .long("acme-ext-file") .help("File from which is read the acmeIdentifier extension to set in the self-signed certificate") .takes_value(true) @@ -126,7 +126,7 @@ fn main() { .conflicts_with("acme-ext"), ) .arg( - Arg::with_name("crt-signature-alg") + Arg::new("crt-signature-alg") .long("crt-signature-alg") .help("The certificate's signature algorithm") .takes_value(true) @@ -135,7 +135,7 @@ fn main() { .default_value(&default_crt_key_type), ) .arg( - Arg::with_name("crt-digest") + Arg::new("crt-digest") .long("crt-digest") .help("The certificate's digest algorithm") .takes_value(true) @@ -144,7 +144,7 @@ fn main() { .default_value(&default_crt_digest), ) .arg( - Arg::with_name("log-level") + Arg::new("log-level") .long("log-level") .help("Specify the log level") .takes_value(true) @@ -153,25 +153,25 @@ fn main() { .default_value(&default_log_level), ) .arg( - Arg::with_name("to-syslog") + Arg::new("to-syslog") .long("log-syslog") .help("Sends log messages via syslog") .conflicts_with("to-stderr"), ) .arg( - Arg::with_name("to-stderr") + Arg::new("to-stderr") .long("log-stderr") .help("Prints log messages to the standard error output") .conflicts_with("to-syslog"), ) .arg( - Arg::with_name("foreground") + Arg::new("foreground") .long("foreground") - .short("f") + .short('f') .help("Runs in the foreground"), ) .arg( - Arg::with_name("pid-file") + Arg::new("pid-file") .long("pid-file") .help("Path to the PID file") .takes_value(true)