mirror of
https://git.proxmox.com/git/proxmox
synced 2025-08-08 11:19:07 +00:00
expand helper function by eab credentials
Signed-off-by: Folke Gleumes <f.gleumes@proxmox.com>
This commit is contained in:
parent
d07e4fdb9a
commit
6e1e835739
@ -367,10 +367,14 @@ impl Client {
|
|||||||
contact: Vec<String>,
|
contact: Vec<String>,
|
||||||
tos_agreed: bool,
|
tos_agreed: bool,
|
||||||
rsa_bits: Option<u32>,
|
rsa_bits: Option<u32>,
|
||||||
|
eab_creds: Option<(String, String)>,
|
||||||
) -> Result<&Account, Error> {
|
) -> Result<&Account, Error> {
|
||||||
let account = Account::creator()
|
let mut account = Account::creator()
|
||||||
.set_contacts(contact)
|
.set_contacts(contact)
|
||||||
.agree_to_tos(tos_agreed);
|
.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 {
|
let account = if let Some(bits) = rsa_bits {
|
||||||
account.generate_rsa_key(bits)?
|
account.generate_rsa_key(bits)?
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user