NeoMutt  2024-04-25-89-g194907
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 148 of file functions.c.

149{
150 struct Email *e = wdata->email;
151
152 const bool c_crypt_opportunistic_encrypt = cs_subset_bool(wdata->sub, "crypt_opportunistic_encrypt");
153 if (c_crypt_opportunistic_encrypt)
155
156#ifdef USE_AUTOCRYPT
157 const bool c_autocrypt = cs_subset_bool(wdata->sub, "autocrypt");
158 if (c_autocrypt)
159 {
161
162 /* Anything that enables SEC_ENCRYPT or SEC_SIGN, or turns on SMIME
163 * overrides autocrypt, be it oppenc or the user having turned on
164 * those flags manually. */
166 {
168 }
169 else
170 {
172 {
173 if (wdata->autocrypt_rec == AUTOCRYPT_REC_YES)
174 {
177 }
178 else
179 {
180 e->security &= ~SEC_AUTOCRYPT;
181 }
182 }
183 }
184 }
185#endif
186}
@ 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:560
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: