NeoMutt  2024-11-14-34-g5aaf0d
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
crypt_mod_smime_classic.c
Go to the documentation of this file.
1
29#include "config.h"
30#include <stdio.h>
31#include "lib.h"
32#include "crypt_mod.h"
33#ifdef CRYPT_BACKEND_CLASSIC_SMIME
34#include "smime.h"
35#endif
36
40static void smime_class_init(void)
41{
42 smime_init();
43}
44
48static void smime_class_cleanup(void)
49{
51}
52
57 // clang-format off
59
66 NULL, /* encrypted_handler */
71 NULL, /* set_sender */
72
73 NULL, /* pgp_encrypt_message */
74 NULL, /* pgp_make_key_attachment */
75 NULL, /* pgp_check_traditional */
76 NULL, /* pgp_traditional_encryptsign */
77 NULL, /* pgp_invoke_getkeys */
78 NULL, /* pgp_invoke_import */
79 NULL, /* pgp_extract_key_from_attachment */
80
85 // clang-format on
86};
Register crypto modules.
const struct CryptModuleSpecs CryptModSmimeClassic
CLI SMIME - Implements CryptModuleSpecs -.
int smime_class_application_handler(struct Body *b, struct State *state)
Manage the MIME type "application/pgp" or "application/smime" - Implements CryptModuleSpecs::applicat...
Definition: smime.c:2123
static void smime_class_cleanup(void)
Clean up smime - Implements CryptModuleSpecs::cleanup() -.
int smime_class_decrypt_mime(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **b_dec)
Decrypt an encrypted MIME part - Implements CryptModuleSpecs::decrypt_mime() -.
Definition: smime.c:2060
char * smime_class_find_keys(const struct AddressList *al, bool oppenc_mode)
Find the keyids of the recipients of a message - Implements CryptModuleSpecs::find_keys() -.
Definition: smime.c:799
static void smime_class_init(void)
Initialise smime - Implements CryptModuleSpecs::init() -.
SecurityFlags smime_class_send_menu(struct Email *e)
Ask the user whether to sign and/or encrypt the email - Implements CryptModuleSpecs::send_menu() -.
Definition: smime.c:2142
struct Body * smime_class_sign_message(struct Body *b, const struct AddressList *from)
Cryptographically sign the Body of a message - Implements CryptModuleSpecs::sign_message() -.
Definition: smime.c:1499
struct Body * smime_class_build_smime_entity(struct Body *b, char *certlist)
Encrypt the email body to all recipients - Implements CryptModuleSpecs::smime_build_smime_entity() -.
Definition: smime.c:1334
void smime_class_getkeys(struct Envelope *env)
Get the S/MIME keys required to encrypt this email - Implements CryptModuleSpecs::smime_getkeys() -.
Definition: smime.c:759
void smime_class_invoke_import(const char *infile, const char *mailbox)
Add a certificate and update index file (externally) - Implements CryptModuleSpecs::smime_invoke_impo...
Definition: smime.c:1132
int smime_class_verify_sender(struct Email *e, struct Message *msg)
Does the sender match the certificate? - Implements CryptModuleSpecs::smime_verify_sender() -.
Definition: smime.c:1208
bool smime_class_valid_passphrase(void)
Ensure we have a valid passphrase - Implements CryptModuleSpecs::valid_passphrase() -.
Definition: smime.c:165
int smime_class_verify_one(struct Body *b, struct State *state, const char *tempfile)
Check a signed MIME part against a signature - Implements CryptModuleSpecs::verify_one() -.
Definition: smime.c:1708
void smime_class_void_passphrase(void)
Forget the cached passphrase - Implements CryptModuleSpecs::void_passphrase() -.
Definition: smime.c:156
#define APPLICATION_SMIME
Use SMIME to encrypt/sign.
Definition: lib.h:91
void smime_init(void)
Initialise smime globals.
Definition: smime.c:85
void smime_cleanup(void)
Clean up smime globals.
Definition: smime.c:95
SMIME helper routines.
Key value store.