in PMG key and certificate are in the same file so we need
to extract the certificate (like in the revoke api call)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
if (defined($old_cert)) {
print "Revoking old certificate\n";
- eval { $acme->revoke_certificate($old_cert, undef) };
+ eval {
+ $old_cert = pem_certificate($old_cert)
+ or die "no certificate section found in '$cert_path'\n";
+ $acme->revoke_certificate($old_cert, undef);
+ };
warn "Revoke request to CA failed: $@" if $@;
}
};