diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-10-16 04:09:18 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-10-16 04:09:18 +0800 |
commit | 632e29aba593f9036db5a6d9c7c8a5a76209793f (patch) | |
tree | 3ae82d9d28459814c6a7a697445db5062fd2d215 /camel/camel-gpg-context.c | |
parent | b31ab22f04c171ec7e32a8f188ffcefe5b396ffc (diff) | |
download | gsoc2013-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/camel-gpg-context.c')
-rw-r--r-- | camel/camel-gpg-context.c | 18 |
1 files changed, 10 insertions, 8 deletions
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; } |