NeoMutt  2025-12-11-872-g385a04
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
dlg_smime.c File Reference

SMIME Key Selection Dialog. More...

#include "config.h"
#include <stdbool.h>
#include <stdio.h>
#include "private.h"
#include "mutt/lib.h"
#include "core/lib.h"
#include "gui/lib.h"
#include "lib.h"
#include "key/lib.h"
#include "menu/lib.h"
#include "module_data.h"
#include "mutt_logging.h"
#include "smime.h"
#include "smime_functions.h"
+ Include dependency graph for dlg_smime.c:

Go to the source code of this file.

Functions

static char * smime_key_flags (KeyFlags flags)
 Turn SMIME key flags into a string.
 
static int smime_make_entry (struct Menu *menu, int line, int max_cols, struct Buffer *buf)
 Format an S/MIME Key for the Menu - Implements Menu::make_entry() -.
 
struct SmimeKeydlg_smime (struct SmimeKey *keys, const char *query)
 Get the user to select a key -.
 

Variables

static const struct Mapping SmimeHelp []
 Help Bar for the Smime key selection dialog.
 

Detailed Description

SMIME Key Selection Dialog.

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 dlg_smime.c.

Function Documentation

◆ smime_key_flags()

static char * smime_key_flags ( KeyFlags flags)
static

Turn SMIME key flags into a string.

Parameters
flagsFlags, see KeyFlags
Return values
ptrFlag string
Note
The string is statically allocated

Definition at line 89 of file dlg_smime.c.

90{
91 static char buf[3];
92
93 if (!(flags & KEYFLAG_CANENCRYPT))
94 buf[0] = '-';
95 else
96 buf[0] = 'e';
97
98 if (!(flags & KEYFLAG_CANSIGN))
99 buf[1] = '-';
100 else
101 buf[1] = 's';
102
103 buf[2] = '\0';
104
105 return buf;
106}
@ KEYFLAG_CANSIGN
Key is suitable for signing.
Definition lib.h:147
@ KEYFLAG_CANENCRYPT
Key is suitable for encryption.
Definition lib.h:148
+ Here is the caller graph for this function:

Variable Documentation

◆ SmimeHelp

const struct Mapping SmimeHelp[]
static
Initial value:
= {
{ N_("Exit"), OP_EXIT },
{ N_("Select"), OP_GENERIC_SELECT_ENTRY },
{ N_("Help"), OP_HELP },
{ NULL, 0 },
}
#define N_(a)
Definition message.h:32

Help Bar for the Smime key selection dialog.

Definition at line 73 of file dlg_smime.c.

73 {
74 // clang-format off
75 { N_("Exit"), OP_EXIT },
76 { N_("Select"), OP_GENERIC_SELECT_ENTRY },
77 { N_("Help"), OP_HELP },
78 { NULL, 0 },
79 // clang-format on
80};