From 6e1e835739012d4b4ce75938e886ed9c7f983ef2 Mon Sep 17 00:00:00 2001 From: Folke Gleumes Date: Tue, 14 Nov 2023 15:14:02 +0100 Subject: [PATCH] expand helper function by eab credentials Signed-off-by: Folke Gleumes --- src/client.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client.rs b/src/client.rs index 78c83a20..53f2688a 100644 --- a/src/client.rs +++ b/src/client.rs @@ -367,10 +367,14 @@ impl Client { contact: Vec, tos_agreed: bool, rsa_bits: Option, + eab_creds: Option<(String, String)>, ) -> Result<&Account, Error> { - let account = Account::creator() + let mut account = Account::creator() .set_contacts(contact) .agree_to_tos(tos_agreed); + if let Some((eab_kid, eab_hmac_key)) = eab_creds { + account = account.set_eab_credentials(eab_kid, eab_hmac_key)?; + } let account = if let Some(bits) = rsa_bits { account.generate_rsa_key(bits)? } else {