From: Shannon Sterz <s.sterz@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [PATCH proxmox] client: clarify error message on mismatching fingerprint further
Date: Fri, 22 May 2026 16:30:41 +0200 [thread overview]
Message-ID: <20260522143042.451415-1-s.sterz@proxmox.com> (raw)
Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
Notes:
ideally we could add more context to the error message exposed to the
user in the ui, such as the bad fingerprint. sadly it isn't accessible
at that point anymore so my best attempt at solving this is to
re-direct users to the syslog where such context can be logged.
however, that also makes the error message there very verbose for
something that will get logged every two seconds or so.
since a fix for the rotation case is already in on my to-do list, im
not sure if this is the best approach. however, im also uncertain what
else we can do in the short term.
proxmox-client/src/client.rs | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/proxmox-client/src/client.rs b/proxmox-client/src/client.rs
index 0f014cd5..9cee8ddd 100644
--- a/proxmox-client/src/client.rs
+++ b/proxmox-client/src/client.rs
@@ -556,6 +556,12 @@ fn verify_fingerprint(chain: &x509::X509StoreContextRef, expected_fingerprint: &
if expected_fingerprint != fp.as_ref() {
log::error!("bad fingerprint: {}", fp_string(&fp));
log::error!("expected fingerprint: {}", fp_string(expected_fingerprint));
+ log::error!(
+ r#"If this fingerprint has worked before, it is possible that it changed on the remote
+side. This can happen, for example, if the remote rotates it's certificate regularly.
+If you are sure no machine-in-the-middle attack (MitM) occured, it is safe to set the
+above 'bad fingerpint' as the new fingerprint for the remote."#
+ );
return false;
}
@@ -588,9 +594,9 @@ fn classify_client_error(err: anyhow::Error) -> Error {
if let Some(ssl_err) = cause.downcast_ref::<openssl::error::ErrorStack>() {
return Error::Connect(
format!(
- "Could not establish a TLS connection. Check \
- whether the fingerprint matches or the certificate is valid. \
- OpenSSL Error: {ssl_err}"
+ "Could not establish a TLS connection. Check whether the fingerprint matches or \
+ the certificate on the remote is valid. The system log might also contain more \
+ information. OpenSSL Error: {ssl_err}"
)
.into(),
);
--
2.47.3
reply other threads:[~2026-05-22 14:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260522143042.451415-1-s.sterz@proxmox.com \
--to=s.sterz@proxmox.com \
--cc=pbs-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.