]> git.proxmox.com Git - proxmox.git/commitdiff
acme-api: pass parameters by reference
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 6 Jun 2024 08:26:23 +0000 (10:26 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 6 Jun 2024 09:09:56 +0000 (11:09 +0200)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
proxmox-acme-api/src/certificate_helpers.rs

index 8f8b28f9d1af2dfb612738b6679efa85bc5c78b7..0db10c400f6ee1edc8ff3c877f9f94c3963d310a 100644 (file)
@@ -9,7 +9,7 @@ use proxmox_sys::{task_log, task_warn};
 
 use crate::types::{AcmeConfig, AcmeDomain};
 
-pub async fn revoke_certificate(acme_config: AcmeConfig, certificate: &[u8]) -> Result<(), Error> {
+pub async fn revoke_certificate(acme_config: &AcmeConfig, certificate: &[u8]) -> Result<(), Error> {
     let mut acme = super::account_config::load_account_config(&acme_config.account)
         .await?
         .client();
@@ -26,8 +26,8 @@ pub struct OrderedCertificate {
 
 pub async fn order_certificate(
     worker: Arc<WorkerTask>,
-    acme_config: AcmeConfig,
-    domains: Vec<AcmeDomain>,
+    acme_config: &AcmeConfig,
+    domains: &[AcmeDomain],
 ) -> Result<Option<OrderedCertificate>, Error> {
     use proxmox_acme::authorization::Status;
     use proxmox_acme::order::Identifier;