aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-cipher-context.h
Commit message (Collapse)AuthorAgeFilesLines
* Use the trust to decide the validity signature status. (Better way ofJeffrey Stedfast2004-02-191-10/+0
| | | | | | | | | | | | 2004-02-18 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_verify): Use the trust to decide the validity signature status. (Better way of solving yesterday's problem) * camel-cipher-context.h: Revert change from yesterday. svn path=/trunk/; revision=24779
* Set the trust.Jeffrey Stedfast2004-02-181-0/+10
| | | | | | | | | | 2004-02-17 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_verify): Set the trust. * camel-cipher-context.h: Add a trust metric to signatures. svn path=/trunk/; revision=24763
* put the camel-smime-context.[ch] back in here, remove it from EXTRA_DIST,Not Zed2003-12-101-0/+17
| | | | | | | | | | | | | | | | | | | | | 2003-12-10 Not Zed <NotZed@Ximian.com> * Makefile.am (libcamel_la_SOURCES): put the camel-smime-context.[ch] back in here, remove it from EXTRA_DIST, and make it compile optinally the same way camel-tcp-stream-ssl.c does (#ifdef ...). * camel-smime-context.c (sm_verify_cmsg): add signer info to certvalidity. * camel-cipher-context.c (CamelCipherValidity): Added certinfo to validity for signing and encrypting, so we can find the keys later for a gui. (camel_cipher_validity_add_certinfo): add signer or encrypter info to the validity. (camel_cipher_validity_envelope): add sign/encrypt keys. svn path=/trunk/; revision=23904
* change args to make it suit storing the validity in a tree.Not Zed2003-11-251-0/+7
| | | | | | | | | | | | | | | | 2003-11-25 Not Zed <NotZed@Ximian.com> * camel-cipher-context.c (camel_cipher_validity_envelope): change args to make it suit storing the validity in a tree. (camel_cipher_validity_init): init the list header. (camel_cipher_validity_clone): call validity_new so it gets init properly. (camel_cipher_validity_free): free any children nodes recursively. * camel-cipher-context.h (CamelCipherValidity): added next/prev and list header. svn path=/trunk/; revision=23484
* look at the content object's mime type, not the container's type.Not Zed2003-11-131-0/+1
| | | | | | | | | | | | | | | | | 2003-11-13 Not Zed <NotZed@Ximian.com> * camel-smime-context.c (sm_verify): look at the content object's mime type, not the container's type. 2003-11-11 Not Zed <NotZed@Ximian.com> * camel-cipher-context.c (camel_cipher_validity_set_valid): take into account the @valid argument and set validity properly. (camel_cipher_validity_clone): new method to copy validities. * camel-smime-context.c (sm_signing_cmsmessage): removed a todo. svn path=/trunk/; revision=23311
* split out the CMSMessage verification code so it can be used fromNot Zed2003-11-101-9/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-11-10 Not Zed <NotZed@Ximian.com> * camel-smime-context.c (sm_verify_cmsg): split out the CMSMessage verification code so it can be used from enveloped or externally signed data. * camel-cipher-context.c (camel_cipher_verify): only take a mimepart, internally handle multiparts and the hash. 2003-11-07 Not Zed <NotZed@Ximian.com> * camel-cipher-context.c: make ciphervalidity a public structure, added encrypt status. (camel_cipher_decrypt): changed to return a ciphervalidity. fixed implementations. (camel_cipher_validity_*): Fixed implementations to match new structure, some of this is now redundant. 2003-11-06 Not Zed <NotZed@Ximian.com> * camel-smime-context.c (camel_smime_context_describe_part): implement. svn path=/trunk/; revision=23242
* new (unfinished) api to peek inside smime parts to tell us whats in it.Not Zed2003-11-051-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | 2003-11-05 Not Zed <NotZed@Ximian.com> * camel-smime-context.c (camel_smime_context_describe_part): new (unfinished) api to peek inside smime parts to tell us whats in it. 2003-11-03 Not Zed <NotZed@Ximian.com> * camel-gpg-context.c (gpg_encrypt): Make this output the full multipart/encrypted part, not just the encrypted content part. * camel-cipher-context.c (camel_cipher_sign): change to output full mime part, not just a stream. (camel_cipher_canonical_to_stream): utility function to canonicalise a mimepart to a stream. * camel-smime-context.c (sm_encode_cmsmessage): removed. (sm_sign): change interface to output a full mime-part, not just a part of a mime part in multipart/signed mode. svn path=/trunk/; revision=23187
* Added a note about api inconsistencies.Not Zed2003-10-301-28/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-10-30 Not Zed <NotZed@Ximian.com> * camel-cipher-context.h: Added a note about api inconsistencies. 2003-10-30 Not Zed <NotZed@Ximian.com> * camel-multipart-encrypted.c (camel_multipart_encrypted_decrypt): fix for cipher_decrypt changes. * camel-gpg-context.c, camel-cipher-context.c: moved all the init code to the end to save having to keep forward declarations around. (camel_cipher_decrypt): changed to take mimepart input and return a mimepart. (gpg_decrypt): fix for changed args. 2003-10-29 Not Zed <NotZed@Ximian.com> * camel-smime-context.[ch]: replaced entirely with a new implementation which inherits from camel-cipher-context, and add to build. * camel-multipart-encrypted.c (camel_multipart_encrypted_encrypt): fix for cipher_encrypt api changes. (camel_multipart_encrypted_decrypt): use g_ascii_strcasecmp. * camel-gpg-context.c (gpg_encrypt): Fix to handle input/output as parts not streams * camel-cipher-context.c (camel_cipher_encrypt): change to take mimeparts rather than streams as input/output. And remove the 'sign' argument, it is implied if userid is supplied. 2003-10-28 Not Zed <NotZed@Ximian.com> * tests/smime/pgp.c (main): fix for ciphercontext api changes. * camel-multipart-signed.c (camel_multipart_signed_verify): pass in the part to cipher_verify directly. (camel_multipart_signed_sign): let the cipher context setup the part details. * camel-gpg-context.c (gpg_sign): put the signature stream into a mimepart, with appropriate headers/encoding. (swrite): write out a mimepart rather than a stream. (gpg_verify): handle changed args. * camel-cipher-context.c (camel_cipher_sign): write the signature to a mimepart rather than a simple stream. (camel_cipher_verify): take the signature as a mimepart not a stream. 2003-10-22 Not Zed <NotZed@Ximian.com> * camel-utf8.c (camel_ucs2_utf8, camel_utf8_ucs2): helpers for ucs2 stuff. ucs2 is 16 bit truncated unicode. svn path=/trunk/; revision=23127
* Set the virtual method pointers to the import/export methods.Jeffrey Stedfast2002-11-011-7/+22
| | | | | | | | | | | | | | | | | | | | | | 2002-10-31 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (camel_gpg_context_class_init): Set the virtual method pointers to the import/export methods. (camel_gpg_context_init): Set the key_protocol string. (gpg_hash_to_id): Handle 2 more hash types. (gpg_id_to_hash): Same. (gpg_ctx_op_step): Slight fixes to support import/export. (gpg_ctx_parse_status): Fix to hack around the fact that importing keys doesn't write to stdout. (gpg_import_keys): Implemented. (gpg_export_keys): Implemented. * camel-cipher-context.c (camel_cipher_context_class_init): Hook up default virtual methods for import/export. (camel_cipher_import_keys): Implemented. (camel_cipher_export_keys): Implemented. svn path=/trunk/; revision=18475
* Removed (never did anything anyway).Jeffrey Stedfast2002-06-271-8/+2
| | | | | | | | | | | | | | 2002-06-26 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_clearsign): Removed (never did anything anyway). * camel-pgp-context.c (pgp_clearsign): Removed. * camel-cipher-context.c (camel_cipher_clearsign): Removed unused method. svn path=/trunk/; revision=17297
* Updated to use ctx->sign_protocol rather than ctx->protocol.Jeffrey Stedfast2002-06-151-2/+3
| | | | | | | | | | | | | | 2002-06-14 Jeffrey Stedfast <fejj@ximian.com> * camel-multipart-signed.c: Updated to use ctx->sign_protocol rather than ctx->protocol. * camel-cipher-context.h: Add an ecnryption protocol member. * camel-pgp-context.c (camel_pgp_context_init): Set the encryption protocol. svn path=/trunk/; revision=17186
* Added a protocol field for users to use.Not Zed2002-05-311-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-05-30 Not Zed <NotZed@Ximian.com> * camel-cipher-context.h: Added a protocol field for users to use. * camel-stream-filter.c (do_read): Sigh, the pre-size is READ_PAD not READ_SIZE. Big difference. (READ_PAD): Bumped upto 128 from 64, so we can fit a typical line in full. * providers/imap/camel-imap-folder.c (get_content): Changed to load multipart/signed as an opaque block into the right kind of object. * camel-multipart.h (struct _CamelMultipart): Removed the boundary field. It wans't actually used anywhere. * camel-seekable-substream.c (camel_seekable_substream_new_with_seekable_stream_and_bounds): Shortened this stupidly long name to just :new(), its the only way its ever used. Fixed all callers. * camel-multipart-signed.[ch]: new wrapper for multipart/signed types. We need to treat the entire content as a blob of data for transport purposes. This also cleans up a lot of the sign/verify handling. * camel-mime-part-utils.c (camel_mime_part_construct_content_from_parser): Just call camel_multipart_construct_from_parser for multipart parts, also use a multipart_signed for multipart/signed types. * camel-multipart.c (camel_multipart_construct_from_parser): New virtual function for multiparts to buld themselves. (construct_from_parser): Implement for normal multiparts. (toplevel): Got rid of a warning, it'll never be an abstract class. * camel-pgp-context.c (pgp_hash_to_id): (pgp_id_to_hash): Implement. (camel_pgp_context_init): Init the pgp protocol specifier. * camel-cipher-context.c (camel_cipher_id_to_hash): (camel_cipher_hash_to_id): Util virtual methods to handle the cipher id string. * camel-mime-filter-canon.[ch]: A new filter, end/start of line canonicalisation filter. Can escape "From " and strip trailing whitespace, and canonicalise the end of line to crlf or to lf. 2002-05-29 Not Zed <NotZed@Ximian.com> * camel-multipart.h (struct _CamelMultipart): Removed the 'parent', nothing used it, anywhere. Cleaned up some formatting slightly. svn path=/trunk/; revision=17057
* Add support for hash type RIPEMD160.Jeffrey Stedfast2002-03-081-1/+2
| | | | | | | | | | | | | | | 2002-03-07 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-mime.c (camel_pgp_mime_part_sign): Add support for hash type RIPEMD160. * camel-cipher-context.h: Add RIPEMD160 hash type. * camel-pgp-context.c (pgp_sign): Updated to consider hash function for pgp5 and pgp6. (pgp_clearsign): Same. svn path=/trunk/; revision=15969
* More fixing of the license texts.Ettore Perazzoli2001-10-281-11/+11
| | | | svn path=/trunk/; revision=14216
* Lots of fixes to get this to almost compile. Still struggling with theJeffrey Stedfast2001-05-151-3/+5
| | | | | | | | | | | | | | | | | | | | | | 2001-05-14 Jeffrey Stedfast <fejj@ximian.com> * camel-smime-context.c: Lots of fixes to get this to almost compile. Still struggling with the fact that CERTCertDBHandle is an "incomplete type". *sigh*. * camel-smime.c (camel_smime_part_verify): Updated to pass in a hash argument to camel_smime_verify(). * camel-pgp-mime.c (camel_pgp_mime_part_verify): Update according to the changes in the context API. * camel-pgp-context.c (pgp_verify): Updated to take a CamelCipherHash argument. * camel-cipher-context.c (camel_cipher_verify): Now takes a hash argument since the S/MIME code needs this. svn path=/trunk/; revision=9804
* New source files to handle Pkcs7 encryption, decryption, signing, andJeffrey Stedfast2001-04-181-0/+1
| | | | | | | | | | | 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
* Updated to reflect the few changes made to the CamelPgpContext class.Jeffrey Stedfast2001-04-131-0/+122
2001-04-12 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-mime.c: Updated to reflect the few changes made to the CamelPgpContext class. * camel-pgp-context.c: Updated to subclass of CamelCipherContext. * camel-cipher-context.[c,h]: New base class for CamelPgpContext. Also contains the replacement for CamelPgpValidity, CamelCipherValidity. svn path=/trunk/; revision=9283