add profanity-specific CAfile

The profanity-internal mechanism to allow connecting to a server isn't
easily portable to cURL. Therefor introduce a profanity-specific CAfile
which is managed individually and will be configured in libcurl calls.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
Steffen Jaeckel
2022-03-22 11:26:53 +01:00
parent b28ac09368
commit 7f1f9787cb
9 changed files with 226 additions and 0 deletions

View File

@@ -67,6 +67,7 @@
#include "config/files.h"
#include "config/accounts.h"
#include "config/account.h"
#include "config/cafile.h"
#include "config/preferences.h"
#include "config/theme.h"
#include "config/tlscerts.h"
@@ -231,6 +232,7 @@ cmd_tls_trust(ProfWin* window, const char* const command, gchar** args)
cons_show("Error getting TLS certificate.");
return TRUE;
}
cafile_add(cert);
if (tlscerts_exists(cert->fingerprint)) {
cons_show("Certificate %s already trusted.", cert->fingerprint);
tlscerts_free(cert);