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:
@@ -292,11 +292,11 @@ cmd_tls_trust(ProfWin* window, const char* const command, gchar** args)
|
||||
}
|
||||
cafile_add(cert);
|
||||
if (tlscerts_exists(cert)) {
|
||||
cons_show("Certificate %s already trusted.", cert->fingerprint_sha1);
|
||||
cons_show("Certificate %s already trusted.", cert->fingerprint);
|
||||
tlscerts_free(cert);
|
||||
return TRUE;
|
||||
}
|
||||
cons_show("Adding %s to trusted certificates.", cert->fingerprint_sha1);
|
||||
cons_show("Adding %s to trusted certificates.", cert->fingerprint);
|
||||
tlscerts_add(cert);
|
||||
tlscerts_free(cert);
|
||||
return TRUE;
|
||||
|
||||
Reference in New Issue
Block a user