mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-30 07:36:21 +00:00
Force tls on all connections, add tls policy account property
This commit is contained in:
@@ -51,7 +51,8 @@ account_new(const gchar * const name, const gchar * const jid,
|
||||
int priority_away, int priority_xa, int priority_dnd,
|
||||
const gchar * const muc_service, const gchar * const muc_nick,
|
||||
const gchar * const otr_policy, GList *otr_manual, GList *otr_opportunistic,
|
||||
GList *otr_always, const gchar * const pgp_keyid, const char *const startscript)
|
||||
GList *otr_always, const gchar * const pgp_keyid, const char *const startscript,
|
||||
gchar *tls_policy)
|
||||
{
|
||||
ProfAccount *new_account = malloc(sizeof(ProfAccount));
|
||||
|
||||
@@ -156,6 +157,12 @@ account_new(const gchar * const name, const gchar * const jid,
|
||||
new_account->startscript = NULL;
|
||||
}
|
||||
|
||||
if (tls_policy != NULL) {
|
||||
new_account->tls_policy = strdup(tls_policy);
|
||||
} else {
|
||||
new_account->tls_policy = NULL;
|
||||
}
|
||||
|
||||
return new_account;
|
||||
}
|
||||
|
||||
@@ -224,6 +231,7 @@ account_free(ProfAccount *account)
|
||||
free(account->otr_policy);
|
||||
free(account->pgp_keyid);
|
||||
free(account->startscript);
|
||||
free(account->tls_policy);
|
||||
g_list_free_full(account->otr_manual, g_free);
|
||||
g_list_free_full(account->otr_opportunistic, g_free);
|
||||
g_list_free_full(account->otr_always, g_free);
|
||||
|
||||
Reference in New Issue
Block a user