aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-sasl-kerberos4.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-03-02 01:16:32 +0800
committerDan Winship <danw@src.gnome.org>2001-03-02 01:16:32 +0800
commit47497db453865f7db72ec6aa3ff553762b1b501e (patch)
tree8f6ba359f1d678febdd588048d3742711f53b9a4 /camel/camel-sasl-kerberos4.c
parentf5fed971578ba0cecf5663e957795caa7cb19c22 (diff)
downloadgsoc2013-evolution-47497db453865f7db72ec6aa3ff553762b1b501e.tar.gz
gsoc2013-evolution-47497db453865f7db72ec6aa3ff553762b1b501e.tar.zst
gsoc2013-evolution-47497db453865f7db72ec6aa3ff553762b1b501e.zip
camel depends on krb4 now (where available), for camel-sasl-kerberos4.c
* Makefile.am (libcamel_la_LIBADD, INCLUDES): camel depends on krb4 now (where available), for camel-sasl-kerberos4.c * camel-sasl-kerberos4.[ch]: Make this at least compile. Dunno if it works yet. svn path=/trunk/; revision=8451
Diffstat (limited to 'camel/camel-sasl-kerberos4.c')
-rw-r--r--camel/camel-sasl-kerberos4.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/camel/camel-sasl-kerberos4.c b/camel/camel-sasl-kerberos4.c
index 28ef780773..bb61a440a1 100644
--- a/camel/camel-sasl-kerberos4.c
+++ b/camel/camel-sasl-kerberos4.c
@@ -21,17 +21,19 @@
*/
#include <config.h>
-#include "camel-sasl-kerberos4.h"
-#include "camel-mime-utils.h"
-#include <string.h>
-
#ifdef HAVE_KRB4
#include <krb.h>
-/* MIT krb4 des.h #defines _. Sigh. We don't need it. */
+/* MIT krb4 des.h #defines _. Sigh. We don't need it. #undef it here
+ * so we get the gettexty _ definition later.
+ */
#undef _
#endif
+#include "camel-sasl-kerberos4.h"
+#include "camel-mime-utils.h"
+#include <string.h>
+
#define KERBEROS_V4_PROTECTION_NONE 1
#define KERBEROS_V4_PROTECTION_INTEGRITY 2
#define KERBEROS_V4_PROTECTION_PRIVACY 4
@@ -146,12 +148,16 @@ static GByteArray *
krb4_challenge (CamelSasl *sasl, const char *token, CamelException *ex)
{
CamelSaslKerberos4 *sasl_krb4 = CAMEL_SASL_KERBEROS4 (sasl);
- struct CamelSaslKerberos4Private *priv = sasl_krb4->priv;
+ struct _CamelSaslKerberos4Private *priv = sasl_krb4->priv;
char *buf = NULL, *data = NULL;
GByteArray *ret = NULL;
char *inst, *realm;
struct hostent *h;
int status, len;
+ KTEXT_ST authenticator;
+ CREDENTIALS credentials;
+ des_cblock session;
+ des_key_schedule schedule;
if (token)
data = g_strdup (token);
@@ -218,7 +224,7 @@ krb4_challenge (CamelSasl *sasl, const char *token, CamelException *ex)
data[5] = data[6] = data[7] = 0;
strcpy (data + 8, sasl_krb4->username);
- des_pcbc_encrypt ((des_cblock *)data, (des_cblock *)data, len,
+ des_pcbc_encrypt ((void *)data, (void *)data, len,
schedule, &session, 1);
memset (&session, 0, sizeof (session));
buf = base64_encode_simple (data, len);