mirror of
https://git.proxmox.com/git/proxmox
synced 2025-08-06 06:32:36 +00:00
acme-api: implement revoke certificate helper
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
parent
53ff71772f
commit
04505ada7a
@ -9,6 +9,16 @@ use proxmox_sys::{task_log, task_warn};
|
||||
|
||||
use crate::types::{AcmeConfig, AcmeDomain};
|
||||
|
||||
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();
|
||||
|
||||
acme.revoke_certificate(certificate, None).await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub struct OrderedCertificate {
|
||||
pub certificate: Vec<u8>,
|
||||
pub private_key_pem: Vec<u8>,
|
||||
|
@ -43,4 +43,4 @@ pub(crate) mod acme_plugin;
|
||||
#[cfg(feature = "impl")]
|
||||
mod certificate_helpers;
|
||||
#[cfg(feature = "impl")]
|
||||
pub use certificate_helpers::order_certificate;
|
||||
pub use certificate_helpers::{order_certificate, revoke_certificate};
|
||||
|
Loading…
Reference in New Issue
Block a user