Commit Graph

11 Commits

Author SHA1 Message Date
75705d57f3 Don't bother trying to authenticate (and thus don't throw up an error
2002-06-19  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/smtp/camel-smtp-transport.c (smtp_connect): Don't
	bother trying to authenticate (and thus don't throw up an error
	dialog) unless the server is an ESMTP server and supports
	authentication.

	* camel-sasl-plain.c: Change the user-friendly name to PLAIN, this
	is what it should be. Not "Password" because user's immediately
	think that they need authentication when they see "Password" even
	if they don't need it at all.

svn path=/trunk/; revision=17232
2002-06-19 05:35:59 +00:00
42606efd98 More fixing of the license texts.
svn path=/trunk/; revision=14216
2001-10-27 18:06:04 +00:00
014ed35be5 Remove the "quick_login" member, which is unnecessary.
* camel-service.h: Remove the "quick_login" member, which is
	unnecessary.

	* providers/smtp/camel-smtp-transport.c (smtp_auth): Remove the
	references to quick_login and fix this to use the CamelSasl
	interfaces correctly to do the same thing.
	(connect_to_server): Split this out of smtp_connect
	(smtp_connect): Use connect_to_server. When re-EHLO'ing after
	auth, ignore errors.
	(query_auth_types): Use connect_to_server rather than
	smtp_connect, so it doesn't try to authenticate. Add LOGIN
	authtype to the list of authtypes to check for.

	* providers/smtp/camel-smtp-provider.c
	(camel_provider_module_init): Add LOGIN authtype to the authtypes
	list explicitly.

	* camel-sasl.c (camel_sasl_authtype_list): Don't list LOGIN here:
	it's not a real SASL authtype and is only used for SMTP.

	* camel-sasl-plain.c:
	* camel-sasl-login.c:
	* camel-sasl-kerberos4.c:
	* camel-sasl-cram-md5.c:
	* camel-sasl-anonymous.c:
	* providers/pop3/camel-pop3-provider.c: Remove "quick_login"
	argument from authtypes.

svn path=/trunk/; revision=9100
2001-04-02 20:57:39 +00:00
b27a35eae5 New files to handle the LOGIN SASL mechanism.
2001-04-01  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-sasl-login.[c,h]: New files to handle the LOGIN SASL
	mechanism.

	* camel-sasl-plain.c: Removed the definition of
	camel_sasl_login_authtype.

	* camel-sasl.c (camel_sasl_new): Oops. I thought LOGIN was an
	alias to PLAIN. I was wrong. These two SASL objects have to be
	separate.

	* providers/smtp/camel-smtp-transport.c (smtp_auth): Updated to
	check for and use authmech->quick_login when available.

svn path=/trunk/; revision=9088
2001-04-01 22:54:44 +00:00
c3db21df6e Updated the authtype values.
2001-04-01  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-sasl-plain.c:
	* camel-sasl-anonymous.c:
	* camel-sasl-digest-md5.c:
	* camel-sasl-cram-md5.c:
	* camel-sasl-kerberos4.c: Updated the authtype values.

	* camel-service.h: Added another field to CamelServiceAuthType
	that specifies whether or not the mechanism supports "quick auth"
	which means that the client can send the initial challenge in the
	AUTH request.

	* camel-sasl.c (camel_sasl_new): Add support for LOGIN.
	(camel_sasl_authtype_list): Here too.
	(camel_sasl_authtype): And finally here.

	* camel-sasl-plain.c: Define camel_sasl_login_authtype.

	* providers/smtp/camel-smtp-transport.c (smtp_auth): Only unref
	the SASL object if it exists.

svn path=/trunk/; revision=9086
2001-04-01 22:10:55 +00:00
fe962a2055 Big header cleanups and nntp compile fix
svn path=/trunk/; revision=9024
2001-03-29 20:31:40 +00:00
5be44051a3 Rename this from "PLAIN" to "Password": there's no reason the user needs
* camel-sasl-plain.c (camel_sasl_plain_authtype): Rename this from
	"PLAIN" to "Password": there's no reason the user needs to see the
	SASL mechanism name.

