From ce550d06e2a982a6e212b208f10ec9f850e624a4 Mon Sep 17 00:00:00 2001 From: Folke Gleumes Date: Tue, 14 Nov 2023 15:14:05 +0100 Subject: [PATCH] acme: add eab fields for pmg Signed-off-by: Folke Gleumes --- pmg-rs/src/acme.rs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pmg-rs/src/acme.rs b/pmg-rs/src/acme.rs index 438087b..06281da 100644 --- a/pmg-rs/src/acme.rs +++ b/pmg-rs/src/acme.rs @@ -79,6 +79,7 @@ impl Inner { tos_agreed: bool, contact: Vec, rsa_bits: Option, + eab_creds: Option<(String, String)>, ) -> Result<(), Error> { self.tos = if tos_agreed { self.client.terms_of_service_url()?.map(str::to_owned) @@ -86,7 +87,9 @@ impl Inner { None }; - let _account = self.client.new_account(contact, tos_agreed, rsa_bits)?; + let _account = self + .client + .new_account(contact, tos_agreed, rsa_bits, eab_creds)?; let file = OpenOptions::new() .write(true) .create(true) @@ -238,11 +241,16 @@ pub mod export { tos_agreed: bool, contact: Vec, rsa_bits: Option, + eab_kid: Option, + eab_hmac_key: Option, ) -> Result<(), Error> { - this.inner - .lock() - .unwrap() - .new_account(account_path, tos_agreed, contact, rsa_bits) + this.inner.lock().unwrap().new_account( + account_path, + tos_agreed, + contact, + rsa_bits, + eab_kid.zip(eab_hmac_key), + ) } /// Get the directory's meta information.