annotate src/ntlm.h @ 11790:53490cc0fccf

[gaim-migrate @ 14081] Deleting multiple items from the list of corrections in the text replacement/spellchk plugin didn't work correctly. It would start at the top of the list, and delete items moving downward. Apparently this screwed up the GtkTreePaths or something, so it would delete the wrong iter. So now we start at the bottom and move up :-) committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 24 Oct 2005 05:22:14 +0000
parents 7e98b3bf2fdf
children 31a3a9af1494
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11375
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
1 /**
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
2 * @file ntlm.h
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
3 *
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
4 * gaim
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
5 *
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
6 * Copyright (C) 2005, Thomas Butter <butter@uni-mannheim.de>
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
7 *
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
8 * ntlm structs are taken from NTLM description on
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
9 * http://www.innovation.ch/java/ntlm.html
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
10 *
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
11 * This program is free software; you can redistribute it and/or modify
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
12 * it under the terms of the GNU General Public License as published by
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
13 * the Free Software Foundation; either version 2 of the License, or
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
14 * (at your option) any later version.
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
15 *
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
16 * This program is distributed in the hope that it will be useful,
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
19 * GNU General Public License for more details.
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
20 *
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
21 * You should have received a copy of the GNU General Public License
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
22 * along with this program; if not, write to the Free Software
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
24 */
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
25
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
26 #ifndef _GAIM_NTLM_H
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
27 #define _GAIM_NTLM_H
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
28
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
29 /**
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
30 * Generates the base64 encoded type 1 message needed for NTLM authentication
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
31 *
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
32 * @param hostname Your hostname
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
33 * @param domain The domain to authenticate to
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
34 * @return base64 encoded string to send to the server. has to be freed with g_free
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
35 */
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
36 gchar *gaim_ntlm_gen_type1(gchar *hostname, gchar *domain);
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
37
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
38 /**
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
39 * Parses the ntlm type 2 message
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
40 *
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
41 * @param type2 String containing the base64 encoded type2 message
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
42 * @return The nonce for use in message type3
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
43 */
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
44 gchar *gaim_ntlm_parse_type2(gchar *type2);
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
45
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
46 /**
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
47 * Generates a type3 message
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
48 *
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
49 * @param username The username
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
50 * @param passw The password
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
51 * @param hostname The hostname
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
52 * @param domain The domain to authenticate against
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
53 * @param nonce The nonce returned by gaim_ntlm_parse_type2
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
54 * @return A base64 encoded type3 message
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
55 */
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
56 gchar *gaim_ntlm_gen_type3(gchar *username, gchar *passw, gchar *hostname, gchar *domain, gchar *nonce);
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
57
7e98b3bf2fdf [gaim-migrate @ 13601]
Thomas Butter <tbutter>
parents:
diff changeset
58 #endif /* _GAIM_NTLM_H */