[pmg-devel] [PATCH] expand helper function by eab credentials
Folke Gleumes
f.gleumes at proxmox.com
Tue Nov 14 15:14:02 CET 2023
Signed-off-by: Folke Gleumes <f.gleumes at proxmox.com>
---
src/client.rs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/client.rs b/src/client.rs
index 78c83a2..53f2688 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -367,10 +367,14 @@ impl Client {
contact: Vec<String>,
tos_agreed: bool,
rsa_bits: Option<u32>,
+ 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 {
--
2.39.2
More information about the pmg-devel
mailing list