The first oppenc call takes place after the initial checks of
$pgp_autoline and $pgp_replyinline, and doesn't go through the pgp
menu.
Therefore, check for $pgp_autoline and $pgp_replyinline if oppenc is
set too, to avoid oppenc enabling encryption without INLINE being set
in those cases.
a6a4d6ed0f19 previously cleaned things up so that it is safe
to set INLINE even if encryption isn't enabled.
msg->security |= SIGN;
if (option (OPTCRYPTREPLYSIGNENCRYPTED) && cur && (cur->security & ENCRYPT))
msg->security |= SIGN;
- if (WithCrypto & APPLICATION_PGP && (msg->security & (ENCRYPT | SIGN)))
+ if ((WithCrypto & APPLICATION_PGP) &&
+ ((msg->security & (ENCRYPT | SIGN)) || option (OPTCRYPTOPPORTUNISTICENCRYPT)))
{
if (option (OPTPGPAUTOINLINE))
msg->security |= INLINE;