From 47497db453865f7db72ec6aa3ff553762b1b501e Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 1 Mar 2001 17:16:32 +0000 Subject: 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 --- camel/ChangeLog | 8 ++++++++ camel/Makefile.am | 5 ++++- camel/camel-sasl-kerberos4.c | 20 +++++++++++++------- camel/camel-sasl-kerberos4.h | 2 +- 4 files changed, 26 insertions(+), 9 deletions(-) (limited to 'camel') diff --git a/camel/ChangeLog b/camel/ChangeLog index 0179cf917a..24f3b2805b 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,11 @@ +2001-03-01 Dan Winship + + * 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. + 2001-03-01 Peter Williams * camel-url.c (camel_url_new): Assert url_string != NULL. diff --git a/camel/Makefile.am b/camel/Makefile.am index 2d0e8a029a..adf5662dd4 100644 --- a/camel/Makefile.am +++ b/camel/Makefile.am @@ -12,6 +12,7 @@ INCLUDES = -I.. -I$(srcdir)/.. -I$(includedir) \ -I$(top_srcdir)/e-util \ $(GLIB_CFLAGS) \ $(UNICODE_CFLAGS) \ + $(KRB4_CFLAGS) \ -DCAMEL_PROVIDERDIR=\""$(providerdir)"\" \ -DG_LOG_DOMAIN=\"camel\" @@ -142,7 +143,9 @@ libcamelinclude_HEADERS = \ libcamel_la_LDFLAGS = -version-info 0:0:0 -rpath $(libdir) -libcamel_la_LIBADD = $(top_builddir)/e-util/libeutil.la $(UNICODE_LIBS) +libcamel_la_LIBADD = $(top_builddir)/e-util/libeutil.la \ + $(UNICODE_LIBS) \ + $(KRB4_LDFLAGS) noinst_HEADERS = \ 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 -#include "camel-sasl-kerberos4.h" -#include "camel-mime-utils.h" -#include - #ifdef HAVE_KRB4 #include -/* 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 + #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); diff --git a/camel/camel-sasl-kerberos4.h b/camel/camel-sasl-kerberos4.h index 5b674ba766..806c758664 100644 --- a/camel/camel-sasl-kerberos4.h +++ b/camel/camel-sasl-kerberos4.h @@ -30,7 +30,7 @@ extern "C" { #include #include -#include +#include #define CAMEL_SASL_KERBEROS4_TYPE (camel_sasl_kerberos4_get_type ()) #define CAMEL_SASL_KERBEROS4(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_KERBEROS4_TYPE, CamelSaslKerberos4)) -- cgit v1.2.3