Mercurial > pidgin.yaz
annotate src/ntlm.h @ 14180:45818acef0eb
[gaim-migrate @ 16830]
Patch from Henning Norn to not show ICQ users as
"pending" when they are away without a message
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 18 Aug 2006 05:59:47 +0000 |
parents | a539caf502b0 |
children |
rev | line source |
---|---|
11375 | 1 /** |
2 * @file ntlm.h | |
13698 | 3 * |
11375 | 4 * gaim |
5 * | |
6 * Copyright (C) 2005, Thomas Butter <butter@uni-mannheim.de> | |
7 * | |
13698 | 8 * ntlm structs are taken from NTLM description on |
9 * http://www.innovation.ch/java/ntlm.html | |
10 * | |
11375 | 11 * This program is free software; you can redistribute it and/or modify |
12 * it under the terms of the GNU General Public License as published by | |
13 * the Free Software Foundation; either version 2 of the License, or | |
14 * (at your option) any later version. | |
15 * | |
16 * This program is distributed in the hope that it will be useful, | |
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 * GNU General Public License for more details. | |
20 * | |
21 * You should have received a copy of the GNU General Public License | |
22 * along with this program; if not, write to the Free Software | |
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
24 */ | |
25 | |
26 #ifndef _GAIM_NTLM_H | |
27 #define _GAIM_NTLM_H | |
28 | |
29 /** | |
30 * Generates the base64 encoded type 1 message needed for NTLM authentication | |
31 * | |
32 * @param hostname Your hostname | |
33 * @param domain The domain to authenticate to | |
13698 | 34 * @return base64 encoded string to send to the server. This should |
35 * be g_free'd by the caller. | |
11375 | 36 */ |
13680 | 37 gchar *gaim_ntlm_gen_type1(const gchar *hostname, const gchar *domain); |
11375 | 38 |
39 /** | |
40 * Parses the ntlm type 2 message | |
41 * | |
42 * @param type2 String containing the base64 encoded type2 message | |
13783
a539caf502b0
[gaim-migrate @ 16195]
Richard Laager <rlaager@wiktel.com>
parents:
13698
diff
changeset
|
43 * @param flags If not @c NULL, this will store the flags for the message |
a539caf502b0
[gaim-migrate @ 16195]
Richard Laager <rlaager@wiktel.com>
parents:
13698
diff
changeset
|
44 * |
13698 | 45 * @return The nonce for use in message type3. This is a statically |
46 * allocated 8 byte binary string. | |
11375 | 47 */ |
13698 | 48 guint8 *gaim_ntlm_parse_type2(const gchar *type2, guint32 *flags); |
11375 | 49 |
50 /** | |
51 * Generates a type3 message | |
52 * | |
53 * @param username The username | |
54 * @param passw The password | |
55 * @param hostname The hostname | |
56 * @param domain The domain to authenticate against | |
57 * @param nonce The nonce returned by gaim_ntlm_parse_type2 | |
13084 | 58 * @param flags Pointer to the flags returned by gaim_ntlm_parse_type2 |
13698 | 59 * @return A base64 encoded type3 message. This should be g_free'd by |
60 * the caller. | |
11375 | 61 */ |
13698 | 62 gchar *gaim_ntlm_gen_type3(const gchar *username, const gchar *passw, const gchar *hostname, const gchar *domain, const guint8 *nonce, guint32 *flags); |
11375 | 63 |
64 #endif /* _GAIM_NTLM_H */ |