libpurple/ntlm.h

Fri, 04 Apr 2014 20:30:07 +0200

author
Tomasz Wasilczyk <twasilczyk@pidgin.im>
date
Fri, 04 Apr 2014 20:30:07 +0200
changeset 35753
222e69060b4a
parent 35487
494f09f7f331
child 37094
84873ce721dc
permissions
-rw-r--r--

Remote smileys: display them even on the first time

20147
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
1 /* purple
11375
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
2 *
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
3 * Copyright (C) 2005, Thomas Butter <butter@uni-mannheim.de>
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
4 *
13700
ad7bca3b4240 [gaim-migrate @ 16101]
Mark Doliner <markdoliner@pidgin.im>
parents: 13682
diff changeset
5 * ntlm structs are taken from NTLM description on
ad7bca3b4240 [gaim-migrate @ 16101]
Mark Doliner <markdoliner@pidgin.im>
parents: 13682
diff changeset
6 * http://www.innovation.ch/java/ntlm.html
ad7bca3b4240 [gaim-migrate @ 16101]
Mark Doliner <markdoliner@pidgin.im>
parents: 13682
diff changeset
7 *
11375
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
11 * (at your option) any later version.
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
12 *
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
16 * GNU General Public License for more details.
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
17 *
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
19 * 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
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
11375
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
21 */
35487
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35444
diff changeset
22
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35444
diff changeset
23 #ifndef _PURPLE_NTLM_H
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35444
diff changeset
24 #define _PURPLE_NTLM_H
35440
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
25 /**
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
26 * SECTION:ntlm
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
27 * @section_id: libpurple-ntlm
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
28 * @short_description: <filename>ntlm.h</filename>
35444
a4ece5a5565a Use upper-case first letters
Ankit Vani <a@nevitus.org>
parents: 35440
diff changeset
29 * @title: NTLM Authentication
35440
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
30 */
11375
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
31
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25888
diff changeset
32 G_BEGIN_DECLS
14988
66b34458d49e [gaim-migrate @ 17698]
Richard Laager <rlaager@pidgin.im>
parents: 14254
diff changeset
33
11375
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
34 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
35 * purple_ntlm_gen_type1:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
36 * @hostname: Your hostname
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
37 * @domain: The domain to authenticate to
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
38 *
11375
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
39 * Generates the base64 encoded type 1 message needed for NTLM authentication
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
40 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 32787
diff changeset
41 * Returns: base64 encoded string to send to the server. This should
13700
ad7bca3b4240 [gaim-migrate @ 16101]
Mark Doliner <markdoliner@pidgin.im>
parents: 13682
diff changeset
42 * be g_free'd by the caller.
11375
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
43 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
44 gchar *purple_ntlm_gen_type1(const gchar *hostname, const gchar *domain);
11375
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
45
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
46 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
47 * purple_ntlm_parse_type2:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 32787
diff changeset
48 * @type2: String containing the base64 encoded type2 message
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 32787
diff changeset
49 * @flags: If not %NULL, this will store the flags for the message
25888
d0fdd378a635 Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 20147
diff changeset
50 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
51 * Parses the ntlm type 2 message
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
52 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 32787
diff changeset
53 * Returns: The nonce for use in message type3. This is a statically
13700
ad7bca3b4240 [gaim-migrate @ 16101]
Mark Doliner <markdoliner@pidgin.im>
parents: 13682
diff changeset
54 * allocated 8 byte binary string.
11375
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
55 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
56 guint8 *purple_ntlm_parse_type2(const gchar *type2, guint32 *flags);
11375
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
57
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
58 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
59 * purple_ntlm_gen_type3:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 32787
diff changeset
60 * @username: The username
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 32787
diff changeset
61 * @passw: The password
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 32787
diff changeset
62 * @hostname: The hostname
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 32787
diff changeset
63 * @domain: The domain to authenticate against
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 32787
diff changeset
64 * @nonce: The nonce returned by purple_ntlm_parse_type2
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 32787
diff changeset
65 * @flags: Pointer to the flags returned by purple_ntlm_parse_type2
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
66 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
67 * Generates a type3 message
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
68 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 32787
diff changeset
69 * Returns: A base64 encoded type3 message. This should be g_free'd by
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
70 * the caller.
11375
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
71 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
72 gchar *purple_ntlm_gen_type3(const gchar *username, const gchar *passw, const gchar *hostname, const gchar *domain, const guint8 *nonce, guint32 *flags);
11375
765ec911f25d [gaim-migrate @ 13601]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff changeset
73
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25888
diff changeset
74 G_END_DECLS
14988
66b34458d49e [gaim-migrate @ 17698]
Richard Laager <rlaager@pidgin.im>
parents: 14254
diff changeset
75
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
76 #endif /* _PURPLE_NTLM_H */

mercurial