all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-api] cluster: fingerprint parsing: adapt to changed openssl output
Date: Mon, 24 Jul 2023 13:06:24 +0200	[thread overview]
Message-ID: <20230724110624.9502-1-s.ivanov@proxmox.com> (raw)

currently updating the fingerprints using `pmgcm update-fingerprints`
runs into an error indicating that parsing of the remote node's
fingerprint fails

The error is due to changed output in openssl's x509 command,
introduced in commit:
91034b68b39e3525f09fb263b9272de410a3ba4c
in openssl upstream [0]

Note that in that case it would equally work to change the parameter
from `-sha256` to `-SHA256` in the `openssl x509` command above

The change seems small enough to warrant pulling it into stable-7 as
well (although the issue should not occur in systems upgraded
according to our howtos).

[0] https://github.com/openssl/openssl/commit/91034b68b39e3525f09fb263b9272de410a3ba4c

Reported-by: Martin Maurer <martin@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
quickly tested on a cluster of mine.
 src/PMG/Cluster.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PMG/Cluster.pm b/src/PMG/Cluster.pm
index e9a6054..c431521 100644
--- a/src/PMG/Cluster.pm
+++ b/src/PMG/Cluster.pm
@@ -307,7 +307,7 @@ sub get_remote_cert_fingerprint {
     eval {
 	PVE::Tools::run_command($ssh_cmd, outfunc => sub {
 	    my ($line) = @_;
-	    if ($line =~ m/SHA256 Fingerprint=((?:[A-Fa-f0-9]{2}:){31}[A-Fa-f0-9]{2})/) {
+	    if ($line =~ m/SHA256 Fingerprint=((?:[A-Fa-f0-9]{2}:){31}[A-Fa-f0-9]{2})/i) {
 		$fp = $1;
 	    }
 	});
-- 
2.39.2





             reply	other threads:[~2023-07-24 11:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-24 11:06 Stoiko Ivanov [this message]
2023-07-24 13:08 ` [pmg-devel] applied: " Fabian Grünbichler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230724110624.9502-1-s.ivanov@proxmox.com \
    --to=s.ivanov@proxmox.com \
    --cc=pmg-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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