]> granicus.if.org Git - neomutt/log
neomutt
9 years agomerge: cond-date - use rules to choose date format
Richard Russon [Mon, 7 Mar 2016 04:43:54 +0000 (04:43 +0000)]
merge: cond-date - use rules to choose date format

 * feature: conditional dates
 * change date comparisons
 * tidy code
 * add docs
 * add ident to PATCHES

9 years agomerge: nested-if - allow deeply nested conditions
Richard Russon [Mon, 7 Mar 2016 04:43:51 +0000 (04:43 +0000)]
merge: nested-if - allow deeply nested conditions

 * feature: nested-if
 * use nested angle brackets
 * tidy code
 * add docs
 * add ident to PATCHES

9 years agomerge: index-color - theme the email index
Richard Russon [Mon, 7 Mar 2016 04:43:43 +0000 (04:43 +0000)]
merge: index-color - theme the email index

 * feature: index-color
 * add handling index flags
 * fix width calculation
 * fix uncolor
 * tidy code
 * add docs
 * add ident to PATCHES

9 years agomerge: status-color - theming the status bar
Richard Russon [Mon, 7 Mar 2016 04:41:42 +0000 (04:41 +0000)]
merge: status-color - theming the status bar

 * feature: status-color
 * tidy code
 * add docs
 * add ident to PATCHES

9 years agomerge: progress - show a visual progress bar
Richard Russon [Mon, 7 Mar 2016 04:41:38 +0000 (04:41 +0000)]
merge: progress - show a visual progress bar

 * feature: progress bar
 * tidy code
 * add docs
 * add ident to PATCHES

9 years agomerge: quasi-delete - mark emails to be hidden
Richard Russon [Mon, 7 Mar 2016 04:41:25 +0000 (04:41 +0000)]
merge: quasi-delete - mark emails to be hidden

 * feature: quasi-delete
 * tidy code
 * add docs
 * add ident to PATCHES

9 years agomerge: bug-fixes - various downstream bug fixes
Richard Russon [Mon, 7 Mar 2016 04:41:20 +0000 (04:41 +0000)]
merge: bug-fixes - various downstream bug fixes

 * add strndup.c strnlen.c
 * fix spelling typo
 * More careful file writing for aliases and attachments
 * Bye srandom() and random()
 * Remove TLS version notification
 * Use unlocked libc IO everywhere.
 * Add browser sort by description, message count and new message count
 * fix %* index_format
 * build fix for po package name
 * mute build warning

9 years agoadd ident to PATCHES
Richard Russon [Wed, 17 Feb 2016 04:30:13 +0000 (04:30 +0000)]
add ident to PATCHES

9 years agoadd docs
Richard Russon [Mon, 1 Feb 2016 16:59:11 +0000 (16:59 +0000)]
add docs

9 years agoadd ident to PATCHES
Richard Russon [Wed, 17 Feb 2016 04:30:17 +0000 (04:30 +0000)]
add ident to PATCHES

9 years agoadd docs
Richard Russon [Wed, 3 Feb 2016 17:33:27 +0000 (17:33 +0000)]
add docs

9 years agotidy code
Richard Russon [Wed, 17 Feb 2016 20:06:48 +0000 (20:06 +0000)]
tidy code

9 years agoadd ident to PATCHES
Richard Russon [Wed, 17 Feb 2016 05:19:06 +0000 (05:19 +0000)]
add ident to PATCHES

9 years agoadd docs
Richard Russon [Wed, 3 Feb 2016 17:33:27 +0000 (17:33 +0000)]
add docs

9 years agotidy code
Richard Russon [Wed, 17 Feb 2016 20:01:37 +0000 (20:01 +0000)]
tidy code

9 years agoadd ident to PATCHES
Richard Russon [Wed, 17 Feb 2016 04:30:16 +0000 (04:30 +0000)]
add ident to PATCHES

9 years agoadd docs
Richard Russon [Wed, 3 Feb 2016 17:33:27 +0000 (17:33 +0000)]
add docs

9 years agotidy code
Richard Russon [Wed, 17 Feb 2016 19:57:38 +0000 (19:57 +0000)]
tidy code

9 years agoadd ident to PATCHES
Richard Russon [Wed, 17 Feb 2016 04:30:15 +0000 (04:30 +0000)]
add ident to PATCHES

