commit 47fc23c48fd9832a8230962f59decad6ad2824ae
parent 8a60ff01e9e4245a613e7ca31ca903a3d624629b
Author: Paul <paul@claws-mail.org>
Date: Fri, 12 Jul 2013 08:13:12 +0100
fix bug 2960, 'rfc3156 deviation regarding hash symbols'
make micalg value lowercase as per RFC 3156
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/plugins/pgpmime/pgpmime.c b/src/plugins/pgpmime/pgpmime.c
@@ -553,8 +553,8 @@ gboolean pgpmime_sign(MimeInfo *mimeinfo, PrefsAccount *account, const gchar *fr
if (result && result->signatures) {
gpgme_new_signature_t sig = result->signatures;
if (gpgme_get_protocol(ctx) == GPGME_PROTOCOL_OpenPGP) {
- micalg = g_strdup_printf("PGP-%s", gpgme_hash_algo_name(
- result->signatures->hash_algo));
+ micalg = g_strdup_printf("pgp-%s", g_ascii_strdown(gpgme_hash_algo_name(
+ result->signatures->hash_algo),-1));
} else {
micalg = g_strdup(gpgme_hash_algo_name(
result->signatures->hash_algo));
diff --git a/src/plugins/smime/smime.c b/src/plugins/smime/smime.c
@@ -629,8 +629,8 @@ gboolean smime_sign(MimeInfo *mimeinfo, PrefsAccount *account, const gchar *from
result = gpgme_op_sign_result(ctx);
if (result && result->signatures) {
if (gpgme_get_protocol(ctx) == GPGME_PROTOCOL_OpenPGP) {
- micalg = g_strdup_printf("PGP-%s", gpgme_hash_algo_name(
- result->signatures->hash_algo));
+ micalg = g_strdup_printf("pgp-%s", g_ascii_strdown(gpgme_hash_algo_name(
+ result->signatures->hash_algo),-1));
} else {
micalg = g_strdup(gpgme_hash_algo_name(
result->signatures->hash_algo));