2010-12-05 Jeffrey Stedfast * README: Bumped version * configure.ac: Bumped version to 2.5.4 2010-11-29 Jeffrey Stedfast * gmime/internet-address.c (decode_address): Handle edge cases where inptr reaches the end of the input string prematurely due to a malformed address. 2010-11-29 Jeffrey Stedfast Fixes bug #635409. * gmime/gmime-pkcs7-context.c (pkcs7_get_validity): Reworked the logic to calculate the signer status. Also dropped GMimeSignatureStatus logic. * gmime/gmime-gpg-context.c (gpg_verify): Removed the (broken) logic of calculating a GMimeSignatureStatus. (gpg_decrypt): Same. (gpg_ctx_parse_signer_info): Updated for the g_mime_signer_new() API change. * gmime/gmime-crypto-context.c (g_mime_signature_validity_new): No longer initializes a GMimeSignatureStatus member. (g_mime_signature_validity_get_status): Removed. (g_mime_signature_validity_set_status): Removed. (g_mime_signer_new): Now takes a GMimeSignerStatus so that I could get rid of the default NONE status. * gmime/gmime-crypto-context.h (GMimeSignatureStatus): Removed. 2010-11-24 Jeffrey Stedfast Fixes bug #635661. * gmime/gmime-crypto-context.c (g_mime_signer_new): Initialize pubkey_algo and hash_algo. (g_mime_signer_[g,s]et_pubkey_algo): Implemented. (g_mime_signer_[g,s]et_hash_algo): Renamed from [g,s]et_hash(). * gmime/gmime-crypto-context.h (GMimeCryptoPubKeyAlgo): Defined enum. * gmime/gmime-pkcs7-context.c (pkcs7_get_validity): Record the hash and pubkey algorithms used in the GMimeSigner. * gmime/gmime-gpg-context.c (gpg_ctx_parse_signer_info): Record the pubkey algorithm used by the signer. 2010-11-22 Jeffrey Stedfast * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_encrypt): Now takes a hash algorithm argument which it passes along to g_mime_crypto_context_encrypt(). * gmime/gmime-gpg-context.c (gpg_ctx_get_argv): When signing and encrypting, pass the digest algorithm to gpg on the command-line. (gpg_encrypt): Set the hash id on the GpgCtx. * gmime/gmime-crypto-context.c (g_mime_crypto_context_encrypt): Now takes a hash algorithm argument. 2010-11-22 Jeffrey Stedfast Fixes bug #635492. * gmime/gmime-gpg-context.c (gpg_hash_from_id): New function mapping the numeric hash id's that gpg uses to GMimeCryptoHash ids. (gpg_ctx_parse_signer_info): Extract the hash algorithm used by the signer. (gpg_ctx_parse_status): Updated to use gpg_hash_from_id(). * gmime/gmime-crypto-context.c (g_mime_signer_set_hash): New function to set the hash algorithm used by the signer. (g_mime_signer_get_hash): New function to get the hash algorithm used by the signer. 2010-11-22 Jeffrey Stedfast Fixes bug #635491. * gmime/gmime-crypto-context.[c,h]: Renamed from gmime-cipher-context.[c,h]. 2010-11-21 Jeffrey Stedfast Fixes bug #635407. * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_decrypt): Updated error messages to be more consistent. * gmime/gmime-multipart-signed.c (g_mime_multipart_signed_verify): Make sure to set an error in all cases returning NULL. 2010-11-21 Jeffrey Stedfast Fixes bug #635405. * gmime/gmime-cipher-context.c (g_mime_signer_get_*): These functions all now take a const GMimeSigner *. 2010-11-19 Jeffrey Stedfast Fixes bug #635152 * gmime/gmime-gpg-context.c (GpgCtx): No longer has a sigfile member. Instead contains a sigstream and passwd_fd is now renamed to secret_fd and used for both sending gpg the user's passwd as well as for sending gpg the digital signature when verifying. (gpg_ctx_new): Updated for the new struct members. (gpg_ctx_set_sigstream): Replaces gpg_ctx_set_sigfile(). (gpg_ctx_free): Updated for the new struct members. (gpg_ctx_get_argv): Modify our --verify command-line so that we can pas gpg the digital signature without first writing it to disk. Also modified to return char** instead of a GPtrArray to simplify things. (gpg_ctx_op_start): Modified to also create more pipes in VERIFY mode. (gpg_ctx_op_step): Modified to stream the digital signature to gpg. (gpg_verify): Don't write the digital signature to disk - instead, we now stream it directly to gpg. 2010-10-30 Jeffrey Stedfast * gmime/gmime-message.c (g_mime_message_get_body): New function to try and guess which part (or multipart/alternative) represents the message body. 2010-09-25 Jeffrey Stedfast * gmime/charset-map.c: According to rfc1557, it is suggested that euc-kr be used for headers since many Korean mailers cannot handle base64 or quoted-printable encoded iso-2022-kr. Based on this and bug #629235, I'm just going to drop iso-2022-kr. 2010-09-17 Jeffrey Stedfast Based on a patch by Marek Łętowski * gmime/gmime-utils.c (g_mime_utils_header_decode_text): In the workaround case, if we don't find an end marker, reset our inptr to the beginning of the most recent word *plus 2* (to skip over the leading "=?"), not the beginning of the input text. Also need to reset our ascii state. (g_mime_utils_header_decode_phrase): In the workaround case, if we don't find an end marker, reset our inptr to the beginning of the most recent word *plus 2*, to skip over the leading "=?". 2010-09-16 Jeffrey Stedfast * gmime/gmime-encodings.c (g_mime_encoding_quoted_encode_close): If the last input character is not a \n, append an "=\n" sequence. 2010-09-13 Jeffrey Stedfast * gmime/gmime-charset.c: Mark known_iconv_charsets[] as static. Also mark string members of various private structs as const. 2010-09-06 Jeffrey Stedfast * configure.ac: Bump glib version requirement for g_set_error_literal(). 2010-09-02 Jeffrey Stedfast * gmime/internet-address.c (group_to_string): Don't crash if the group name is unset. Thanks to Damian Pietras for this patch. 2010-09-01 Jeffrey Stedfast * gmime/gmime-utils.c (g_mime_utils_header_decode_phrase): Implement the same rfc2047-workaround hack as the one found in g_mime_utils_header_decode_text(). * gmime/gmime-encodings.c (g_mime_encoding_base64_decode_step): Need to keep state to keep track of the number of ='s we've backed out over in case it crosses buffer boundaries. 2010-08-30 Jeffrey Stedfast * gmime/gmime-param.c (decode_token): Make less strict in order to handle unquoted boundary values containing '=' (and other illegal characters). 2010-08-26 Jeffrey Stedfast * gmime/internet-address.c (_internet_address_set_name): Don't decode/unquote the name. The docs for all the functions that call this assume the name string is in its decoded form already. (_internet_address_decode_name): New internal function that decodes a string and sets it as the name on the InternetAddress. (decode_address): Rewritten to be even more liberal in what it accepts. 2010-06-20 Jeffrey Stedfast * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_decrypt): Don't unref the encrypted content mime part object when the content-type doesn't match application/octet-stream, g_mime_multipart_get_part() does not ref parts it returns. We also need to set an error when this happens.