mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-20 16:46:21 +00:00
Legacy SSL support
Add "legacy" tls policy to /account and /connect commands. When this policy is specified the connection is connected with XMPP_CONN_LEGACY_SSL flag. Notice, legacy SSL and STARTTLS are not compatible and user has to know when exactly the new policy should be used. To enable it, run one of the next commands: /connect <jid> tls legacy [server <host>] /account <name> set tls legacy Notice, there is no SRV record for legacy SSL. Therefore, you may need "server" property to connect successfully. Refer to configuration provided by your server.
This commit is contained in:
@@ -350,7 +350,8 @@ cmd_connect(ProfWin *window, const char *const command, gchar **args)
|
||||
if (tls_policy &&
|
||||
(g_strcmp0(tls_policy, "force") != 0) &&
|
||||
(g_strcmp0(tls_policy, "allow") != 0) &&
|
||||
(g_strcmp0(tls_policy, "disable") != 0)) {
|
||||
(g_strcmp0(tls_policy, "disable") != 0) &&
|
||||
(g_strcmp0(tls_policy, "legacy") != 0)) {
|
||||
cons_bad_cmd_usage(command);
|
||||
cons_show("");
|
||||
return TRUE;
|
||||
@@ -813,8 +814,9 @@ _account_set_tls(char *account_name, char *policy)
|
||||
{
|
||||
if ((g_strcmp0(policy, "force") != 0)
|
||||
&& (g_strcmp0(policy, "allow") != 0)
|
||||
&& (g_strcmp0(policy, "disable") != 0)) {
|
||||
cons_show("TLS policy must be one of: force, allow or disable.");
|
||||
&& (g_strcmp0(policy, "disable") != 0)
|
||||
&& (g_strcmp0(policy, "legacy") != 0)) {
|
||||
cons_show("TLS policy must be one of: force, allow, legacy or disable.");
|
||||
} else {
|
||||
accounts_set_tls_policy(account_name, policy);
|
||||
cons_show("Updated TLS policy for account %s: %s", account_name, policy);
|
||||
|
||||
Reference in New Issue
Block a user