finch/gntaccount.h

Sat, 25 Nov 2017 21:42:28 +0800

author
Tom Li <tomli@tomli.me>
date
Sat, 25 Nov 2017 21:42:28 +0800
branch
release-2.x.y
changeset 38792
fdb68b9b02b8
parent 20939
13dd02add7c1
child 32438
dc8991868906
permissions
-rw-r--r--

jabber.c: fix #17270, ignore STARTTLS when using BOSH.

Pidgin wants to establish a TLS connection with a STARTTLS request, but
it doesn't make any sense, since the XMPP stream is proxied by the BOSH
connection, which is already encrypted by HTTPS. It is impossible to
STARTTLS with BOSH.

According to XEP-0206: The client SHOULD ignore any Transport Layer Security
(TLS) feature since BOSH channel encryption SHOULD be negotiated at the HTTP
layer.

Failing to do it causes Pidgin fails to create any connection with BOSH to any
XMPP server with STARTTLS enabled.

https://developer.pidgin.im/ticket/17270

14620
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
1 /**
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
2 * @file gntaccount.h GNT Account API
16255
fa61ee19f526 Rename the Doxygen group from gntui to finch and define the finch group
Richard Laager <rlaager@pidgin.im>
parents: 15931
diff changeset
3 * @ingroup finch
20147
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19969
diff changeset
4 */
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19969
diff changeset
5
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19969
diff changeset
6 /* finch
14620
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
7 *
15931
716b5fac1895 Re-sed the copyright notices so they don't all talk about Purple.
Richard Laager <rlaager@pidgin.im>
parents: 15906
diff changeset
8 * Finch is the legal property of its developers, whose names are too numerous
14620
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
10 * source distribution.
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
11 *
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
12 * This program is free software; you can redistribute it and/or modify
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
13 * it under the terms of the GNU General Public License as published by
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
15 * (at your option) any later version.
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
16 *
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
17 * This program is distributed in the hope that it will be useful,
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
20 * GNU General Public License for more details.
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
21 *
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
22 * You should have received a copy of the GNU General Public License
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
23 * along with this program; if not, write to the Free Software
19859
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 16255
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
14620
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
25 */
14260
a21577fbb4d2 [gaim-migrate @ 16870]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14041
diff changeset
26 #ifndef _GNT_ACCOUNT_H
a21577fbb4d2 [gaim-migrate @ 16870]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14041
diff changeset
27 #define _GNT_ACCOUNT_H
a21577fbb4d2 [gaim-migrate @ 16870]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14041
diff changeset
28
13969
0541f389442e [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
29 #include "account.h"
0541f389442e [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
30
14620
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
31 /**********************************************************************
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
32 * @name GNT Account API
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
33 **********************************************************************/
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
34 /*@{*/
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
35
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
36 /**
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
37 * Get the ui-functions.
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
38 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15878
diff changeset
39 * @return The PurpleAccountUiOps structure populated with the appropriate functions.
14620
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
40 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15878
diff changeset
41 PurpleAccountUiOps *finch_accounts_get_ui_ops(void);
13969
0541f389442e [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
42
14620
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
43 /**
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
44 * Perform necessary initializations.
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
45 */
15878
f52832b611fe renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents: 14620
diff changeset
46 void finch_accounts_init(void);
13969
0541f389442e [gaim-migrate @ 16402]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
diff changeset
47
14620
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
48 /**
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
49 * Perform necessary uninitializations.
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
50 */
15878
f52832b611fe renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents: 14620
diff changeset
51 void finch_accounts_uninit(void);
14041
6afba85cfc30 [gaim-migrate @ 16540]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 13969
diff changeset
52
14620
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
53 /**
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
54 * Show the account-manager dialog.
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
55 */
15878
f52832b611fe renamed gaim-text to finch
Sean Egan <seanegan@pidgin.im>
parents: 14620
diff changeset
56 void finch_accounts_show_all(void);
14041
6afba85cfc30 [gaim-migrate @ 16540]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 13969
diff changeset
57
19969
53aca1037b2c Instead of just notifying the user about a connection error, give him options
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 19859
diff changeset
58 /**
53aca1037b2c Instead of just notifying the user about a connection error, give him options
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 19859
diff changeset
59 * Show the edit dialog for an account.
53aca1037b2c Instead of just notifying the user about a connection error, give him options
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 19859
diff changeset
60 *
53aca1037b2c Instead of just notifying the user about a connection error, give him options
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 19859
diff changeset
61 * @param account The account to edit, or @c NULL to create a new account.
20939
13dd02add7c1 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 20147
diff changeset
62 *
13dd02add7c1 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 20147
diff changeset
63 * @since 2.2.0
19969
53aca1037b2c Instead of just notifying the user about a connection error, give him options
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 19859
diff changeset
64 */
53aca1037b2c Instead of just notifying the user about a connection error, give him options
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 19859
diff changeset
65 void finch_account_dialog_show(PurpleAccount *account);
53aca1037b2c Instead of just notifying the user about a connection error, give him options
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 19859
diff changeset
66
14620
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
67 /*@}*/
90d599495d65 [gaim-migrate @ 17281]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14260
diff changeset
68
14260
a21577fbb4d2 [gaim-migrate @ 16870]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 14041
diff changeset
69 #endif

mercurial