From 558fd63ab5636e5c9664986f53d78d7bd48c1aee Mon Sep 17 00:00:00 2001 From: Rodolphe Breard Date: Thu, 21 Mar 2019 19:10:08 +0100 Subject: [PATCH] Rename post_operation_hook to post_operation_hooks --- CHANGELOG.md | 3 +++ acmed/src/acmed.rs | 2 +- acmed/src/config.rs | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72b1265..0787016 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,3 +10,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - The `kp_reuse` flag allow to reuse a key pair instead of creating a new one at each renewal. - It is now possible to define hook groups that can reference either hooks or other hook groups. + +### Changed +- `post_operation_hook` has been renamed `post_operation_hooks`. diff --git a/acmed/src/acmed.rs b/acmed/src/acmed.rs index 6709dcf..b31fb4d 100644 --- a/acmed/src/acmed.rs +++ b/acmed/src/acmed.rs @@ -331,7 +331,7 @@ impl Acmed { remote_url: crt.get_remote_url(&cnf)?, challenge: crt.get_challenge()?, challenge_hooks: crt.get_challenge_hooks(&cnf)?, - post_operation_hooks: crt.get_post_operation_hook(&cnf)?, + post_operation_hooks: crt.get_post_operation_hooks(&cnf)?, }; certs.push(cert); } diff --git a/acmed/src/config.rs b/acmed/src/config.rs index 8b47a72..d92b9bb 100644 --- a/acmed/src/config.rs +++ b/acmed/src/config.rs @@ -136,7 +136,7 @@ pub struct Certificate { pub domains: Vec, pub challenge: String, pub challenge_hooks: Vec, - pub post_operation_hook: Option>, + pub post_operation_hooks: Option>, pub algorithm: Option, pub kp_reuse: Option, pub directory: Option, @@ -231,9 +231,9 @@ impl Certificate { Ok(res) } - pub fn get_post_operation_hook(&self, cnf: &Config) -> Result, Error> { + pub fn get_post_operation_hooks(&self, cnf: &Config) -> Result, Error> { let mut res = vec![]; - match &self.post_operation_hook { + match &self.post_operation_hooks { Some(po_hooks) => for name in po_hooks.iter() { let mut h = cnf.get_hook(&name)?; res.append(&mut h);