NeoMutt  2024-10-02-37-gfa9146
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
functions.h File Reference

Envelope functions. More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  EnvelopeFunction
 A NeoMutt Envelope function. More...
 

Typedefs

typedef int(* envelope_function_t) (struct EnvelopeWindowData *wdata, int op)
 

Functions

void update_crypt_info (struct EnvelopeWindowData *wdata)
 Update the crypto info.
 

Detailed Description

Envelope functions.

Authors
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file functions.h.

Typedef Documentation

◆ envelope_function_t

typedef int(* envelope_function_t) (struct EnvelopeWindowData *wdata, int op)

Definition at line 38 of file functions.h.

Function Documentation

◆ update_crypt_info()

void update_crypt_info ( struct EnvelopeWindowData wdata)

Update the crypto info.

Parameters
wdataEnvelope Window data

Definition at line 145 of file functions.c.

146{
147 struct Email *e = wdata->email;
148
149 const bool c_crypt_opportunistic_encrypt = cs_subset_bool(wdata->sub, "crypt_opportunistic_encrypt");
150 if (c_crypt_opportunistic_encrypt)
152
153#ifdef USE_AUTOCRYPT
154 const bool c_autocrypt = cs_subset_bool(wdata->sub, "autocrypt");
155 if (c_autocrypt)
156 {
158
159 /* Anything that enables SEC_ENCRYPT or SEC_SIGN, or turns on SMIME
160 * overrides autocrypt, be it oppenc or the user having turned on
161 * those flags manually. */
163 {
165 }
166 else
167 {
169 {
170 if (wdata->autocrypt_rec == AUTOCRYPT_REC_YES)
171 {
174 }
175 else
176 {
177 e->security &= ~SEC_AUTOCRYPT;
178 }
179 }
180 }
181 }
182#endif
183}
@ AUTOCRYPT_REC_YES
Autocrypt should be used.
Definition: lib.h:163
enum AutocryptRec mutt_autocrypt_ui_recommendation(const struct Email *e, char **keylist)
Get the recommended action for an Email.
Definition: autocrypt.c:558
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Definition: helpers.c:47
void crypt_opportunistic_encrypt(struct Email *e)
Can all recipients be determined.
Definition: crypt.c:1045
#define SEC_INLINE
Email has an inline signature.
Definition: lib.h:85
#define SEC_AUTOCRYPT
(Autocrypt) Message will be, or was Autocrypt encrypt+signed
Definition: lib.h:87
#define APPLICATION_PGP
Use PGP to encrypt/sign.
Definition: lib.h:90
#define APPLICATION_SMIME
Use SMIME to encrypt/sign.
Definition: lib.h:91
#define SEC_ENCRYPT
Email is encrypted.
Definition: lib.h:78
#define SEC_AUTOCRYPT_OVERRIDE
(Autocrypt) Indicates manual set/unset of encryption
Definition: lib.h:88
#define SEC_SIGN
Email is signed.
Definition: lib.h:79
The envelope/body of an email.
Definition: email.h:39
SecurityFlags security
bit 0-10: flags, bit 11,12: application, bit 13: traditional pgp See: ncrypt/lib.h pgplib....
Definition: email.h:43
struct Email * email
Email being composed.
Definition: wdata.h:40
struct ConfigSubset * sub
Inherited config items.
Definition: wdata.h:39
enum AutocryptRec autocrypt_rec
Autocrypt recommendation.
Definition: wdata.h:50
+ Here is the call graph for this function:
+ Here is the caller graph for this function: