Commit Graph

5 Commits

Author SHA1 Message Date
63e96e1002 Redo this a lot so that instead of having a class full of callbacks, we
* camel-session.c: Redo this a lot so that instead of having a
	class full of callbacks, we have a subclassable class. Also,
	replace the increasingly horrifying
	camel_session_query_authenticator with three new routines,
	camel_session_get_password, camel_session_forget_password, and
	camel_session_alert_user.

	* camel-pgp-context.c:
	* camel-pkcs7-context.c:
	* camel-smime-context.c:
	* providers/imap/camel-imap-store.c:
	* providers/pop3/camel-pop3-store.c:
	* providers/smtp/camel-smtp-transport.c:
	Use camel_session_get_password / camel_session_forget_password.

	* camel-tcp-stream-ssl.c (ssl_bad_cert): Use
	camel_session_alert_user.

svn path=/trunk/; revision=9617
2001-04-27 21:08:08 +00:00
986252ceaf Implemented using the secmime.h convenience functions. (smime_clearsign):
2001-04-20  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-smime-context.c (smime_sign): Implemented using the
	secmime.h convenience functions.
	(smime_clearsign): We just error our here, there is no clearsign
	for smime.
	(smime_verify): Copied code over from the pkcs7 verify - same
	state, ugly and unknown :-)
	(smime_encrypt): Implemented using the secmime.h convenience
	functions.
	(smime_decrypt): Same as the code in pkcs7-context.

svn path=/trunk/; revision=9480
2001-04-20 21:21:34 +00:00
4cfa7d8551 Implemented. (pkcs7_clearsign): Implemented. (get_zero_len_passwd):
2001-04-19  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-pkcs7-context.c (pkcs7_sign): Implemented.
	(pkcs7_clearsign): Implemented.
	(get_zero_len_passwd): Convenience function to try a 0-length key
	on the certificate db - if this works then there is no need to
	prompt the user.
	(get_password): Callback to get the password.
	(camel_cipher_hash_to_nss): Convenience function to convert a
	CamelCipherHash to an NSS HASH_HashType.
	(nss_hash_to_sec_oid): Converts a HASH_HashType to a SecOidTag.
	(pkcs7_digest): Digest function for use with pkcs7_sign().
	(sign_encode_cb): Callback to write the signed data to the output
	stream.
	(pkcs7_verify): Hacked on a bit more but am still a bit on the
	confused side. This might work but I wouldn't hold my breath. The
	sign/clearsign should be close if not correct, but this one...god
	only knows.
	(pkcs7_decrypt): Implemented.
	(pkcs7_encrypt): Implemented (mostly, still need to handle when
	'sign' is TRUE).

svn path=/trunk/; revision=9461
2001-04-19 23:15:51 +00:00
9844450fd7 Implemented. (pkcs7_clearsign): Implemented. (get_zero_len_passwd):
2001-04-19  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-pkcs7-context.c (pkcs7_sign): Implemented.
	(pkcs7_clearsign): Implemented.
	(get_zero_len_passwd): Convenience function to try a 0-length key
	on the certificate db - if this works then there is no need to
	prompt the user.
	(get_password): Callback to get the password.
	(camel_cipher_hash_to_nss): Convenience function to convert a
	CamelCipherHash to an NSS HASH_HashType.
	(nss_hash_to_sec_oid): Converts a HASH_HashType to a SecOidTag.
	(pkcs7_digest): Digest function for use with pkcs7_sign().
	(sign_encode_cb): Callback to write the signed data to the output
	stream.
	(pkcs7_verify): Hacked on a bit more but am still a bit on the
	confused side. This might work but I wouldn't hold my breath. The
	sign/clearsign should be close if not correct, but this one...god
	only knows.

svn path=/trunk/; revision=9460
2001-04-19 19:38:40 +00:00
0f436d9a22 New source files to handle Pkcs7 encryption, decryption, signing, and
2001-04-17  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-pkcs7-context.[c,h]: New source files to handle Pkcs7
	encryption, decryption, signing, and verifying. Not yet
	complete. I'm sensing this is going to take a while seeing as how
	NSS is just so well documented.

svn path=/trunk/; revision=9435
2001-04-17 22:18:25 +00:00