{
ADDRESS *adrlist = NULL, *last = NULL;
const char *fqdn = mutt_fqdn (1);
+ char *self_encrypt = NULL;
+ size_t keylist_size;
/* Do a quick check to make sure that we can find all of the encryption
* keys if the user has requested this service.
return (-1);
}
unset_option (OPTPGPCHECKTRUST);
+ if (option (OPTPGPSELFENCRYPT))
+ self_encrypt = PgpSelfEncryptAs;
}
if ((WithCrypto & APPLICATION_SMIME)
&& (msg->security & APPLICATION_SMIME))
rfc822_free_address (&adrlist);
return (-1);
}
+ if (option (OPTSMIMESELFENCRYPT))
+ self_encrypt = SmimeSelfEncryptAs;
}
}
+ if (!oppenc_mode && self_encrypt && *self_encrypt)
+ {
+ keylist_size = mutt_strlen (*keylist);
+ safe_realloc (keylist, keylist_size + mutt_strlen (self_encrypt) + 2);
+ sprintf (*keylist + keylist_size, " %s", self_encrypt); /* __SPRINTF_CHECKED__ */
+ }
+
rfc822_free_address (&adrlist);
return (0);
WHERE char *PgpListSecringCommand;
WHERE char *PgpListPubringCommand;
WHERE char *PgpGetkeysCommand;
+WHERE char *PgpSelfEncryptAs;
/*-- formerly in smime.h --*/
WHERE char *SmimeDefaultKey;
WHERE char *SmimeGetCertCommand;
WHERE char *SmimeImportCertCommand;
WHERE char *SmimeGetCertEmailCommand;
+WHERE char *SmimeSelfEncryptAs;
** removed, while the inner \fCmultipart/signed\fP part is retained.
** (PGP only)
*/
+ { "pgp_self_encrypt", DT_BOOL, R_NONE, OPTPGPSELFENCRYPT, 0 },
+ /*
+ ** .pp
+ ** When \fIset\fP, PGP encrypted messages will also be encrypted
+ ** using the key in $$pgp_self_encrypt_as.
+ ** (PGP only)
+ */
+ { "pgp_self_encrypt_as", DT_STR, R_NONE, UL &PgpSelfEncryptAs, 0 },
+ /*
+ ** .pp
+ ** This is an additional key used to encrypt messages when $$pgp_self_encrypt
+ ** is \fIset\fP. It should be in keyid or fingerprint form (e.g. 0x00112233).
+ ** (PGP only)
+ */
{ "pgp_show_unusable", DT_BOOL, R_NONE, OPTPGPSHOWUNUSABLE, 1 },
/*
** .pp
** possible \fCprintf(3)\fP-like sequences.
** (S/MIME only)
*/
+ { "smime_self_encrypt", DT_BOOL, R_NONE, OPTSMIMESELFENCRYPT, 0 },
+ /*
+ ** .pp
+ ** When \fIset\fP, S/MIME encrypted messages will also be encrypted
+ ** using the certificate in $$smime_self_encrypt_as.
+ ** (S/MIME only)
+ */
+ { "smime_self_encrypt_as", DT_STR, R_NONE, UL &SmimeSelfEncryptAs, 0 },
+ /*
+ ** .pp
+ ** This is an additional certificate used to encrypt messages when
+ ** $$smime_self_encrypt is \fIset\fP. It should be the
+ ** hash-value that OpenSSL generates.
+ ** (S/MIME only)
+ */
{ "smime_sign_command", DT_STR, R_NONE, UL &SmimeSignCommand, 0},
/*
** .pp