NeoMutt  2024-11-14-34-g5aaf0d
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 "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 88 of file dlg_smime.c.

89{
90 static char buf[3];
91
92 if (!(flags & KEYFLAG_CANENCRYPT))
93 buf[0] = '-';
94 else
95 buf[0] = 'e';
96
97 if (!(flags & KEYFLAG_CANSIGN))
98 buf[1] = '-';
99 else
100 buf[1] = 's';
101
102 buf[2] = '\0';
103
104 return buf;
105}
#define KEYFLAG_CANENCRYPT
Key is suitable for encryption.
Definition: lib.h:128
#define KEYFLAG_CANSIGN
Key is suitable for signing.
Definition: lib.h:127
+ 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 72 of file dlg_smime.c.