svn path=/trunk/; revision=8950
2001-03-26 19:15:48 +00:00
691be72a02 Don't return NULL if the token is non-NULL. This is why:
2001-03-05  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-sasl-plain.c (plain_challenge): Don't return NULL if the
	token is non-NULL. This is why:

	sending : AUTH PLAIN
        received: 334 ok. go on.                 <-- this is why
        sending : ZGZPaQpAZ214Lm5ldBBnb29jYXI=
        received: 235 {mp005-rz3} go ahead

	* camel-sasl.c (camel_sasl_authtype): Add the PLAIN type here.
	(camel_sasl_authtype_list): And here too.

	* camel-sasl-plain.c: Initialize the camel_sasl_plain_authtype.

	* camel-sasl-plain.h: extern the camel_sasl_plain_authtype.

svn path=/trunk/; revision=8562
2001-03-05 21:28:08 +00:00
61a496ffca Take a GByteArray as input as well. Comment that you can pass %NULL for
* camel-sasl.c (camel_sasl_challenge): Take a GByteArray as input
	as well. Comment that you can pass %NULL for @token to get the
	initial auth data for mechanisms that are client-initiated.
	(camel_sasl_challenge_base64): Convenience function for protocols
	that use base64-encoded SASL.
	(camel_sasl_authenticated): Implement this... (it was prototyped
	already)
	(camel_sasl_new): Function to take a service name, a mechanism
	name, and a CamelService, and return a CamelSasl for it.
	(camel_sasl_authtype, camel_sasl_authtype_list): Functions to
	return CamelServiceAuthType information about SASL mechanisms, to
	allow providers to deal with them generically.

	* camel-sasl-anonymous.c, camel-sasl-plain.c: Update/simplify for
	CamelSasl changes. Both of these are single-round
	(client-initiated) mechanisms, so they don't need to keep state.
	(camel_sasl_plain_new): Removed; use camel_sasl_new instead.
	(Can't get rid of camel_sasl_anonymous_new though...)

	* camel-sasl-cram-md5.c: Update/simplify for CamelSasl changes.
	(camel_sasl_cram_md5_new): Removed; use camel_sasl_new instead.
	(cram_md5_challenge): Use md5_get_digest where possible, and
	various other minor simplifications. CRAM-MD5 only has a single
	round, so there's no need to keep track of state. This code is now
	tested (against Cyrus IMAPd) and known to work.

	* camel-sasl-kerberos4.h: Update/simplify for CamelSasl changes.
	Make only a single #ifdef HAVE_KRB4. Remove stuff from priv that
	isn't needed between rounds.
	(camel_sasl_kerberos4_new): Removed; use camel_sasl_new instead
	(krb4_challenge): Fix up the logic I broke in my previous "at
	least make it compile" fixes, update to match other changes, and
	remove IMAP-isms that shouldn't be in the generic code. This still
	isn't tested, because we're stuck behind a NAT right now...

svn path=/trunk/; revision=8462
2001-03-01 22:23:23 +00:00
eb3167206c Added camel-sasl-anonymous.[c,h] to the build.
2001-02-28  Jeffrey Stedfast  <fejj@ximian.com>

	* Makefile.am: Added camel-sasl-anonymous.[c,h] to the build.

	* camel-sasl-anonymous.[c,h]: new SASL class for ANONYMOUS

	* camel-sasl-plain.c (plain_challenge): Oops, have a state for
	setting sasl->authenticated = TRUE;

	* camel-sasl-cram-md5.c (cram_md5_challenge): Same here.

svn path=/trunk/; revision=8433
2001-02-28 23:24:15 +00:00
4321d72d9b Added camel-sasl*.[c,h] to the build.
2001-02-28  Jeffrey Stedfast  <fejj@ximian.com>

	* Makefile.am: Added camel-sasl*.[c,h] to the build.

	* camel-sasl.[c,h]: new "abstract" SASL class

	* camel-sasl-kerberos4.[c,h]: new SASL class for KERBEROS_V4

	* camel-sasl-cram-md5.[c,h]: new SASL class for CRAM-MD5

	* camel-sasl-plain.[c,h]: new SASL class for PLAIN

	* providers/imap/camel-imap-auth.c: Removed the base64 functions.

	* camel-mime-utils.c (base64_encode_simple): Moved here from
	camel-imap-auth.c
	(base64_decode_simple): Same.

svn path=/trunk/; revision=8428
2001-02-28 18:16:02 +00:00