[pmg-devel] applied: [PATCH pmg-rs 1/2] add support for set_proxy

Wolfgang Bumiller w.bumiller at proxmox.com
Thu Nov 18 11:22:55 CET 2021


On Tue, Nov 09, 2021 at 05:20:05PM +0100, Stoiko Ivanov wrote:
> this commit needs a versioned dependency bump on proxmox-acme-rs
> 
> Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
> ---
>  src/acme.rs | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/src/acme.rs b/src/acme.rs
> index a1b5278..0429a0d 100644
> --- a/src/acme.rs
> +++ b/src/acme.rs
> @@ -173,6 +173,10 @@ impl Inner {
>      pub fn revoke_certificate(&mut self, data: &[u8], reason: Option<u32>) -> Result<(), Error> {
>          Ok(self.client.revoke_certificate(data, reason)?)
>      }
> +
> +    pub fn set_proxy(&mut self, proxy: String) {
> +        self.client.set_proxy(proxy)
> +    }
>  }
>  
>  #[perlmod::package(name = "PMG::RS::Acme", lib = "pmg_rs")]
> @@ -416,4 +420,11 @@ pub mod export {
>              .revoke_certificate(&data, reason)?;
>          Ok(())
>      }
> +
> +    /// Set a proxy
> +    #[export]
> +    pub fn set_proxy(#[try_from_ref] this: &Acme, proxy: String) {
> +        this.inner.lock().unwrap().set_proxy(proxy)
> +    }
> +
>  }
> -- 
> 2.30.2




More information about the pmg-devel mailing list