Cleaned some warnings in the code
[siplcs.git] / src / sipkrb5.h
blobc52ae721a3fe2fb5736b7edea67527f11d92ed34
1 /*
2 * @file sipkrb5.h
4 * Methods for using Kerberos authentication and signing with SIPE,
5 * implemented with reference to
6 * - MS-SIP: http://msdn.microsoft.com/en-us/library/cc431510.aspx
8 * Authentication is known to be working, but the signing does not work at
9 * all yet.
11 * pidgin-sipe
13 * Copyright (C) 2008 Novell, Inc.
14 * Copyright (C) 2008 Andrew Rechenberg
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
31 #ifdef USE_KERBEROS
33 #include <glib.h>
34 #include <time.h>
36 #include "cipher.h"
37 #include "circbuffer.h"
38 #include "dnsquery.h"
39 #include "dnssrv.h"
40 #include "network.h"
41 #include "proxy.h"
42 #include "prpl.h"
43 #include "sslconn.h"
45 #include "sipmsg.h"
46 #include <gssapi.h>
48 struct sipe_krb5_auth {
49 const char * authuser;
50 const char * realm;
51 char * password;
52 const char * hostname;
53 const char * service;
55 char * token;
56 gchar * base64_token;
58 gss_ctx_id_t * gss_context;
61 void purple_krb5_init_auth(struct sipe_krb5_auth *, const char *authuser, const char *realm, char *password, const char *hostname, const char *service);
62 void purple_krb5_gen_auth_token(struct sipe_krb5_auth * auth);
64 gchar * purple_krb5_get_mic(struct sipe_krb5_auth * auth, char * msg);
65 gchar * purple_krb5_get_mic_for_sipmsg(struct sipe_krb5_auth * auth, struct sipmsg * msg);
67 #endif /*USE_KERBEROS*/