X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=crypt.cpkg;h=f482cdb92f2d52039902499213463bd3046bdbb7;hp=1350166f147b793188f66670f8c3ec6318d538db;hb=b10940c18a5b0c8276d308b0601efac585d33966;hpb=1951199b744b2104bf7fe60effe5dd0f455aee9c diff --git a/crypt.cpkg b/crypt.cpkg index 1350166..f482cdb 100644 --- a/crypt.cpkg +++ b/crypt.cpkg @@ -98,6 +98,19 @@ ** to find out whether an encrypted message is also signed. ** (Crypto only) */ + bool smime_is_default = 0; + /* + ** .pp + ** The default behaviour of Madmutt is to use PGP on all auto-sign/encryption + ** operations. To override and to use OpenSSL instead this must be \fIset\fP. + ** .pp + ** However, this has no effect while replying, since Madmutt will automatically + ** select the same application that was used to sign/encrypt the original + ** message. + ** .pp + ** (Note that this variable can be overridden by unsetting $$crypt_autosmime.) + ** (S/MIME only) + */ quadopt_t verify_sig = M_YES; /* ** .pp @@ -106,6 +119,28 @@ ** If ``\fIno\fP'', never attempt to verify cryptographic signatures. ** (Crypto only) */ + + string_t pgp_entry_format = m_strdup("%4n %t%f %4l/0x%k %-4a %2c %u"); + /* + ** .pp + ** This variable allows you to customize the PGP key selection menu to + ** your personal taste. This string is similar to ``$$index_format'', but + ** has its own set of \fTprintf(3)\fP-like sequences: + ** .pp + ** .dl + ** .dt %n .dd number + ** .dt %k .dd key id + ** .dt %u .dd user id + ** .dt %a .dd algorithm + ** .dt %l .dd key length + ** .dt %f .dd flags + ** .dt %c .dd capabilities + ** .dt %t .dd trust/validity of the key-uid association + ** .dt %[] .dd date of the key where is an \fTstrftime(3)\fP expression + ** .de + ** .pp + ** (PGP only) + */ }; /* Values used for comparing addresses. */ @@ -162,7 +197,7 @@ static void convert_to_7bit (BODY * a) if (a->type == TYPEMULTIPART) { a->encoding = ENC7BIT; convert_to_7bit(a->parts); - } else if (a->type == TYPEMESSAGE && tok == MIME_DELIVERY_STATUS) { + } else if (a->type == TYPEMESSAGE && tok != MIME_DELIVERY_STATUS) { if (a->encoding != ENC7BIT) mutt_message_to_7bit(a, NULL); } else if (a->encoding == ENC8BIT) { @@ -655,7 +690,7 @@ static void print_time(time_t t, STATE *s) char p[STRING]; setlocale(LC_TIME, ""); -#ifdef HAVE_LANGINFO_D_T_FMT +#ifdef D_T_FMT strftime(p, sizeof(p), nl_langinfo(D_T_FMT), localtime(&t)); #else strftime(p, sizeof(p), "%c", localtime(&t)); @@ -2234,8 +2269,8 @@ static void crypt_entry (char *s, ssize_t l, MUTTMENU * menu, int num) entry.key = cryptkey_table[num]; entry.num = num + 1; - m_strformat(s, l, COLS - SW, PgpEntryFormat, crypt_entry_fmt, &entry, - option(OPTARROWCURSOR) ? M_FORMAT_ARROWCURSOR : 0); + m_strformat(s, l, COLS - SW, mod_crypt.pgp_entry_format, crypt_entry_fmt, + &entry, option(OPTARROWCURSOR) ? M_FORMAT_ARROWCURSOR : 0); } /* Compare two addresses and the keyid to be used for sorting. */ @@ -2645,7 +2680,7 @@ static void print_key_info (gpgme_key_t key, FILE * fp) tt = key->subkeys->timestamp; tm = localtime (&tt); -#ifdef HAVE_LANGINFO_D_T_FMT +#ifdef D_T_FMT strftime (shortbuf, sizeof shortbuf, nl_langinfo (D_T_FMT), tm); #else strftime (shortbuf, sizeof shortbuf, "%c", tm); @@ -2657,7 +2692,7 @@ static void print_key_info (gpgme_key_t key, FILE * fp) tt = key->subkeys->expires; tm = localtime (&tt); -#ifdef HAVE_LANGINFO_D_T_FMT +#ifdef D_T_FMT strftime (shortbuf, sizeof shortbuf, nl_langinfo (D_T_FMT), tm); #else strftime (shortbuf, sizeof shortbuf, "%c", tm); @@ -2768,7 +2803,7 @@ static void print_key_info (gpgme_key_t key, FILE * fp) tt = subkey->timestamp; tm = localtime (&tt); -#ifdef HAVE_LANGINFO_D_T_FMT +#ifdef D_T_FMT strftime (shortbuf, sizeof shortbuf, nl_langinfo (D_T_FMT), tm); #else strftime (shortbuf, sizeof shortbuf, "%c", tm); @@ -2780,7 +2815,7 @@ static void print_key_info (gpgme_key_t key, FILE * fp) tt = subkey->expires; tm = localtime (&tt); -#ifdef HAVE_LANGINFO_D_T_FMT +#ifdef D_T_FMT strftime (shortbuf, sizeof shortbuf, nl_langinfo (D_T_FMT), tm); #else strftime (shortbuf, sizeof shortbuf, "%c", tm);