mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-22 07:36:21 +00:00
Add option to trust server's certificate
New tls policy "trust" added to /connect and /account. With the policy TLS connection is established even with invalid certificate. Note, that trust policy forces TLS connection and it fails when server doesn't support TLS. Examples: /connect <jid> tls trust /account <name> set tls trust
This commit is contained in:
@@ -291,6 +291,7 @@ accounts_get_account(const char *const name)
|
||||
gchar *tls_policy = g_key_file_get_string(accounts, name, "tls.policy", NULL);
|
||||
if (tls_policy && ((g_strcmp0(tls_policy, "force") != 0) &&
|
||||
(g_strcmp0(tls_policy, "allow") != 0) &&
|
||||
(g_strcmp0(tls_policy, "trust") != 0) &&
|
||||
(g_strcmp0(tls_policy, "disable") != 0) &&
|
||||
(g_strcmp0(tls_policy, "legacy") != 0))) {
|
||||
g_free(tls_policy);
|
||||
|
||||
Reference in New Issue
Block a user