9 years agoadd docs
Richard Russon [Wed, 3 Feb 2016 17:33:27 +0000 (17:33 +0000)]
add docs

9 years agoadd ident to PATCHES
Richard Russon [Wed, 17 Feb 2016 04:30:14 +0000 (04:30 +0000)]
add ident to PATCHES

9 years agoadd docs
Richard Russon [Wed, 3 Feb 2016 17:33:27 +0000 (17:33 +0000)]
add docs

9 years agotidy code
Richard Russon [Wed, 17 Feb 2016 19:46:21 +0000 (19:46 +0000)]
tidy code

9 years agotidy code
Richard Russon [Wed, 17 Feb 2016 19:03:35 +0000 (19:03 +0000)]
tidy code

9 years agofeature: status-color
David Sterba [Sat, 30 Jan 2016 16:53:57 +0000 (16:53 +0000)]
feature: status-color

Custom rules for theming the status bar

9 years agofeature: quasi-delete
Karel Zak [Sat, 30 Jan 2016 16:27:19 +0000 (16:27 +0000)]
feature: quasi-delete

Mark emails that should be hidden, but not deleted

9 years agochange date comparisons
Eric Davis [Mon, 1 Feb 2016 16:55:29 +0000 (16:55 +0000)]
change date comparisons

now d = yesterday, w = last week, m = last month, y = last year, H =
last hour, etc from current time

9 years agofeature: progress bar
Stefan Kuhn [Sat, 30 Jan 2016 16:13:53 +0000 (16:13 +0000)]
feature: progress bar

Show a visual progress bar on slow operations

9 years agofix uncolor
Vladimir Marek [Tue, 8 Oct 2013 18:34:57 +0000 (11:34 -0700)]
fix uncolor

9 years agofix width calculation
Eric Davis [Sun, 31 Jan 2016 00:23:22 +0000 (00:23 +0000)]
fix width calculation

fixed right alignment on the index line the printed string width
computation did not account for special index coloring sequences

9 years agoadd handling index flags
Eric Davis [Sun, 31 Jan 2016 00:21:21 +0000 (00:21 +0000)]
add handling index flags

9 years agofeature: index-color
Christian Aichinger [Mon, 25 Jan 2016 17:02:57 +0000 (17:02 +0000)]
feature: index-color

Custom rules for theming the email index

9 years agotidy code
Richard Russon [Wed, 17 Feb 2016 19:54:01 +0000 (19:54 +0000)]
tidy code

9 years agouse nested angle brackets
David Champion [Mon, 1 Feb 2016 03:19:24 +0000 (03:19 +0000)]
use nested angle brackets

9 years agofeature: nested-if
David Champion [Mon, 1 Feb 2016 00:41:48 +0000 (00:41 +0000)]
feature: nested-if

Allow complex nested conditions in the index_format

9 years agofeature: conditional dates
Aaron Schrab [Mon, 1 Feb 2016 01:04:48 +0000 (01:04 +0000)]
feature: conditional dates

Use rules to choose date format

9 years agomute build warning
Richard Russon [Wed, 17 Feb 2016 20:41:53 +0000 (20:41 +0000)]
mute build warning

9 years agobuild fix for po package name
Richard Russon [Tue, 9 Feb 2016 19:12:14 +0000 (19:12 +0000)]
build fix for po package name

9 years agofix %* index_format
Karel Zak [Tue, 22 Oct 2013 18:34:57 +0000 (11:34 -0700)]
fix %* index_format

 * mutt_wstr_trunc() does not reset mbrtowc() after error

 * mutt_wstr_trunc() compare signed and unsigned numbers to check for
   maxlen and maxwid limits and does not care about unprintable chars

Addresses: https://github.com/karelzak/mutt-kz/issues/58
Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agoAdd browser sort by description, message count and new message count
Tim Stoakes [Sun, 16 Sep 2012 07:31:54 +0000 (09:31 +0200)]
Add browser sort by description, message count and new message count

Now the browser can sort by mail folder description, (all) message count, and
new message count.

9 years agoUse unlocked libc IO everywhere.
David Wilson [Tue, 22 Oct 2013 18:34:57 +0000 (11:34 -0700)]
Use unlocked libc IO everywhere.

Since mutt does not use threads, there is no reason it should use the
locked variants of the FILE* IO functions. This checks if the unlocked
functions are available, and if so enables them globally via mutt.h.

Cuts load time for a 56k message, 1.8GB /var/mail mailbox from 14
seconds to ~6 seconds, since we avoid acquiring and releasing a mutex
for every character of input read.

Before: 0m14.376s

    74.98%          mutt  libc-2.18.so        [.] _IO_getc
    11.87%          mutt  mutt                [.] mbox_parse_mailbox
     0.94%          mutt  [kernel.kallsyms]   [k] copy_user_generic_string
     0.83%          mutt  libc-2.18.so        [.] __strchr_sse2
     0.53%          mutt  libc-2.18.so        [.] __memcpy_sse2
     0.44%          mutt  libc-2.18.so        [.] _int_malloc

After: 6 seconds

    68.92%     mutt  mutt                  [.] mbox_parse_mailbox
     2.25%     mutt  [kernel.kallsyms]     [k] copy_user_generic_string
     1.73%     mutt  libc-2.18.so          [.] __strchr_sse2
     1.24%     mutt  libc-2.18.so          [.] __memcpy_sse2
     1.17%     mutt  libc-2.18.so          [.] _int_malloc
     0.87%     mutt  libc-2.18.so          [.] __strspn_sse42

9 years agoRemove TLS version notification
Mantas Mikulėnas [Fri, 18 Oct 2013 18:34:57 +0000 (11:34 -0700)]
Remove TLS version notification

The reason for this patch is that the "TLS connection" message adds an
unnecessary, annoying, unskippable delay to _every_ mutt startup.

(Almost as if its intention was to _discourage_ TLS usage...)

9 years agoBye srandom() and random()
Sami Farin [Wed, 16 Oct 2013 18:34:57 +0000 (11:34 -0700)]
Bye srandom() and random()

Prefer getrandom on Linux, use /dev/urandom otherwise to
get entropy for MIME boundaries, message-id, Maildir filename,
temporary filename.  Using MUTT_RANDTAG_LEN (currently 16) base32
characters for boundaries and message-id.

9 years agoMore careful file writing for aliases and attachments
Sami Farin [Wed, 16 Oct 2013 18:34:57 +0000 (11:34 -0700)]
More careful file writing for aliases and attachments

Use fsync and check for errors when appending to alias file,
saving attachments, and bouncing a message.  Still more checks are needed.
Also preserve errno if safe_fsync_close fails.

9 years agofix spelling typo
Víctor Manuel Jáquez Leal [Thu, 17 Oct 2013 18:34:57 +0000 (11:34 -0700)]
fix spelling typo

Change `dont` to `don't`.

This issue was detected by Debian QA packaging.

9 years agoadd strndup.c strnlen.c
Karel Zak [Thu, 6 Sep 2012 07:31:54 +0000 (09:31 +0200)]
add strndup.c strnlen.c

Reported-by: Vladimir.Marek@oracle.com
Signed-off-by: Karel Zak <kzak@redhat.com>
9 years agoautomatic post-release commit for mutt-1.5.24
Kevin McCarthy [Sun, 30 Aug 2015 17:26:17 +0000 (10:26 -0700)]
automatic post-release commit for mutt-1.5.24

9 years agoPartially updated Esperanto translation.
Benno Schulenberg [Sun, 30 Aug 2015 17:21:34 +0000 (10:21 -0700)]
Partially updated Esperanto translation.

9 years agoMinor translation fixes.
Benno Schulenberg [Sun, 30 Aug 2015 17:18:28 +0000 (10:18 -0700)]
Minor translation fixes.

This makes two equivalent translation messages the exact same so they
only need to be translated once.

It also adds a missing translation marker (for the same string).

This same string is used in recvcmd.c so does not generate a new
translation string.

9 years agoSet release date. Minor fixes to release notes.
Kevin McCarthy [Sun, 30 Aug 2015 17:08:23 +0000 (10:08 -0700)]
Set release date.  Minor fixes to release notes.

9 years agoUpdated Catalan translation.
Ivan Vilata i Balaguer [Sat, 29 Aug 2015 19:51:31 +0000 (12:51 -0700)]
Updated Catalan translation.

9 years agoUpdated Dutch translation.
Benno Schulenberg [Sat, 29 Aug 2015 19:40:55 +0000 (12:40 -0700)]
Updated Dutch translation.

