Mercurial > pidgin.yaz
annotate libgaim/ntlm.h @ 15000:82d1a2fc6d25
[gaim-migrate @ 17778]
SF Patch #1598994 from lexande
Fixes SF Bug #1581999
Original Description:
"The gaim 2.0.0beta5 log reader plugin uses the "Date" XML field in MSN logs, the format of which varies between locales, leading to logs being displayed on incorrect/future dates in locales that do not use the MM/DD/YYYY format. This patch fixes the plugin to use the "DateTime" field which has YYYY-MM-DD date in all locales."
I totally Warmenhovened this patch. My approach:
"I'm using the Date, Time, and DateTime fields. If I can determine that the log matches the current timezone, it'll display 100% properly in the log viewer. If it has a reasonable offset, it'll display as the original time, sort in the right place, but not have a timezone abbreviation. If the offset is bogus or I can't parse the Date or Time field, it'll display in UTC, but still sort properly. I think this is as ideal as is possible, given the data we have to work with."
You don't have to understand this. ;)
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 19 Nov 2006 06:54:38 +0000 |
parents | 500a8f54354e |
children |
rev | line source |
---|---|
14192 | 1 /** |
2 * @file ntlm.h | |
3 * | |
4 * gaim | |
5 * | |
6 * Copyright (C) 2005, Thomas Butter <butter@uni-mannheim.de> | |
7 * | |
8 * ntlm structs are taken from NTLM description on | |
9 * http://www.innovation.ch/java/ntlm.html | |
10 * | |
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 | |
14926
500a8f54354e
[gaim-migrate @ 17698]
Richard Laager <rlaager@wiktel.com>
parents:
14192
diff
changeset
|
29 #ifdef __cplusplus |
500a8f54354e
[gaim-migrate @ 17698]
Richard Laager <rlaager@wiktel.com>
parents:
14192
diff
changeset
|
30 extern "C" { |
500a8f54354e
[gaim-migrate @ 17698]
Richard Laager <rlaager@wiktel.com>
parents:
14192
diff
changeset
|
31 #endif |
500a8f54354e
[gaim-migrate @ 17698]
Richard Laager <rlaager@wiktel.com>
parents:
14192
diff
changeset
|
32 |
14192 | 33 /** |
34 * Generates the base64 encoded type 1 message needed for NTLM authentication | |
35 * | |
36 * @param hostname Your hostname | |
37 * @param domain The domain to authenticate to | |
38 * @return base64 encoded string to send to the server. This should | |
39 * be g_free'd by the caller. | |
40 */ | |
41 gchar *gaim_ntlm_gen_type1(const gchar *hostname, const gchar *domain); | |
42 | |
43 /** | |
44 * Parses the ntlm type 2 message | |
45 * | |
46 * @param type2 String containing the base64 encoded type2 message | |
47 * @param flags If not @c NULL, this will store the flags for the message | |
48 * | |
49 * @return The nonce for use in message type3. This is a statically | |
50 * allocated 8 byte binary string. | |
51 */ | |
52 guint8 *gaim_ntlm_parse_type2(const gchar *type2, guint32 *flags); | |
53 | |
54 /** | |
55 * Generates a type3 message | |
56 * | |
57 * @param username The username | |
58 * @param passw The password | |
59 * @param hostname The hostname | |
60 * @param domain The domain to authenticate against | |
61 * @param nonce The nonce returned by gaim_ntlm_parse_type2 | |
62 * @param flags Pointer to the flags returned by gaim_ntlm_parse_type2 | |
63 * @return A base64 encoded type3 message. This should be g_free'd by | |
64 * the caller. | |
65 */ | |
66 gchar *gaim_ntlm_gen_type3(const gchar *username, const gchar *passw, const gchar *hostname, const gchar *domain, const guint8 *nonce, guint32 *flags); | |
67 | |
14926
500a8f54354e
[gaim-migrate @ 17698]
Richard Laager <rlaager@wiktel.com>
parents:
14192
diff
changeset
|
68 #ifdef __cplusplus |
500a8f54354e
[gaim-migrate @ 17698]
Richard Laager <rlaager@wiktel.com>
parents:
14192
diff
changeset
|
69 } |
500a8f54354e
[gaim-migrate @ 17698]
Richard Laager <rlaager@wiktel.com>
parents:
14192
diff
changeset
|
70 #endif |
500a8f54354e
[gaim-migrate @ 17698]
Richard Laager <rlaager@wiktel.com>
parents:
14192
diff
changeset
|
71 |
14192 | 72 #endif /* _GAIM_NTLM_H */ |