aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-10-16 04:09:18 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-10-16 04:09:18 +0800
commit632e29aba593f9036db5a6d9c7c8a5a76209793f (patch)
tree3ae82d9d28459814c6a7a697445db5062fd2d215 /camel
parentb31ab22f04c171ec7e32a8f188ffcefe5b396ffc (diff)
downloadgsoc2013-evolution-632e29aba593f9036db5a6d9c7c8a5a76209793f.tar
gsoc2013-evolution-632e29aba593f9036db5a6d9c7c8a5a76209793f.tar.gz
gsoc2013-evolution-632e29aba593f9036db5a6d9c7c8a5a76209793f.tar.bz2
gsoc2013-evolution-632e29aba593f9036db5a6d9c7c8a5a76209793f.tar.lz
gsoc2013-evolution-632e29aba593f9036db5a6d9c7c8a5a76209793f.tar.xz
gsoc2013-evolution-632e29aba593f9036db5a6d9c7c8a5a76209793f.tar.zst
gsoc2013-evolution-632e29aba593f9036db5a6d9c7c8a5a76209793f.zip
If the hash id is NULL, return CAMEL_CIPHER_HASH_DEFAULT. Fixes bug
2002-10-15 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_id_to_hash): If the hash id is NULL, return CAMEL_CIPHER_HASH_DEFAULT. Fixes bug #32229. svn path=/trunk/; revision=18371
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog5
-rw-r--r--camel/camel-gpg-context.c18
2 files changed, 15 insertions, 8 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 8e240f1409..4b88d89361 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,8 @@
+2002-10-15 Jeffrey Stedfast <fejj@ximian.com>
+
+ * camel-gpg-context.c (gpg_id_to_hash): If the hash id is NULL,
+ return CAMEL_CIPHER_HASH_DEFAULT. Fixes bug #32229.
+
2002-10-08 Jeffrey Stedfast <fejj@ximian.com>
* providers/imap/camel-imap-command.c (imap_read_response): If the
diff --git a/camel/camel-gpg-context.c b/camel/camel-gpg-context.c
index 9b586e5f9b..e994c1054c 100644
--- a/camel/camel-gpg-context.c
+++ b/camel/camel-gpg-context.c
@@ -191,14 +191,16 @@ gpg_hash_to_id (CamelCipherContext *context, CamelCipherHash hash)
static CamelCipherHash
gpg_id_to_hash (CamelCipherContext *context, const char *id)
{
- if (!strcmp (id, "pgp-md2"))
- return CAMEL_CIPHER_HASH_MD2;
- else if (!strcmp (id, "pgp-md5"))
- return CAMEL_CIPHER_HASH_MD5;
- else if (!strcmp (id, "pgp-sha1"))
- return CAMEL_CIPHER_HASH_SHA1;
- else if (!strcmp (id, "pgp-ripemd160"))
- return CAMEL_CIPHER_HASH_RIPEMD160;
+ if (id) {
+ if (!strcmp (id, "pgp-md2"))
+ return CAMEL_CIPHER_HASH_MD2;
+ else if (!strcmp (id, "pgp-md5"))
+ return CAMEL_CIPHER_HASH_MD5;
+ else if (!strcmp (id, "pgp-sha1"))
+ return CAMEL_CIPHER_HASH_SHA1;
+ else if (!strcmp (id, "pgp-ripemd160"))
+ return CAMEL_CIPHER_HASH_RIPEMD160;
+ }
return CAMEL_CIPHER_HASH_DEFAULT;
}