Thu, 29 Aug 2013 22:59:30 -0700
Fix the FARSIGHT libs and cflags for the jabber prpl.
We never define FARSIGHT_LIBS or FARSIGHT_CFLAGS. We only ever define
FARSTREAM_LIBS and FARSTREAM_CFLAGS, even if they point to farsight.
I'm assuming this hasn't been a problem because:
1. The variables are allowed to be empty (it's not treated as an error)
2. libpurple and/or Pidgin link against farsight/farstream, so it's
apparently not necessary for the plugin to do it itself? Who knew.
| 7014 | 1 | /** |
| 2 | * @file auth.h Authentication routines | |
| 3 | * | |
| 15884 | 4 | * purple |
| 7014 | 5 | * |
|
28322
ac8fec1d2234
Remove specific copyright lines from the XMPP prpl.
Paul Aurich <darkrain42@pidgin.im>
parents:
26703
diff
changeset
|
6 | * Purple is the legal property of its developers, whose names are too numerous |
|
ac8fec1d2234
Remove specific copyright lines from the XMPP prpl.
Paul Aurich <darkrain42@pidgin.im>
parents:
26703
diff
changeset
|
7 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
ac8fec1d2234
Remove specific copyright lines from the XMPP prpl.
Paul Aurich <darkrain42@pidgin.im>
parents:
26703
diff
changeset
|
8 | * source distribution. |
| 7014 | 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify | |
| 11 | * it under the terms of the GNU General Public License as published by | |
| 12 | * the Free Software Foundation; either version 2 of the License, or | |
| 13 | * (at your option) any later version. | |
| 14 | * | |
| 15 | * This program is distributed in the hope that it will be useful, | |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 18 | * GNU General Public License for more details. | |
| 19 | * | |
| 20 | * You should have received a copy of the GNU General Public License | |
| 21 | * 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:
15884
diff
changeset
|
22 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 7014 | 23 | */ |
|
26703
17f9a4bef2a3
Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <darkrain42@pidgin.im>
parents:
19859
diff
changeset
|
24 | #ifndef PURPLE_JABBER_AUTH_H_ |
|
17f9a4bef2a3
Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <darkrain42@pidgin.im>
parents:
19859
diff
changeset
|
25 | #define PURPLE_JABBER_AUTH_H_ |
| 7014 | 26 | |
|
28855
c5bc85f9c00e
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <darkrain42@pidgin.im>
parents:
28322
diff
changeset
|
27 | typedef struct _JabberSaslMech JabberSaslMech; |
|
c5bc85f9c00e
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <darkrain42@pidgin.im>
parents:
28322
diff
changeset
|
28 | |
| 7014 | 29 | #include "jabber.h" |
| 30 | #include "xmlnode.h" | |
| 31 | ||
|
29084
3a821d391ac0
Let's try a more complex set of return states / values for auth mechs.
Paul Aurich <darkrain42@pidgin.im>
parents:
28866
diff
changeset
|
32 | typedef enum { |
|
3a821d391ac0
Let's try a more complex set of return states / values for auth mechs.
Paul Aurich <darkrain42@pidgin.im>
parents:
28866
diff
changeset
|
33 | JABBER_SASL_STATE_FAIL = -1, /* Abort, Retry, Fail? */ |
|
3a821d391ac0
Let's try a more complex set of return states / values for auth mechs.
Paul Aurich <darkrain42@pidgin.im>
parents:
28866
diff
changeset
|
34 | JABBER_SASL_STATE_OK = 0, /* Hooray! */ |
|
3a821d391ac0
Let's try a more complex set of return states / values for auth mechs.
Paul Aurich <darkrain42@pidgin.im>
parents:
28866
diff
changeset
|
35 | JABBER_SASL_STATE_CONTINUE = 1 /* More authentication required */ |
|
3a821d391ac0
Let's try a more complex set of return states / values for auth mechs.
Paul Aurich <darkrain42@pidgin.im>
parents:
28866
diff
changeset
|
36 | } JabberSaslState; |
|
3a821d391ac0
Let's try a more complex set of return states / values for auth mechs.
Paul Aurich <darkrain42@pidgin.im>
parents:
28866
diff
changeset
|
37 | |
|
28855
c5bc85f9c00e
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <darkrain42@pidgin.im>
parents:
28322
diff
changeset
|
38 | struct _JabberSaslMech { |
|
c5bc85f9c00e
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <darkrain42@pidgin.im>
parents:
28322
diff
changeset
|
39 | gint8 priority; /* Higher priority will be tried before lower priority */ |
|
c5bc85f9c00e
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <darkrain42@pidgin.im>
parents:
28322
diff
changeset
|
40 | const gchar *name; |
|
29090
b351fcdeede7
jabber: Fix that leak I mentioned (and fix a mistake where error/response weren't NULL-initialized)
Paul Aurich <darkrain42@pidgin.im>
parents:
29084
diff
changeset
|
41 | JabberSaslState (*start)(JabberStream *js, xmlnode *mechanisms, xmlnode **reply, char **msg); |
|
b351fcdeede7
jabber: Fix that leak I mentioned (and fix a mistake where error/response weren't NULL-initialized)
Paul Aurich <darkrain42@pidgin.im>
parents:
29084
diff
changeset
|
42 | JabberSaslState (*handle_challenge)(JabberStream *js, xmlnode *packet, xmlnode **reply, char **msg); |
|
b351fcdeede7
jabber: Fix that leak I mentioned (and fix a mistake where error/response weren't NULL-initialized)
Paul Aurich <darkrain42@pidgin.im>
parents:
29084
diff
changeset
|
43 | JabberSaslState (*handle_success)(JabberStream *js, xmlnode *packet, char **msg); |
|
b351fcdeede7
jabber: Fix that leak I mentioned (and fix a mistake where error/response weren't NULL-initialized)
Paul Aurich <darkrain42@pidgin.im>
parents:
29084
diff
changeset
|
44 | JabberSaslState (*handle_failure)(JabberStream *js, xmlnode *packet, xmlnode **reply, char **msg); |
|
28855
c5bc85f9c00e
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <darkrain42@pidgin.im>
parents:
28322
diff
changeset
|
45 | void (*dispose)(JabberStream *js); |
|
c5bc85f9c00e
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <darkrain42@pidgin.im>
parents:
28322
diff
changeset
|
46 | }; |
|
c5bc85f9c00e
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <darkrain42@pidgin.im>
parents:
28322
diff
changeset
|
47 | |
| 7014 | 48 | void jabber_auth_start(JabberStream *js, xmlnode *packet); |
| 49 | void jabber_auth_start_old(JabberStream *js); | |
| 50 | void jabber_auth_handle_challenge(JabberStream *js, xmlnode *packet); | |
| 51 | void jabber_auth_handle_success(JabberStream *js, xmlnode *packet); | |
| 52 | void jabber_auth_handle_failure(JabberStream *js, xmlnode *packet); | |
| 53 | ||
|
28855
c5bc85f9c00e
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <darkrain42@pidgin.im>
parents:
28322
diff
changeset
|
54 | JabberSaslMech *jabber_auth_get_plain_mech(void); |
|
c5bc85f9c00e
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <darkrain42@pidgin.im>
parents:
28322
diff
changeset
|
55 | JabberSaslMech *jabber_auth_get_digest_md5_mech(void); |
|
28866
e3d867ce000b
jabber: Complete (though untested) SCRAM implementation.
Paul Aurich <darkrain42@pidgin.im>
parents:
28855
diff
changeset
|
56 | JabberSaslMech **jabber_auth_get_scram_mechs(gint *count); |
|
28855
c5bc85f9c00e
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <darkrain42@pidgin.im>
parents:
28322
diff
changeset
|
57 | #ifdef HAVE_CYRUS_SASL |
|
c5bc85f9c00e
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <darkrain42@pidgin.im>
parents:
28322
diff
changeset
|
58 | JabberSaslMech *jabber_auth_get_cyrus_mech(void); |
|
c5bc85f9c00e
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <darkrain42@pidgin.im>
parents:
28322
diff
changeset
|
59 | #endif |
|
c5bc85f9c00e
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <darkrain42@pidgin.im>
parents:
28322
diff
changeset
|
60 | |
|
30898
f7c884a1c8ff
jabber: Add abstraction functions for adding/removing auth mechs. Closes #12715
Eion Robb <eion@robbmob.com>
parents:
30156
diff
changeset
|
61 | void jabber_auth_add_mech(JabberSaslMech *); |
|
f7c884a1c8ff
jabber: Add abstraction functions for adding/removing auth mechs. Closes #12715
Eion Robb <eion@robbmob.com>
parents:
30156
diff
changeset
|
62 | void jabber_auth_remove_mech(JabberSaslMech *); |
|
f7c884a1c8ff
jabber: Add abstraction functions for adding/removing auth mechs. Closes #12715
Eion Robb <eion@robbmob.com>
parents:
30156
diff
changeset
|
63 | |
|
28855
c5bc85f9c00e
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <darkrain42@pidgin.im>
parents:
28322
diff
changeset
|
64 | void jabber_auth_init(void); |
|
c5bc85f9c00e
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <darkrain42@pidgin.im>
parents:
28322
diff
changeset
|
65 | void jabber_auth_uninit(void); |
|
c5bc85f9c00e
jabber: Factor the SASL auth methods into their own files.
Paul Aurich <darkrain42@pidgin.im>
parents:
28322
diff
changeset
|
66 | |
|
26703
17f9a4bef2a3
Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <darkrain42@pidgin.im>
parents:
19859
diff
changeset
|
67 | #endif /* PURPLE_JABBER_AUTH_H_ */ |