]> git.proxmox.com Git - proxmox-perl-rs.git/commitdiff
acme: add eab fields for pmg
authorFolke Gleumes <f.gleumes@proxmox.com>
Tue, 14 Nov 2023 14:14:05 +0000 (15:14 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 4 Dec 2023 10:54:05 +0000 (11:54 +0100)
Signed-off-by: Folke Gleumes <f.gleumes@proxmox.com>
pmg-rs/src/acme.rs

index 438087bd27d520269251e604ef9736be8833e19a..06281da6f2955475f2e85023e3241e496c4c7eba 100644 (file)
@@ -79,6 +79,7 @@ impl Inner {
         tos_agreed: bool,
         contact: Vec<String>,
         rsa_bits: Option<u32>,
+        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<String>,
         rsa_bits: Option<u32>,
+        eab_kid: Option<String>,
+        eab_hmac_key: Option<String>,
     ) -> 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.