Use the stronger certificate fingerprint.

If a cert has a SHA256 use that one and only use SHA1 as fallback.

Closes: https://github.com/profanity-im/profanity/issues/2068
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
This commit is contained in:
Steffen Jaeckel
2025-11-04 17:46:48 +01:00
parent 0acea8d0d2
commit a07cff8a99
6 changed files with 31 additions and 22 deletions

View File

@@ -1197,7 +1197,7 @@ sv_ev_certfail(const char* const errormsg, const TLSCertificate* cert)
tlscerts_set_current(cert);
return 1;
} else if (g_strcmp0(cmd, "/tls always") == 0) {
cons_show("Adding %s to trusted certificates.", cert->fingerprint_sha1);
cons_show("Adding %s to trusted certificates.", cert->fingerprint);
if (!tlscerts_exists(cert)) {
tlscerts_add(cert);
cafile_add(cert);