Skip to content

Commit 934249d

Browse files
committed
Make certbot cli support multi domains
1 parent be9d047 commit 934249d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

certbot/cli/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ struct Config {
6060
cf_zone_id: String,
6161
/// Auto set CAA record
6262
auto_set_caa: bool,
63-
/// Domain to issue certificates for
64-
domain: String,
63+
/// List of domains to issue certificates for
64+
domains: Vec<String>,
6565
/// Renew interval in seconds
6666
renew_interval: u64,
6767
/// Number of days before expiration to trigger renewal
@@ -81,7 +81,7 @@ impl Default for Config {
8181
cf_api_token: "".into(),
8282
cf_zone_id: "".into(),
8383
auto_set_caa: true,
84-
domain: "example.com".into(),
84+
domains: vec!["example.com".into()],
8585
renew_interval: 3600,
8686
renew_days_before: 10,
8787
renew_timeout: 120,
@@ -125,7 +125,7 @@ fn load_config(config: &PathBuf) -> Result<CertBotConfig> {
125125
.cert_file(workdir.cert_path())
126126
.key_file(workdir.key_path())
127127
.auto_create_account(true)
128-
.cert_subject_alt_names(vec![config.domain])
128+
.cert_subject_alt_names(config.domains)
129129
.cf_zone_id(config.cf_zone_id)
130130
.cf_api_token(config.cf_api_token)
131131
.renew_interval(renew_interval)

0 commit comments

Comments
 (0)