Commit Graph

60 Commits

Author SHA1 Message Date
174adfa471 Numerous fixes to get it to build correctly with NSS enabled.
2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-tcp-stream-ssl.c: Numerous fixes to get it to build
	correctly with NSS enabled.

	* camel-remote-store.c (remote_connect): Pass in the session and
	expected host args, oops.

	* camel-provider.h (CAMEL_URL_ALLOW_SSL): Defined.

	* providers/imap/camel-imap-store.c (camel_imap_store_init): Check
	to see if we are supposed to use SSL and set the options
	accordingly.
	(imap_connect): Return FALSE here instead of NULL.

	* providers/imap/camel-imap-provider.c: Add CAMEL_URL_ALLOW_SSL.

	* providers/imap/libcamelimap.urls: Add "imaps" which is the
	protocol for Secure IMAP.

svn path=/trunk/; revision=8711
2001-03-14 21:59:40 +00:00
24bb645439 Made cancellable. (stream_write): Same. (stream_connect): Removed checks
2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-tcp-stream-raw.c (stream_read): Made cancellable.
	(stream_write): Same.
	(stream_connect): Removed checks for DIVINE_INTERVENTION as the
	code worked fine.

	* camel-tcp-stream-ssl.c (stream_write): get rid of 'w' as it
	wasn't really needed.
	(set_errno): New function to set errno based on the NSPR error
	code.
	(stream_read): If an error occured, call set_errno().
	(stream_write): Same.

svn path=/trunk/; revision=8701
2001-03-14 04:31:58 +00:00
e258958d9e Oops. Make this a subclass of CamelTcpStream, not CamelStream.
2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_get_type):
	Oops. Make this a subclass of CamelTcpStream, not CamelStream.

	* camel-types.h: Add the defs for CamelTcpStream and
	CamelTcpStreamRaw

	* Makefile.am: Add camel-tcp-stream and camel-tcp-stream-raw to
	the build.

	* camel-remote-store.c (remote_connect): Update to use
	CamelTcpStreams.

	* camel-tcp-stream-raw.c (stream_connect): Made cancellable by
	copying the currently used code in camel-remote-store.c.
	(stream_setsockopt): Oops, flags = fcntl (..., GET_FL);
	(camel_tcp_stream_raw_get_type): Oops. Make this a subclass of
	CamelTcpStream, not CamelStream.

svn path=/trunk/; revision=8697
2001-03-14 00:46:59 +00:00
6da96db8dd Comment out everything unless HAVE_NSS is defined.
2001-03-09  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-tcp-stream-ssl.h: Comment out everything unless HAVE_NSS
	is defined.

	* camel-tcp-stream-ssl.c (stream_read): Don't use errno, use
	nspr's error code stuff.
	(stream_write): Same.

svn path=/trunk/; revision=8626
2001-03-11 04:35:20 +00:00
afa21bb264 Oops, include the camel-tcp-stream-ssl header instead of the raw one.
2001-01-31  Jeffrey Stedfast  <fejj@helixcode.com>

	* camel-tcp-stream-ssl.c: Oops, include the camel-tcp-stream-ssl
	header instead of the raw one.

svn path=/trunk/; revision=8103
2001-02-08 04:50:59 +00:00
405f1c5229 Ugh, this design is ugly like my butt.
2001-01-16  Jeffrey Stedfast  <fejj@ximian.com>

	Ugh, this design is ugly like my butt.

	* camel-session.c (camel_session_query_cert_authenticator): New
	function which will be useful when we integrate SSL.

	* camel-tcp-stream-ssl.c (ssl_auth_cert): Callback to authenticate
	a certificate.
	(ssl_bad_cert): Callback that gets the reason the certificate is
	bad and then calls camel's cert-authenticator callback to notify
	the user and to allow the user to override the check.
	(stream_connect): Set the URL we expect to connect with and setup
	the auth_cert and bad_cert callbacks.
	(camel_tcp_stream_ssl_new): Now takes a CamelSession and a
	expected_host argument that it will use for certificate
	authentication.
	(camel_tcp_stream_ssl_finalize): Unref the session and free the
	expected_host.

svn path=/trunk/; revision=7531
2001-01-16 07:19:49 +00:00
d9b76e981f If the close() is successful, set the fd to -1.
2001-01-15  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-stream-fs.c (stream_close): If the close() is successful,
	set the fd to -1.

	* camel-tcp-stream-raw.c: Removed the disconnect() method.
	(stream_close): If the close() is successful, set the sockfd to
	-1.

	* camel-tcp-stream-ssl.c: Removed the disconnect() method.
	(stream_close): If the close() is successful, set the sockfd to
	NULL.

	* camel-tcp-stream.c (camel_tcp_stream_disconnect): Removed,
	easier to just use the close() method as it did the same thing
	anyway.

svn path=/trunk/; revision=7522
2001-01-16 00:54:18 +00:00
e12bc65aa5 Uses an SSL socket now although there's still a few things missing (like
2001-01-15  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-tcp-stream-ssl.c (stream_connect): Uses an SSL socket now
	although there's still a few things missing (like certificate
	handling and such).

	* camel.c (camel_ssl_init): A replacement function for
	camel_init() that also initializes SSL.

svn path=/trunk/; revision=7494
2001-01-15 06:25:23 +00:00
24a2d4baa8 Implemented. (stream_setsockopt): Implemented.
2001-01-14  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-tcp-stream-ssl.c (stream_getsockopt): Implemented.
	(stream_setsockopt): Implemented.

	* camel-tcp-stream-raw.c (stream_getsockopt): Implemented.
	(stream_setsockopt): Implemented.

	* camel-tcp-stream.c (camel_tcp_stream_getsockopt): New method.
	(camel_tcp_stream_setsockopt): Another new method. I think you get
	the idea of what these are for so I won't explain them.

svn path=/trunk/; revision=7491
2001-01-14 22:48:09 +00:00
5608af39dd New CamelTcpStream class that implements nspr sockets and eventually will
2001-01-14  Jeffrey Stedfast  <fejj@helixcode.com>

	* camel-tcp-stream-ssl.[c,h]: New CamelTcpStream class that
	implements nspr sockets and eventually will use nss for
	SSL/TLS. Currently doesn't do any SSL/TLS but it should still
	work. It's functionally equivalent to CamelTcpStreamRaw at the
	moment only it uses nspr i/o.

	* camel-tcp-stream-raw.[c,h]: New CamelTcpStream class that
	implements native sockets. Should be usable but may have some bugs
	yet.

svn path=/trunk/; revision=7489
2001-01-14 08:21:00 +00:00