NeoMutt  2023-11-03-85-g512e01
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 147 of file functions.c.

148{
149 struct Email *e = wdata->email;
150
151 const bool c_crypt_opportunistic_encrypt = cs_subset_bool(wdata->sub, "crypt_opportunistic_encrypt");
152 if (c_crypt_opportunistic_encrypt)
154
155#ifdef USE_AUTOCRYPT
156 const bool c_autocrypt = cs_subset_bool(wdata->sub, "autocrypt");
157 if (c_autocrypt)
158 {
160
161 /* Anything that enables SEC_ENCRYPT or SEC_SIGN, or turns on SMIME
162 * overrides autocrypt, be it oppenc or the user having turned on
163 * those flags manually. */
165 {
167 }
168 else
169 {
171 {
172 if (wdata->autocrypt_rec == AUTOCRYPT_REC_YES)
173 {
176 }
177 else
178 {
179 e->security &= ~SEC_AUTOCRYPT;
180 }
181 }
182 }
183 }
184#endif
185}
@ AUTOCRYPT_REC_YES
Autocrypt should be used.
Definition: lib.h:162
enum AutocryptRec mutt_autocrypt_ui_recommendation(const struct Email *e, char **keylist)
Get the recommended action for an Email.
Definition: autocrypt.c:557
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Definition: helpers.c:48
void crypt_opportunistic_encrypt(struct Email *e)
Can all recipients be determined.
Definition: crypt.c:1034
#define SEC_INLINE
Email has an inline signature.
Definition: lib.h:86
#define SEC_AUTOCRYPT
(Autocrypt) Message will be, or was Autocrypt encrypt+signed
Definition: lib.h:88
#define APPLICATION_PGP
Use PGP to encrypt/sign.
Definition: lib.h:91
#define APPLICATION_SMIME
Use SMIME to encrypt/sign.
Definition: lib.h:92
#define SEC_ENCRYPT
Email is encrypted.
Definition: lib.h:79
#define SEC_AUTOCRYPT_OVERRIDE
(Autocrypt) Indicates manual set/unset of encryption
Definition: lib.h:89
#define SEC_SIGN
Email is signed.
Definition: lib.h:80
The envelope/body of an email.
Definition: email.h:37
SecurityFlags security
bit 0-10: flags, bit 11,12: application, bit 13: traditional pgp See: ncrypt/lib.h pgplib....
Definition: email.h:41
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: