+2007-06-09 01:03 +0200 Thomas Roessler <roessler@does-not-exist.org> (53e5e1105fd2)
+
+ * sendlib.c: remove unnecessary dprints
+
+ * sendlib.c: Fix header encoding corner case.
+
+2007-06-05 13:12 -0700 pywatson <pywatson@gmail.com> (9e90789518ad)
+
+ * ChangeLog, sort.c: Make sort by "To" stable (closes #2515).
+ compare_to() calls mutt_get_name(), which may return a static
+ pointer if it in turn calls mutt_addr_for_display(). If this static
+ pointer is used for a and b, the result is bad. The fix is to make a
+ copy of the first object.
+
2007-05-17 14:40 +0200 Christoph Berg <cb@df7cb.de> (edefe5e1f2b4)
* Muttrc.head: Temporarily set pipe_decode in the \cb urlview macro.
#define ascii_strcmp(a,b) mutt_strcmp(a,b)
#define ascii_strncmp(a,b,c) mutt_strncmp(a,b,c)
+static inline char* ascii_strlower (char *s)
+{
+ char *p = s;
+
+ while (*p)
+ {
+ *p = ascii_tolower ((unsigned int) *p);
+ p++;
+ }
+
+ return s;
+}
+
#endif
{
gpgme_sign_result_t result = NULL;
const char *algorithm_name = NULL;
+ char *bp;
- if (!buflen)
+ if (buflen < 5)
return -1;
*buf = 0;
result = gpgme_op_sign_result (ctx);
if (result && result->signatures)
+ {
+ algorithm_name = gpgme_hash_algo_name (result->signatures->hash_algo);
+ if (algorithm_name)
{
- algorithm_name = gpgme_hash_algo_name (result->signatures->hash_algo);
- if (algorithm_name)
- {
- strncpy (buf, algorithm_name, buflen - 1);
- buf[buflen - 1] = 0;
- }
+ /* convert GPGME raw hash name to RFC 3156 format */
+ snprintf (buf, buflen, "pgp-%s", algorithm_name);
+ ascii_strlower (buf + 4);
}
+ }
return *buf? 0:-1;
}
if (!get_micalg (ctx, buf, sizeof buf))
mutt_set_parameter ("micalg", buf, &t->parameter);
else if (use_smime)
- mutt_set_parameter ("micalg", "sha1", &t->parameter);
+ mutt_set_parameter ("micalg", "pgp-sha1", &t->parameter);
gpgme_release (ctx);
t->parts = a;