NeoMutt  2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
functions.h File Reference

Envelope functions. More...

#include "key/lib.h"
Include dependency graph for functions.h:
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, const struct KeyEvent *event)

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, const struct KeyEvent *event)

Definition at line 43 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 151 of file functions.c.

152{
153 struct Email *e = wdata->email;
154
155 const bool c_crypt_opportunistic_encrypt = cs_subset_bool(wdata->sub, "crypt_opportunistic_encrypt");
156 if (c_crypt_opportunistic_encrypt)
158
159#ifdef USE_AUTOCRYPT
160 const bool c_autocrypt = cs_subset_bool(wdata->sub, "autocrypt");
161 if (c_autocrypt)
162 {
164
165 /* Anything that enables SEC_ENCRYPT or SEC_SIGN, or turns on SMIME
166 * overrides autocrypt, be it oppenc or the user having turned on
167 * those flags manually. */
169 {
171 }
172 else
173 {
175 {
176 if (wdata->autocrypt_rec == AUTOCRYPT_REC_YES)
177 {
180 }
181 else
182 {
184 }
185 }
186 }
187 }
188#endif
189}
@ AUTOCRYPT_REC_YES
Autocrypt should be used.
Definition lib.h:171
enum AutocryptRec mutt_autocrypt_ui_recommendation(const struct Email *e, char **keylist)
Get the recommended action for an Email.
Definition autocrypt.c:578
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:1052
@ SEC_SIGN
Email is signed.
Definition lib.h:93
@ SEC_INLINE
Email has an inline signature.
Definition lib.h:99
@ SEC_ENCRYPT
Email is encrypted.
Definition lib.h:92
@ SEC_AUTOCRYPT
(Autocrypt) Message will be, or was Autocrypt encrypt+signed
Definition lib.h:101
@ SEC_AUTOCRYPT_OVERRIDE
(Autocrypt) Indicates manual set/unset of encryption
Definition lib.h:102
#define APPLICATION_PGP
Use PGP to encrypt/sign.
Definition lib.h:106
#define APPLICATION_SMIME
Use SMIME to encrypt/sign.
Definition lib.h:107
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: