1. 02 Jul, 2018 2 commits
  2. 18 Jun, 2018 1 commit
    • Eike Rathke's avatar
      Allow larger passphrase timeout values · 4bc76c2f
      Eike Rathke authored
      This came up in the comp.mail.mutt newsgroup where a user wasn't
      satisfied with the SHORT_MAX seconds ~9 hours limit on passphrase
      timeouts.
      
      For the first time made it necessary for the options parser to be
      able to parse numbers as long values. Also, introduced
      mutt_add_timeout() to detect possible overflow before adding a
      timeout to a time_t value and truncate to TIME_T_MAX instead.
      4bc76c2f
  3. 11 Jan, 2018 1 commit
    • Kevin J. McCarthy's avatar
      Create pgp and s/mime default and sign_as key vars. (see #3983) · db252e61
      Kevin J. McCarthy authored
      The $postpone_encrypt and $(pgp/smime)_self_encrypt configuration
      variables have created a somewhat messier situation for users.  Many
      of them now have to specify their keys across multiple configuration
      variables.
      
      (Trac) Ticket #3983 had a reasonable request: "if my encrypt and
      signing keys are the same, why can't I just specify my key once in my
      .muttrc?"
      
      The problem currently is that $smime_default_key and $pgp_sign_as are
      both used to specify signing keys, and are set by the "sign (a)s"
      security menu choice.  So we can't store encryption keys there because
      some users have separate sign-only capability keys.
      
      Create $pgp_default_key to store the default encryption key.  Change
      signing to use $pgp_default_key, unless overridden by $pgp_sign_as.
      The pgp "sign (a)s" will continue setting $pgp_sign_as.
      
      Create $smime_sign_as.  Change signing to use $smime_default_key
      unless overridden by $smime_sign_as.  Change s/mime "sign (a)s" menu
      to set $smime_sign_as instead.
      
      Change $postpone_encrypt and $(pgp/smime)_self_encrypt to use
      $(pgp/smime)_default_key by default.
      
      Mark $(pgp/smime)_self_encrypt_as deprecated.  They are now aliases
      for the $(pgp/smime)_default_key config vars.
      
      Change $(pgp/smime)_self_encrypt default to set.
      
      The intent is that most users now need only set
      $(pgp/smime)_default_key.  If they have a sign-only key, or have
      separate signing and encryption keys, they can put that in
      $(pgp/smime)_sign_as.  This also enables to default self_encrypt on
      and solve a very common request.
      
      Thanks to Michele Marcionelli and Vincent Lefèvre for gently pushing
      me towards a solution.
      db252e61
  4. 15 Dec, 2017 1 commit
    • Kevin J. McCarthy's avatar
      Fix s/mime certificate deletion bug. (closes #3982) · 9eedfd4e
      Kevin J. McCarthy authored
      Commit c1bcf4ba exposed a bug in the s/mime encryption code.  It was
      errorneously calling unlink on the list of generated cert files to
      use.
      
      Prior to that commit, the list had an initial space, which apparently
      made the unlink fail.  After that commit, encrypting to a single
      certificate would end up deleting the certificate.
      
      Remove the calls to unlink the cert file.  Add some missing cleanup if
      the call to openssl fails.
      9eedfd4e
  5. 29 May, 2017 1 commit
  6. 27 Mar, 2017 3 commits
  7. 18 Nov, 2016 1 commit
  8. 09 May, 2016 1 commit
    • Derek Martin's avatar
      Change M_* symbols to MUTT_* · 9cafb05c
      Derek Martin authored
      Changeset 23334e967dd7 created a workaround for a namespace conflict
      with Solaris and derivatives.  After some discussion, the team decided
      it would be best to move away from using the "M_" prefix for macros.
      
      This patch was automatically generated by running:
        perl -wpi -e 's/\bM_(\w+)\b/MUTT_$1/g' `find . -name '*.[ch]' -print`
      with the exception that sys_socket.h was exempted.  (That file will
      be backed out subsequent to this commit.)
      
      Thanks to Andras Salamon for supplying the perl script used to make
      this change.
      9cafb05c
  9. 28 Apr, 2016 1 commit
    • Kevin J. McCarthy's avatar
      Add cols parameter to mutt_FormatString() · c9223a12
      Kevin J. McCarthy authored
      Continuing with the conversion to using windows for screen drawing,
      mutt_FormatString() was directly using COLS for right justification
      and similar formatting.  Instead pass in a parameter, cols.
      
      This change involved seeding the parameter through callback functions
      too, as many of them call mutt_FormatString() back.
      c9223a12
  10. 06 Jan, 2016 1 commit
    • Kevin J. McCarthy's avatar
      Allow tab as a delimiter in smime .index files. (closes #3802) · f450da42
      Kevin J. McCarthy authored
      The old parsing code used fscanf, and so happened to allow a tab as a
      delimiter.  Even though smime_keys.pl uses a space, some users
      maintain their own .index files by hand (using tab delimiters), so
      continue to allow that delimiter.
      
      Thanks to Andre for the bug report and patch.
      f450da42
  11. 01 Jan, 2016 1 commit
  12. 30 Nov, 2015 1 commit
    • Kevin J. McCarthy's avatar
      smime: allow signing message digest algorithm to be specified. · dc8373ad
      Kevin J. McCarthy authored
      Currently, Mutt hardcodes micalg=sha1 for signed messages.
      Unfortunately, the actual message digest algorithm used defaults to
      the value in the "Signature Algorithm" field in the signing key's
      certificate.
      
      Add a new configuration option $smime_sign_digest_alg, defaulting
      to sha256.  Add a new printf format string, %d, to be used in the
      signing command to specify the digest algorithm.  Modify the sample
      $smime_sign_command to include "-md %d".
      
      Note: This solution requires using the modified $smime_sign_command,
      or else the micalg parameter again may not match the algorithm used.
      An alternative solution would be to query the certificate "Signature
      Algorithm" field and try to change the micalg to match it, but this
      method is easier to implement and provides better control for the user
      to configure, in any case.
      dc8373ad
  13. 30 Sep, 2015 2 commits
    • Kevin J. McCarthy's avatar
      Fix chomp in smime_handle_cert_email. · 942a9dec
      Kevin J. McCarthy authored
      During a review of the previous patch, Oswald Buddenhagen noticed two
      of the fixed oob reads had another problem: they were "chomping" (the
      newline) without verifying there actually was a newline at the end of
      the string.
      942a9dec
    • Kevin J. McCarthy's avatar
      Fix oob reads when fgets returns "\0". (closes #3776) · d0167478
      Kevin J. McCarthy authored
      The ticket reported an out of bounds read in mutt_read_rfc822_line()
      when a '\0' was embedded on its own line in the headers.  The function
      assumed if fgets() didn't return NULL, then the string would have at
      least one character.
      
      I scanned the rest of the code and found three other places making the
      same assumption for fgets.
      
      Thanks to hanno for finding this with the "american fuzzy lop" tool.
      d0167478
  14. 13 Sep, 2015 1 commit
  15. 29 Aug, 2015 1 commit
  16. 26 Jun, 2015 1 commit
  17. 07 Jun, 2015 1 commit
    • Kevin J. McCarthy's avatar
      Rewrite S/MIME key searching. Add purpose checking. · 135622ee
      Kevin J. McCarthy authored
      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.
      135622ee
  18. 30 Mar, 2015 4 commits
    • Kevin J. McCarthy's avatar
      Add ui elements for oppenc mode. · bb94df57
      Kevin J. McCarthy authored
      Add a status message to the Security line when oppenc is enabled.
      
      For each send menu, add the ability to toggle it on or off.
      When enabled, the menus won't show the (e)ncrypt or (b)oth options,
      and the (c)lear function only clears the SIGN bit when it is active.
      
      Change the gpgme_send_menu() to directly use the ENCRYPT and SIGN
      flags instead of the PGPENCRYPT/SIGN and SMIMEENCRYPT/SMIME flags.
      Using the latter sometimes resulted in the APPLICATION bit unset, which made
      oppenc unhappy.
      
      The send_menus previously used a switch statement using choice numbers.
      Since the menus now vary based on the oppenc option and message bit
      being set, these were all changed to convert the numbers back to a
      choice letter.
      bb94df57
    • Kevin J. McCarthy's avatar
      Implement oppenc_mode in the find_keys methods. · 0fd24e8b
      Kevin J. McCarthy authored
      oppenc_mode is used by crypt_opportunistic_encrypt to determine whether
      there are valid keys for all recipients of a message, without prompting
      the user.
      
      The patch wraps around prompts, and makes getkeybyaddr methods return a
      valid address-matching key without prompting.
      
      The patch also fixes a small problem with gpgme's getkeybyaddr.  When
      determining if there were multiple strong matches, it was comparing the
      crypt_key_t instead of its kobj member (gpgme_key_t).
      
      The patch also enables a call to crypt_is_numerical_keyid() in
      find_keys(), so that crypt-hooks can actually be checked without
      prompting when gpgme is enabled.  (The addition was patterned off of the
      pgp_findKeys() function).
      0fd24e8b
    • Kevin J. McCarthy's avatar
      Introduce an oppenc_mode parameter · 4615a829
      Kevin J. McCarthy authored
      It's added to the parameter lists through the call stack down to the
      find_keys calls.
      
      No functionality is implemented yet.  This patch is separated just to
      keep other patches more readable.
      4615a829
    • Kevin J. McCarthy's avatar
      Refactor the address list generation out of the find_keys routines. · ecbba07c
      Kevin J. McCarthy authored
      All four find_keys routines have a similar set up code for generating a
      single address list out of the to, cc, bcc lists.  This patch pulls all
      the code into crypt_get_keys.
      
      This is done to simplify the functions before later patches make them
      more complicated (with the oppenc_mode parameter).
      ecbba07c
  19. 02 Sep, 2015 1 commit
  20. 06 Oct, 2013 1 commit
  21. 23 Jul, 2013 1 commit
  22. 11 Apr, 2013 1 commit
  23. 10 Apr, 2013 1 commit
  24. 22 Feb, 2013 1 commit
  25. 23 May, 2011 1 commit
  26. 12 Sep, 2010 1 commit
  27. 21 Jun, 2009 1 commit
  28. 29 May, 2009 1 commit
  29. 13 May, 2009 1 commit
  30. 18 Mar, 2009 1 commit
  31. 15 Mar, 2009 1 commit
  32. 16 Dec, 2008 1 commit
  33. 30 Nov, 2008 1 commit
    • Rocco Rutte's avatar
      Manage last search pattern outside of menu lifecycle · 30541be3
      Rocco Rutte authored
      Previously, the pattern was thrown away during menu destruction.
      For the next search, mutt then can't provide a good suggestion.
      The new behaviour is to manage the pattern outside the lifecyle
      to always provide the last pattern as suggestion.
      30541be3