** 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
** 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 %[<s>] .dd date of the key where <s> is an \fTstrftime(3)\fP expression
+ ** .de
+ ** .pp
+ ** (PGP only)
+ */
};
/* Values used for comparing addresses. */
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. */
/*-- formerly in pgp.h --*/
WHERE char *PgpSignAs;
-WHERE char *PgpEntryFormat;
/*-- formerly in smime.h --*/
WHERE char *SmimeDefaultKey;
** when you are at the end of a message and invoke the \fInext-page\fP
** function.
*/
- {"smime_is_default", DT_BOOL, R_NONE, OPTSMIMEISDEFAULT, "no" },
- /*
- ** .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)
- */
- {"pgp_entry_format", DT_STR, R_NONE, UL &PgpEntryFormat, "%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 %[<s>] .dd date of the key where <s> is an \fTstrftime(3)\fP expression
- ** .de
- ** .pp
- ** (PGP only)
- */
{"pgp_retainable_sigs", DT_BOOL, R_NONE, OPTPGPRETAINABLESIG, "no" },
/*
** .pp
## min_dh_prime_bits
## no
## operating_system
+## pgp_entry_format
## quit
## record
## replyencrypt
## shell
## shorthost
## signature
+## smime_is_default
## spam_separator
## starttls
## sysconfdir
/* PGP options */
- OPTSMIMEISDEFAULT,
OPTPGPAUTODEC,
OPTPGPRETAINABLESIG,
OPTFORWDECRYPT,
/* Theoretically, both could be set. Take the one the user wants to set by default. */
if ((newhdr->security & APPLICATION_PGP)
&& (newhdr->security & APPLICATION_SMIME)) {
- if (option (OPTSMIMEISDEFAULT))
+ if (mod_crypt.smime_is_default)
newhdr->security &= ~APPLICATION_PGP;
else
newhdr->security &= ~APPLICATION_SMIME;
* for the decision.
*/
if (!(msg->security & (APPLICATION_SMIME | APPLICATION_PGP))) {
- if (mod_crypt.autosmime && option(OPTSMIMEISDEFAULT))
+ if (mod_crypt.autosmime && mod_crypt.smime_is_default)
msg->security |= APPLICATION_SMIME;
else if (mod_crypt.autopgp)
msg->security |= APPLICATION_PGP;