mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-10-04 09:46:01 +00:00
api: ACME revoke: do not abort if CA is just expired
Else, a user would need to renew it first before being able to revoke it, which does not make much sense.. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
25beb9038c
commit
1e67b44463
@ -357,7 +357,11 @@ __PACKAGE__->register_method ({
|
|||||||
$acme->load();
|
$acme->load();
|
||||||
|
|
||||||
print "Revoking old certificate\n";
|
print "Revoking old certificate\n";
|
||||||
$acme->revoke_certificate($cert);
|
eval { $acme->revoke_certificate($cert) };
|
||||||
|
if (my $err = $@) {
|
||||||
|
# is there a better check?
|
||||||
|
die "Revoke request to CA failed: $err" if $err !~ /"Certificate is expired"/;
|
||||||
|
}
|
||||||
|
|
||||||
my $code = sub {
|
my $code = sub {
|
||||||
print "Deleting certificate files\n";
|
print "Deleting certificate files\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user