annotate src/ntlm.h @ 11549:8b494b5763c2

[gaim-migrate @ 13804] We were both adding and removing /gaim/gtk/conversations/send_formatting, I figured that wasn't right so I removed it completely. Also, do we really want to be calling stylize in gtkutils.c? It seems like that would conflict with all the formatting done by the gtkimhtml. Can someone please look at that? It shouldn't take too long to figure it out if you're familiar with gtkimhtml. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 15 Sep 2005 04:54:26 +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 */