9 years agoMinor translation fix.
Benno Schulenberg [Sat, 29 Aug 2015 14:40:28 +0000 (07:40 -0700)]
Minor translation fix.

This makes two equivalent translation messages the exact same so they
only need to be translated once.

9 years agoUpdated Japanese translation.
TAKAHASHI Tamotsu [Fri, 28 Aug 2015 14:35:21 +0000 (07:35 -0700)]
Updated Japanese translation.

9 years agoUpdated Russian translation.
Vsevolod Volkov [Thu, 20 Aug 2015 18:18:05 +0000 (11:18 -0700)]
Updated Russian translation.

9 years agoUpdated Czech translation
Petr Pisar [Wed, 19 Aug 2015 16:41:49 +0000 (09:41 -0700)]
Updated Czech translation

9 years agoAdd idn to MUTTLIBS instead of LIBS (see #3638)
Kevin McCarthy [Mon, 17 Aug 2015 21:51:07 +0000 (14:51 -0700)]
Add idn to MUTTLIBS instead of LIBS (see #3638)

Currently, -lidn is included while linking all the mutt binaries.  Add
it to MUTTLIBS instead so it's only used for the mutt linking.

Also, add $LIBICONV to $LIBS before checking for some of the idna
functions.  On some sytems, there are apparently issues when using
static linking. (Thanks to grarpamp for reporting).

9 years agoChange mutt_adv_mktemp to call mutt_mktemp instead of mktemp. (see #3638).
Kevin McCarthy [Mon, 17 Aug 2015 19:31:40 +0000 (12:31 -0700)]
Change mutt_adv_mktemp to call mutt_mktemp instead of mktemp. (see #3638).

mutt_mktemp is currently called in 95% of the cases in mutt, and
is already our "own rolled" version of mktemp.  The "insecure mktemp
warning" discussion keeps coming up, so instead add prefix and suffix
functionality to mutt_mktemp() and call that.

All other uses of Tempdir in the mutt source did not call
mutt_expand_path() first, so remove that from mutt_adv_mktemp().

9 years agoEnable C99 mode for compiler. (See #3638).
Kevin McCarthy [Mon, 17 Aug 2015 19:26:43 +0000 (12:26 -0700)]
Enable C99 mode for compiler.  (See #3638).

This is already the default for clang (FreeBSD) so shouldn't cause any
issues.

Enabling this will increase the allowed static string length and remove
the Copyright length warning.

9 years agoCompile txt2c using automake rules.
Kevin McCarthy [Tue, 11 Aug 2015 18:20:15 +0000 (11:20 -0700)]
Compile txt2c using automake rules.

The compilation rule used $< which isn't portable for ordinary make
rules.

9 years agoFix txt2c.sh sed invocations to use posix syntax.
David Champion [Tue, 11 Aug 2015 18:20:10 +0000 (11:20 -0700)]
Fix txt2c.sh sed invocations to use posix syntax.

9 years agoUpdated French translation.
Vincent Lefevre [Fri, 7 Aug 2015 01:38:48 +0000 (03:38 +0200)]
Updated French translation.

9 years agoMinor documentation fix.
Kevin McCarthy [Wed, 29 Jul 2015 16:26:19 +0000 (09:26 -0700)]
Minor documentation fix.

In one place, the documentation mentioned 'alternative-order' instead of
'alternative_order'.

9 years agoAdd error handling for ^ and other empty mailbox shortcuts.
Kevin McCarthy [Wed, 29 Jul 2015 16:07:51 +0000 (09:07 -0700)]
Add error handling for ^ and other empty mailbox shortcuts.

(closes #2402) (closes #3735)

Explicitly mention the ^ example in the documentation added in 6d733cab6b45.

Add an error message for ^ when CurrentFolder is not set.  Add checks
for other mailbox shortcuts that expand to the empty string.  This
could happen if the @alias shortcut was accidentally used, or the value
referenced by a shortcut isn't set yet.

9 years agoAdd "Mailbox Matching in Hooks" section to manual.
Kevin McCarthy [Mon, 27 Jul 2015 21:09:55 +0000 (14:09 -0700)]
Add "Mailbox Matching in Hooks" section to manual.

Folder-hook and mbox-hook perform mailbox shortcut expansion on the
regexp parameter.  Add a section to the manual to give examples and make
the behavior clearer.

9 years agoHandle malformed ms-exchange pgp-encrypted block. (closes #3742)
Kevin McCarthy [Sun, 26 Jul 2015 21:48:53 +0000 (14:48 -0700)]
Handle malformed ms-exchange pgp-encrypted block. (closes #3742)

In certain circumstances, Exchange corrupts a multipart/encrypted block
into:
  <multipart/mixed>
    <text/plain>
    <application/pgp-encrypted> [BASE64-encoded]
    <application/octet-stream> [BASE64-encoded]

This patch pulls the full detection of valid/invalid multiparts
into mutt_body_handler().  It extracts a run_decode_and_handler()
function, which is reused by new intermediate handlers to decode
the application/octet-stream part before passing it directly to
crypt_pgp_encrypted_handler.  These intermediate handlers then check
and set any GOODSIG flags back into the parent part.

This change may result in less error messages for invalid
multipart/encrypted parts.  Instead, mutt will default to the
multipart_handler if it isn't fully "correct".

Viewing attachments uses crypt_pgp_decrypt_mime() which bypasses the
handler mechanism.  Add decoding to the decrypt_mime() functions for pgp
and gpgme.

Thanks to Vincent Brillault for his analysis and initial patch.

10 years agoAdd support for checking cur/ in Maildir for unread mails in buffy.
Martin Sandsmark [Sat, 18 Jul 2015 16:40:32 +0000 (18:40 +0200)]
Add support for checking cur/ in Maildir for unread mails in buffy.

Also skip messages with the S flag when checking for unread mails.

10 years agoSet AUTOMAKE_OPTIONS in doc/Makefile.am. (closes #3766)
Kevin McCarthy [Fri, 24 Jul 2015 20:36:16 +0000 (13:36 -0700)]
Set AUTOMAKE_OPTIONS in doc/Makefile.am. (closes #3766)

Add the "foreign" option to silence warnings generated by flymake.am.

10 years agoUpdate the UPDATING file with changes since 1.5.23.
Kevin McCarthy [Fri, 24 Jul 2015 20:15:23 +0000 (13:15 -0700)]
Update the UPDATING file with changes since 1.5.23.

10 years agoFix compiler type warnings. (closes #3765)
Kevin McCarthy [Thu, 23 Jul 2015 21:57:04 +0000 (14:57 -0700)]
Fix compiler type warnings. (closes #3765)

The output of mutt_local_tz() was being passed to abs().  Technically
the return type is time_t, but it represents a small value: the timezone
offset in seconds.  Add a safe explicit cast to int.

Change the txt parameter of mutt_make_help() to type const char *.
Typically all calls run the txt parameter through _(), which
accepts const char * and returns a char *. However, if NLS is not
enabled, _() is a noop, simply returning the parameter itself.  In
mutt_compile_help(), items[i].name is const char *, so it will generate
a warning when passed as the txt parameter of mutt_make_help().

On some systems, e.g. OS X, snprintf is defined as a macro.  One call
in hcache.c was embedding directives inside the snprintf call.  This is
apparently undefined behavior, so duplicate the call instead.

10 years agoFix a few small compiler warnings. (See #3638)
Kevin McCarthy [Thu, 23 Jul 2015 02:23:12 +0000 (19:23 -0700)]
Fix a few small compiler warnings.  (See #3638)

In certain configurations, unused variables and labels were causing
warnings.

Add a missing "#include <netinet/in.h>" to pop_lib.c.

10 years agomerge stable
Kevin McCarthy [Tue, 21 Jul 2015 19:41:13 +0000 (12:41 -0700)]
merge stable

10 years agoImap: Fix flag caching after sync.
Kevin McCarthy [Tue, 21 Jul 2015 19:34:49 +0000 (12:34 -0700)]
Imap: Fix flag caching after sync.

The flags cached in IMAP_HEADER_DATA were not updated to match the
HEADER flags after a sync.  This means if a flag were toggled and synced
twice, the second sync was not sending the flag update.

Thanks to Noah Misch for the patch.

10 years agoAdd note about gpg fixed-list-mode. (closes #3763).
Kevin McCarthy [Sun, 19 Jul 2015 22:55:51 +0000 (15:55 -0700)]
Add note about gpg fixed-list-mode.  (closes #3763).

Thanks to Gregor Zattler for the original patch.

10 years agoFix batch mode lockup. (closes #3761) (closes #3760)
Kevin McCarthy [Sat, 11 Jul 2015 21:36:51 +0000 (14:36 -0700)]
Fix batch mode lockup.  (closes #3761) (closes #3760)

The new TS capability check was also running when curses wasn't
initialized.  Move check inside the !OPTNOCURSES block.

10 years agoUse $(VAR) instead of @VAR@ in Makefile.am files. (closes #3664)
Kevin McCarthy [Thu, 9 Jul 2015 21:50:05 +0000 (14:50 -0700)]
Use $(VAR) instead of @VAR@ in Makefile.am files.  (closes #3664)

The @VAR@ form is not overridable, such as the case for #3664 where the
reporter wanted to override DOTLOCK_GROUP.

It's doubtful targets need to be overriden, but it makes sense to be
consistent in the usage of automake substituted variables unless there
is a particular reason/bug to work around.

10 years agoRemove 'hit enter' prompt for GPGME initialization errors.
Kevin McCarthy [Sun, 5 Jul 2015 20:38:39 +0000 (13:38 -0700)]
Remove 'hit enter' prompt for GPGME initialization errors.

Older GPGMEs are missing CMS (S/MIME) support.  Don't force the poor
users to hit enter every time they start mutt.

10 years agoRemove the automake mkinstalldirs script.
Kevin McCarthy [Thu, 2 Jul 2015 18:21:22 +0000 (11:21 -0700)]
Remove the automake mkinstalldirs script.

Add to .hgignore so it doesn't accidentally get added again.

10 years agoConvert from using mkinstalldirs to $(MKDIR_P).
Kevin McCarthy [Thu, 2 Jul 2015 18:21:19 +0000 (11:21 -0700)]
Convert from using mkinstalldirs to $(MKDIR_P).

The automake mkinstalldirs script is now deprecated. "install-sh -d"
can be used in place.  Configure.ac already includes AC_PROG_INSTALL,
which will ensure install-sh is bundled.  Add AC_PROG_MKDIR_P, which
will set $(MKDIR_P) to either a thread-safe "mkdir -p" or will fall back
to using install-sh.

10 years agoFix build-release to always update automake tools. (closes #3671)
Kevin McCarthy [Thu, 2 Jul 2015 18:18:42 +0000 (11:18 -0700)]
Fix build-release to always update automake tools. (closes #3671)

1.5.22 and 1.5.23 include a version of "missing" older than the version
of automake/aclocal used to generate configure.

Fix the build-release script to always copy and force update of the
automake tools.

10 years agoAdd note to manual clarifying push/exec and folder-hook order.
Kevin McCarthy [Mon, 29 Jun 2015 21:35:28 +0000 (14:35 -0700)]
Add note to manual clarifying push/exec and folder-hook order.

Folder-hooks are executed in the order declared.  However, push/exec
commands will simply prepend to the keyboard buffer.  If there are
multiple push/exec commands, each will prepend to the earlier one.  The
result is that they will end up being "run" in reverse order once keyboard
buffer processing starts.

10 years agoFix IMAP segfault due to NULL capstr.
Kevin McCarthy [Fri, 26 Jun 2015 19:23:26 +0000 (12:23 -0700)]
Fix IMAP segfault due to NULL capstr.

After a failed login, the connection is left open but capstr is freed.
If a second login attempt is made, imap_auth_sasl was trying to strstr
using the NULL capstr.

Add a NONULL around the capstr parameter to strstr.  Change
imap_conn_find() to keep the capstr around until a successful
authentication occurs.

10 years agoAdd comment about "(f)orget it" choice in pgp/smime send menus.
Kevin McCarthy [Fri, 26 Jun 2015 18:38:16 +0000 (11:38 -0700)]
Add comment about "(f)orget it" choice in pgp/smime send menus.

10 years agoUpdated French translation.
Vincent Lefevre [Fri, 26 Jun 2015 10:28:45 +0000 (12:28 +0200)]
Updated French translation.

10 years agoRewrite S/MIME key searching. Add purpose checking.
Kevin McCarthy [Sun, 7 Jun 2015 20:59:32 +0000 (13:59 -0700)]
Rewrite S/MIME key searching.  Add purpose checking.

Model the smime.c searching off of classic pgp searching.  Create
smime_get_key_by_hash()/addr()/str() functions that use a single
smime_get_candidates() function to search the index.

Use the new smime_keys generated purpose flag in the index to filter by
KEYFLAG_CANENCRYPT and KEYFLAG_CANSIGN.  Old style indices fall back to
all-inclusive behavior.

10 years agosmime_keys: Add refresh command.
Kevin McCarthy [Sun, 7 Jun 2015 20:59:23 +0000 (13:59 -0700)]
smime_keys: Add refresh command.

Refresh verifies the trust of each certificate and adds the purpose flag
if it is missing.  It pushes those values to the private keys' index
file too.

10 years agosmime_keys: Add purpose flag to index.
Kevin McCarthy [Sun, 7 Jun 2015 20:59:19 +0000 (13:59 -0700)]
smime_keys: Add purpose flag to index.

A subsequent patch will change smime.c to use the purpose to filter
certs and keys that can't be used for signing or encryption.

Issuer, trust, and purpose flags were also added to the keys index file,
to keep parsing simpler in smime_keys as well as smime.c.  The trust and
purpose are derived from the cert.  Issuer is set to '?' as this should
never be needed for keys.

10 years agosmime_keys: Handle certificate chains in add_cert. (closes #3339) (closes #3559)
Kevin McCarthy [Mon, 25 May 2015 17:59:50 +0000 (10:59 -0700)]
smime_keys: Handle certificate chains in add_cert. (closes #3339) (closes #3559)

Find all chains in the certificate provided.  For each chain create a
separate leaf and intermediate certificate file.  Because Mutt controls
the label prompt, use a single label for all chains.

Also, loosen up cert file parsing to allow attributes even if they
aren't delimited by a "Bag Attributes" header.

Thanks to David J. Weller-Fahy for his testing and feedback!

10 years agosmime_keys: Convert openssl execution to use open("-|",...). (see #3575) (see #2456)
Kevin McCarthy [Mon, 18 May 2015 20:27:12 +0000 (13:27 -0700)]
smime_keys: Convert openssl execution to use open("-|",...). (see #3575) (see #2456)

This does a fork/exec, bypassing the shell, and so handles
spaces, quotes, and other shell-characters problems better than the
simple fix in changeset:c66a6bd5d0d5

This also fixes the "verify with crl" bug in #2456: the grep is now done
in perl.

Thank you Vincent Lefevre for your review and feedback!

10 years agoUpdated French translation (related to PGP & S/MIME, with corrections).
Vincent Lefevre [Mon, 18 May 2015 01:25:09 +0000 (03:25 +0200)]
Updated French translation (related to PGP & S/MIME, with corrections).

10 years agosmime_keys: quote filenames. (closes #3575) (see #2456)
Kevin McCarthy [Fri, 15 May 2015 21:09:54 +0000 (14:09 -0700)]
smime_keys: quote filenames. (closes #3575) (see #2456)

Wrap the various filename parameters in single quotes in case there are
spaces in the filename.

10 years agoStart cleaning up and fixing smime_keys.pl (closes #3324) (see #2456)
Kevin McCarthy [Fri, 15 May 2015 17:47:38 +0000 (10:47 -0700)]
Start cleaning up and fixing smime_keys.pl (closes #3324) (see #2456)

* Convert to using File::Temp (#3324).  This was also suggested at
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775199

* Use File::Temp for add_p12 temp file. (#2456)

* Make the query_label() method a bit more robust with empty strings,
  ctrl-d, and leading spaces.

* Clean up openssl_do_verify() logic.  Mark cert as invalid
  rather that die'ing if an openssl verify command fails.

* General cleanup:
  - Clearly separate op handler, certificate management, and helper
    functions by section and using prefixes.
  - Create openssl helper functions to reduce copy/paste invocations
    and make the code clearer.
  - Make indentation consistent at 2 spaces.
  - Change handle_add_pem() to re-use handle_add_chain() once the
    correct files are identified.
  - Change openssl_parse_pem() to return a single array of data
    structures representing the parsed certs/keys.

10 years agoProvide SSL cipher selection option. (closes #3167)
Kevin McCarthy [Sun, 3 May 2015 23:25:45 +0000 (16:25 -0700)]
Provide SSL cipher selection option. (closes #3167)

Creates a $ssl_ciphers option that allows direct selection of the
ciphers for OpenSSL (via SSL_CTX_set_cipher_list) and GnuTLS (via
gnutls_priority_set_direct).

Thank you Sergio Gelato for the patch.

10 years agoFix performance regression for ~b/~B searching. (closes #3743)
Seth Forshee [Sun, 26 Apr 2015 02:00:13 +0000 (19:00 -0700)]
Fix performance regression for ~b/~B searching. (closes #3743)

In mutt_is_autoview(), changeset b58cdfacfb89 introduced a call to
rfc1524_mailcap_lookup() before checking if the MIME type should
be autoviewed based on the user's preferences. This caused a major
performance regression for ~b/~B searching.

Rearrange mutt_is_autoview() to check the user preferences first, then
search for a mailcap entry only if the MIME type should be autoviewed.

In order to preserve correct mime_lookup behavior, re-add a call to
mutt_check_lookup_list() before scanning the AutoViewList.

10 years agoAdd $crypt_confirmhook option. (see #3727)
Kevin McCarthy [Sun, 19 Apr 2015 20:15:50 +0000 (13:15 -0700)]
Add $crypt_confirmhook option. (see #3727)

Allow the confirmation prompt for crypt-hooks to be disabled.  This is
useful for multiple crypt-hook users (e.g. encrypted mailing lists), or
just for people who are certain of their crypt-hooks and don't want to
be prompted every time.

Thanks to Dale Woolridge for the original patch.

10 years agoAllow multiple crypt-hooks with the same regexp. (closes #3727).
Kevin McCarthy [Sun, 19 Apr 2015 20:15:48 +0000 (13:15 -0700)]
Allow multiple crypt-hooks with the same regexp. (closes #3727).

Changes the crypt-hook to accumulate a LIST of hooks with
the same regexp, as opposed to replacing the hook data.
This is useful for the case of encrypted mailing lists.

Update pgp classic and gpgme to process a LIST of crypt-hook
values instead of just one.

This version of the patch creates a new _mutt_list_hook() function that
(in theory) other hooks could use if they were changed to return a list.
It also changes the behavior when a crypt-hook is declined: previously
it would immediately use the original recipient for key selection.  Now
it will only do that if all crypt-hooks for a recipient are declined.
This allows all, a subset, or none of the hooks to be used.

Thanks to Rejo Zenger, Remco Rijnders, and Dale Woolridge for their work
on various versions of this patch.

10 years agoFix a few more incorrect documentation lines for hooks.
Kevin McCarthy [Thu, 16 Apr 2015 02:25:46 +0000 (19:25 -0700)]
Fix a few more incorrect documentation lines for hooks.

Hopefully this finishes up aac979f8b529 and ca5aff2a4b6e.

10 years agoUse fingerprints instead of keyIDs internally. (see #3695)
Kevin McCarthy [Thu, 16 Apr 2015 01:57:17 +0000 (18:57 -0700)]
Use fingerprints instead of keyIDs internally. (see #3695)

Add a helper function, pgp_fpr_or_lkeyid(), that returns the fingerprint
if available, otherwise falls back to the long key id.  Convert Mutt to
use that value for pgp command invocation.

Change gpgme to use an equivalent crypt_fpr_or_lkeyid() function in a
couple places too (for keylist generation and sign-as key selection).

Update documentation to mention fingerprints and the --with-fingerprint
option for gpg invocation.

Change pgp_long_ids to default: yes, but add a note mentioning
it's only used for the display of key IDs in a few places.

10 years agoAllow attachments from unencrypted emails to be deleted.
Kevin McCarthy [Thu, 12 Mar 2015 21:48:48 +0000 (14:48 -0700)]
Allow attachments from unencrypted emails to be deleted.

Print a warning if the message is signed or partly signed.

Thanks to David Haguenauer for the original patch!

10 years agoClarify hook pattern vs regexp in muttrc.man page.
Kevin McCarthy [Tue, 7 Apr 2015 01:39:09 +0000 (18:39 -0700)]
Clarify hook pattern vs regexp in muttrc.man page.

Updates to the muttrc.man page were inadvertently not included in
changeset:aac979f8b529.  Fix mbox-hook and crypt-hook to show
they accept a regexp, not a pattern.