all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pmg-devel] [PATCH api] fix revocation of old certificate on renewal
@ 2021-03-17 10:12 Wolfgang Bumiller
  2021-03-17 10:34 ` [pmg-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Wolfgang Bumiller @ 2021-03-17 10:12 UTC (permalink / raw)
  To: pmg-devel

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>
---
 src/PMG/API2/Certificates.pm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/PMG/API2/Certificates.pm b/src/PMG/API2/Certificates.pm
index b50addd..1a6c434 100644
--- a/src/PMG/API2/Certificates.pm
+++ b/src/PMG/API2/Certificates.pm
@@ -610,7 +610,11 @@ __PACKAGE__->register_method ({
 
 	    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 $@;
 	    }
 	};
-- 
2.20.1





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pmg-devel] applied: [PATCH api] fix revocation of old certificate on renewal
  2021-03-17 10:12 [pmg-devel] [PATCH api] fix revocation of old certificate on renewal Wolfgang Bumiller
@ 2021-03-17 10:34 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-03-17 10:34 UTC (permalink / raw)
  To: Wolfgang Bumiller, pmg-devel

On 17.03.21 11:12, Wolfgang Bumiller wrote:
> 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>
> ---
>  src/PMG/API2/Certificates.pm | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-17 10:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-17 10:12 [pmg-devel] [PATCH api] fix revocation of old certificate on renewal Wolfgang Bumiller
2021-03-17 10:34 ` [pmg-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal