gpgme  1.15.1
About: GPGME (GnuPG Made Easy) is a library that provides a High-Level Crypto API for encryption, decryption, signing, signature verification and key management.
  Fossies Dox: gpgme-1.15.1.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

engine-gpg.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "gpgme.h"
#include "util.h"
#include "ops.h"
#include "wait.h"
#include "context.h"
#include "priv-io.h"
#include "sema.h"
#include "debug.h"
#include "data.h"
#include "mbox-util.h"
#include "engine-backend.h"
Include dependency graph for engine-gpg.c:

Go to the source code of this file.

Classes

struct  arg_and_data_s
 
struct  fd_data_map_s
 
struct  engine_gpg
 

Macros

#define NOTATION_FLAG_SIG   1 /* Use --sig-notation (default)*/
 
#define NOTATION_FLAG_CERT   2 /* Use --cert-notation */
 
#define NOTATION_FLAG_SET   3 /* Use --set-notation */
 
#define MYBUFLEN   2000 /* Fixme: We don't support URLs longer than that. */
 
#define NR_FIELDS   16
 
#define MYBUFLEN   4096
 

Typedefs

typedef gpgme_error_t(* colon_preprocessor_t) (char *line, char **rline)
 
typedef struct engine_gpgengine_gpg_t
 

Functions

static void gpg_io_event (void *engine, gpgme_event_io_t type, void *type_data)
 
static void close_notify_handler (int fd, void *opaque)
 
static gpgme_error_t _add_arg (engine_gpg_t gpg, const char *prefix, const char *arg, size_t arglen, int front, int *arg_locp)
 
static gpgme_error_t add_arg_ext (engine_gpg_t gpg, const char *arg, int front)
 
static gpgme_error_t add_arg_with_locp (engine_gpg_t gpg, const char *arg, int *locp)
 
static gpgme_error_t add_arg (engine_gpg_t gpg, const char *arg)
 
static gpgme_error_t add_arg_pfx (engine_gpg_t gpg, const char *prefix, const char *arg)
 
static gpgme_error_t add_arg_len (engine_gpg_t gpg, const char *prefix, const char *arg, size_t arglen)
 
static gpgme_error_t add_data (engine_gpg_t gpg, gpgme_data_t data, int dup_to, int inbound)
 
static int have_gpg_version (engine_gpg_t gpg, const char *version)
 
static char * gpg_get_version (const char *file_name)
 
static const char * gpg_get_req_version (void)
 
static void free_argv (char **argv)
 
static void free_fd_data_map (struct fd_data_map_s *fd_data_map)
 
static gpgme_error_t gpg_cancel (void *engine)
 
static void gpg_release (void *engine)
 
static gpgme_error_t gpg_new (void **engine, const char *file_name, const char *home_dir, const char *version)
 
static void gpg_set_engine_flags (void *engine, const gpgme_ctx_t ctx)
 
static gpgme_error_t gpg_set_locale (void *engine, int category, const char *value)
 
static void gpg_set_status_cb (void *engine, gpgme_status_cb_t cb, void *cb_value)
 
static void gpg_set_status_handler (void *engine, engine_status_handler_t fnc, void *fnc_value)
 
static gpgme_error_t gpg_set_colon_line_handler (void *engine, engine_colon_line_handler_t fnc, void *fnc_value)
 
static gpgme_error_t command_handler (void *opaque, int fd)
 
static gpgme_error_t gpg_set_command_handler (void *engine, engine_command_handler_t fnc, void *fnc_value)
 
static gpgme_error_t build_argv (engine_gpg_t gpg, const char *pgmname)
 
static gpgme_error_t add_io_cb (engine_gpg_t gpg, int fd, int dir, gpgme_io_cb_t handler, void *data, void **tag)
 
static gpgme_error_t read_status (engine_gpg_t gpg)
 
static gpgme_error_t status_handler (void *opaque, int fd)
 
static gpgme_error_t read_colon_line (engine_gpg_t gpg)
 
static gpgme_error_t colon_line_handler (void *opaque, int fd)
 
static gpgme_error_t start (engine_gpg_t gpg)
 
static gpgme_error_t add_input_size_hint (engine_gpg_t gpg, gpgme_data_t data)
 
static gpgme_error_t gpg_decrypt (void *engine, gpgme_decrypt_flags_t flags, gpgme_data_t ciph, gpgme_data_t plain, int export_session_key, const char *override_session_key, int auto_key_retrieve)
 
static gpgme_error_t gpg_delete (void *engine, gpgme_key_t key, unsigned int flags)
 
static gpgme_error_t gpg_passwd (void *engine, gpgme_key_t key, unsigned int flags)
 
static gpgme_error_t append_args_from_signers (engine_gpg_t gpg, gpgme_ctx_t ctx)
 
static gpgme_error_t append_args_from_sender (engine_gpg_t gpg, gpgme_ctx_t ctx)
 
static gpgme_error_t append_args_from_sig_notations (engine_gpg_t gpg, gpgme_ctx_t ctx, int flags)
 
static gpgme_error_t gpg_edit (void *engine, int type, gpgme_key_t key, gpgme_data_t out, gpgme_ctx_t ctx)
 
static gpg_error_t add_arg_recipient (engine_gpg_t gpg, gpgme_encrypt_flags_t flags, gpgme_key_t key)
 
static gpg_error_t add_arg_recipient_string (engine_gpg_t gpg, gpgme_encrypt_flags_t flags, const char *userid, int useridlen)
 
static gpgme_error_t append_args_from_recipients (engine_gpg_t gpg, gpgme_encrypt_flags_t flags, gpgme_key_t recp[])
 
static gpg_error_t append_args_from_recipients_string (engine_gpg_t gpg, gpgme_encrypt_flags_t flags, const char *string)
 
static gpgme_error_t gpg_encrypt (void *engine, gpgme_key_t recp[], const char *recpstring, gpgme_encrypt_flags_t flags, gpgme_data_t plain, gpgme_data_t ciph, int use_armor)
 
static gpgme_error_t gpg_encrypt_sign (void *engine, gpgme_key_t recp[], const char *recpstring, gpgme_encrypt_flags_t flags, gpgme_data_t plain, gpgme_data_t ciph, int use_armor, gpgme_ctx_t ctx)
 
static gpgme_error_t export_common (engine_gpg_t gpg, gpgme_export_mode_t mode, gpgme_data_t keydata, int use_armor)
 
static gpgme_error_t gpg_export (void *engine, const char *pattern, gpgme_export_mode_t mode, gpgme_data_t keydata, int use_armor)
 
static gpgme_error_t gpg_export_ext (void *engine, const char *pattern[], gpgme_export_mode_t mode, gpgme_data_t keydata, int use_armor)
 
static gpgme_error_t gpg_add_algo_usage_expire (engine_gpg_t gpg, const char *algo, unsigned long expires, unsigned int flags)
 
static gpgme_error_t gpg_createkey_from_param (engine_gpg_t gpg, gpgme_data_t help_data, unsigned int extraflags)
 
static gpgme_error_t gpg_createkey (engine_gpg_t gpg, const char *userid, const char *algo, unsigned long expires, unsigned int flags, unsigned int extraflags)
 
static gpgme_error_t gpg_addkey (engine_gpg_t gpg, const char *algo, unsigned long expires, gpgme_key_t key, unsigned int flags, unsigned int extraflags)
 
static gpgme_error_t gpg_adduid (engine_gpg_t gpg, gpgme_key_t key, const char *userid, unsigned int extraflags)
 
static gpgme_error_t gpg_genkey (void *engine, const char *userid, const char *algo, unsigned long reserved, unsigned long expires, gpgme_key_t key, unsigned int flags, gpgme_data_t help_data, unsigned int extraflags, gpgme_data_t pubkey, gpgme_data_t seckey)
 
static const char * string_from_data (gpgme_data_t data, int delim, void **helpptr, gpgme_error_t *r_err)
 
static gpgme_error_t gpg_import (void *engine, gpgme_data_t keydata, gpgme_key_t *keyarray)
 
static gpgme_error_t gpg_keylist_preprocess (char *line, char **r_line)
 
static gpg_error_t gpg_keylist_build_options (engine_gpg_t gpg, int secret_only, gpgme_keylist_mode_t mode)
 
static gpgme_error_t gpg_keylist (void *engine, const char *pattern, int secret_only, gpgme_keylist_mode_t mode, int engine_flags)
 
static gpgme_error_t gpg_keylist_ext (void *engine, const char *pattern[], int secret_only, int reserved, gpgme_keylist_mode_t mode, int engine_flags)
 
static gpgme_error_t gpg_keylist_data (void *engine, gpgme_data_t data)
 
static gpgme_error_t gpg_keysign (void *engine, gpgme_key_t key, const char *userid, unsigned long expire, unsigned int flags, gpgme_ctx_t ctx)
 
static gpgme_error_t gpg_revsig (void *engine, gpgme_key_t key, gpgme_key_t signing_key, const char *userid, unsigned int flags)
 
static gpgme_error_t gpg_tofu_policy (void *engine, gpgme_key_t key, gpgme_tofu_policy_t policy)
 
static gpgme_error_t gpg_sign (void *engine, gpgme_data_t in, gpgme_data_t out, gpgme_sig_mode_t mode, int use_armor, int use_textmode, int include_certs, gpgme_ctx_t ctx)
 
static gpgme_error_t gpg_verify (void *engine, gpgme_data_t sig, gpgme_data_t signed_text, gpgme_data_t plaintext, gpgme_ctx_t ctx)
 
static void gpg_set_io_cbs (void *engine, gpgme_io_cbs_t io_cbs)
 
static gpgme_error_t gpg_set_pinentry_mode (void *engine, gpgme_pinentry_mode_t mode)
 
static gpgme_error_t gpg_getauditlog (void *engine, gpgme_data_t output, unsigned int flags)
 
static gpgme_error_t gpg_setexpire (void *engine, gpgme_key_t key, unsigned long expires, const char *subfprs, unsigned int reserved)
 

Variables

struct engine_ops _gpgme_engine_ops_gpg
 

Macro Definition Documentation

◆ MYBUFLEN [1/2]

#define MYBUFLEN   2000 /* Fixme: We don't support URLs longer than that. */

◆ MYBUFLEN [2/2]

#define MYBUFLEN   4096

◆ NOTATION_FLAG_CERT

#define NOTATION_FLAG_CERT   2 /* Use --cert-notation */

Definition at line 1867 of file engine-gpg.c.

◆ NOTATION_FLAG_SET

#define NOTATION_FLAG_SET   3 /* Use --set-notation */

Definition at line 1868 of file engine-gpg.c.

◆ NOTATION_FLAG_SIG

#define NOTATION_FLAG_SIG   1 /* Use --sig-notation (default)*/

Definition at line 1866 of file engine-gpg.c.

◆ NR_FIELDS

#define NR_FIELDS   16

Typedef Documentation

◆ colon_preprocessor_t

typedef gpgme_error_t(* colon_preprocessor_t) (char *line, char **rline)

Definition at line 82 of file engine-gpg.c.

◆ engine_gpg_t

typedef struct engine_gpg* engine_gpg_t

Definition at line 162 of file engine-gpg.c.

Function Documentation

◆ _add_arg()

static gpgme_error_t _add_arg ( engine_gpg_t  gpg,
const char *  prefix,
const char *  arg,
size_t  arglen,
int  front,
int *  arg_locp 
)
static

◆ add_arg()

◆ add_arg_ext()

static gpgme_error_t add_arg_ext ( engine_gpg_t  gpg,
const char *  arg,
int  front 
)
static

Definition at line 271 of file engine-gpg.c.

References _add_arg(), and arg_and_data_s::arg.

Referenced by start().

◆ add_arg_len()

static gpgme_error_t add_arg_len ( engine_gpg_t  gpg,
const char *  prefix,
const char *  arg,
size_t  arglen 
)
static

Definition at line 295 of file engine-gpg.c.

References _add_arg(), and arg_and_data_s::arg.

Referenced by add_arg_recipient_string(), gpg_keysign(), and gpg_revsig().

◆ add_arg_pfx()

static gpgme_error_t add_arg_pfx ( engine_gpg_t  gpg,
const char *  prefix,
const char *  arg 
)
static

Definition at line 289 of file engine-gpg.c.

References _add_arg(), and arg_and_data_s::arg.

Referenced by gpg_keysign(), and gpg_revsig().

◆ add_arg_recipient()

static gpg_error_t add_arg_recipient ( engine_gpg_t  gpg,
gpgme_encrypt_flags_t  flags,
gpgme_key_t  key 
)
static

Definition at line 2001 of file engine-gpg.c.

References add_arg().

Referenced by append_args_from_recipients().

◆ add_arg_recipient_string()

static gpg_error_t add_arg_recipient_string ( engine_gpg_t  gpg,
gpgme_encrypt_flags_t  flags,
const char *  userid,
int  useridlen 
)
static

Definition at line 2022 of file engine-gpg.c.

References _gpgme_mailbox_from_userid(), add_arg(), and add_arg_len().

Referenced by append_args_from_recipients_string().

◆ add_arg_with_locp()

static gpgme_error_t add_arg_with_locp ( engine_gpg_t  gpg,
const char *  arg,
int *  locp 
)
static

Definition at line 277 of file engine-gpg.c.

References _add_arg(), and arg_and_data_s::arg.

Referenced by gpg_new().

◆ add_data()

◆ add_input_size_hint()

static gpgme_error_t add_input_size_hint ( engine_gpg_t  gpg,
gpgme_data_t  data 
)
static

◆ add_io_cb()

static gpgme_error_t add_io_cb ( engine_gpg_t  gpg,
int  fd,
int  dir,
gpgme_io_cb_t  handler,
void *  data,
void **  tag 
)
static

Definition at line 1233 of file engine-gpg.c.

References _gpgme_io_set_nonblocking(), fd_data_map_s::data, fd, handler, and engine_gpg::io_cbs.

Referenced by read_status(), and start().

◆ append_args_from_recipients()

static gpgme_error_t append_args_from_recipients ( engine_gpg_t  gpg,
gpgme_encrypt_flags_t  flags,
gpgme_key_t  recp[] 
)
static

Definition at line 2061 of file engine-gpg.c.

References add_arg(), and add_arg_recipient().

Referenced by gpg_encrypt(), and gpg_encrypt_sign().

◆ append_args_from_recipients_string()

static gpg_error_t append_args_from_recipients_string ( engine_gpg_t  gpg,
gpgme_encrypt_flags_t  flags,
const char *  string 
)
static

Definition at line 2085 of file engine-gpg.c.

References add_arg(), and add_arg_recipient_string().

Referenced by gpg_encrypt(), and gpg_encrypt_sign().

◆ append_args_from_sender()

static gpgme_error_t append_args_from_sender ( engine_gpg_t  gpg,
gpgme_ctx_t  ctx 
)
static

Definition at line 1850 of file engine-gpg.c.

References add_arg(), have_gpg_version(), and gpgme_context::sender.

Referenced by gpg_encrypt_sign(), gpg_sign(), and gpg_verify().

◆ append_args_from_sig_notations()

static gpgme_error_t append_args_from_sig_notations ( engine_gpg_t  gpg,
gpgme_ctx_t  ctx,
int  flags 
)
static

◆ append_args_from_signers()

static gpgme_error_t append_args_from_signers ( engine_gpg_t  gpg,
gpgme_ctx_t  ctx 
)
static

Definition at line 1825 of file engine-gpg.c.

References add_arg(), gpgme_key_unref(), and gpgme_signers_enum().

Referenced by gpg_edit(), gpg_encrypt_sign(), gpg_keysign(), and gpg_sign().

◆ build_argv()

◆ close_notify_handler()

◆ colon_line_handler()

static gpgme_error_t colon_line_handler ( void *  opaque,
int  fd 
)
static

◆ command_handler()

◆ export_common()

static gpgme_error_t export_common ( engine_gpg_t  gpg,
gpgme_export_mode_t  mode,
gpgme_data_t  keydata,
int  use_armor 
)
static

Definition at line 2326 of file engine-gpg.c.

References add_arg(), add_data(), and have_gpg_version().

Referenced by gpg_export(), and gpg_export_ext().

◆ free_argv()

static void free_argv ( char **  argv)
static

Definition at line 359 of file engine-gpg.c.

Referenced by build_argv(), and gpg_release().

◆ free_fd_data_map()

static void free_fd_data_map ( struct fd_data_map_s fd_data_map)
static

Definition at line 370 of file engine-gpg.c.

References _gpgme_io_close(), fd_data_map_s::data, and fd.

Referenced by build_argv(), and gpg_cancel().

◆ gpg_add_algo_usage_expire()

static gpgme_error_t gpg_add_algo_usage_expire ( engine_gpg_t  gpg,
const char *  algo,
unsigned long  expires,
unsigned int  flags 
)
static

Definition at line 2426 of file engine-gpg.c.

References add_arg().

Referenced by gpg_addkey(), and gpg_createkey().

◆ gpg_addkey()

static gpgme_error_t gpg_addkey ( engine_gpg_t  gpg,
const char *  algo,
unsigned long  expires,
gpgme_key_t  key,
unsigned int  flags,
unsigned int  extraflags 
)
static

Definition at line 2528 of file engine-gpg.c.

References add_arg(), GENKEY_EXTRAFLAG_ARMOR, gpg_add_algo_usage_expire(), and start().

Referenced by gpg_genkey().

◆ gpg_adduid()

static gpgme_error_t gpg_adduid ( engine_gpg_t  gpg,
gpgme_key_t  key,
const char *  userid,
unsigned int  extraflags 
)
static

◆ gpg_cancel()

static gpgme_error_t gpg_cancel ( void *  engine)
static

◆ gpg_createkey()

static gpgme_error_t gpg_createkey ( engine_gpg_t  gpg,
const char *  userid,
const char *  algo,
unsigned long  expires,
unsigned int  flags,
unsigned int  extraflags 
)
static

Definition at line 2492 of file engine-gpg.c.

References add_arg(), GENKEY_EXTRAFLAG_ARMOR, gpg_add_algo_usage_expire(), and start().

Referenced by gpg_genkey().

◆ gpg_createkey_from_param()

static gpgme_error_t gpg_createkey_from_param ( engine_gpg_t  gpg,
gpgme_data_t  help_data,
unsigned int  extraflags 
)
static

Definition at line 2473 of file engine-gpg.c.

References add_arg(), add_data(), GENKEY_EXTRAFLAG_ARMOR, and start().

Referenced by gpg_genkey().

◆ gpg_decrypt()

static gpgme_error_t gpg_decrypt ( void *  engine,
gpgme_decrypt_flags_t  flags,
gpgme_data_t  ciph,
gpgme_data_t  plain,
int  export_session_key,
const char *  override_session_key,
int  auto_key_retrieve 
)
static

◆ gpg_delete()

static gpgme_error_t gpg_delete ( void *  engine,
gpgme_key_t  key,
unsigned int  flags 
)
static

Definition at line 1776 of file engine-gpg.c.

References add_arg(), and start().

◆ gpg_edit()

static gpgme_error_t gpg_edit ( void *  engine,
int  type,
gpgme_key_t  key,
gpgme_data_t  out,
gpgme_ctx_t  ctx 
)
static

◆ gpg_encrypt()

static gpgme_error_t gpg_encrypt ( void *  engine,
gpgme_key_t  recp[],
const char *  recpstring,
gpgme_encrypt_flags_t  flags,
gpgme_data_t  plain,
gpgme_data_t  ciph,
int  use_armor 
)
static

◆ gpg_encrypt_sign()

◆ gpg_export()

static gpgme_error_t gpg_export ( void *  engine,
const char *  pattern,
gpgme_export_mode_t  mode,
gpgme_data_t  keydata,
int  use_armor 
)
static

Definition at line 2383 of file engine-gpg.c.

References add_arg(), export_common(), and start().

◆ gpg_export_ext()

static gpgme_error_t gpg_export_ext ( void *  engine,
const char *  pattern[],
gpgme_export_mode_t  mode,
gpgme_data_t  keydata,
int  use_armor 
)
static

Definition at line 2402 of file engine-gpg.c.

References add_arg(), export_common(), and start().

◆ gpg_genkey()

static gpgme_error_t gpg_genkey ( void *  engine,
const char *  userid,
const char *  algo,
unsigned long  reserved,
unsigned long  expires,
gpgme_key_t  key,
unsigned int  flags,
gpgme_data_t  help_data,
unsigned int  extraflags,
gpgme_data_t  pubkey,
gpgme_data_t  seckey 
)
static

◆ gpg_get_req_version()

static const char* gpg_get_req_version ( void  )
static

Definition at line 352 of file engine-gpg.c.

◆ gpg_get_version()

static char* gpg_get_version ( const char *  file_name)
static

Definition at line 344 of file engine-gpg.c.

References _gpgme_get_default_gpg_name(), and _gpgme_get_program_version().

◆ gpg_getauditlog()

static gpgme_error_t gpg_getauditlog ( void *  engine,
gpgme_data_t  output,
unsigned int  flags 
)
static

◆ gpg_import()

static gpgme_error_t gpg_import ( void *  engine,
gpgme_data_t  keydata,
gpgme_key_t keyarray 
)
static

◆ gpg_io_event()

static void gpg_io_event ( void *  engine,
gpgme_event_io_t  type,
void *  type_data 
)
static

Definition at line 166 of file engine-gpg.c.

References DEBUG_ENGINE, engine_gpg::io_cbs, and TRACE.

Referenced by start().

◆ gpg_keylist()

static gpgme_error_t gpg_keylist ( void *  engine,
const char *  pattern,
int  secret_only,
gpgme_keylist_mode_t  mode,
int  engine_flags 
)
static

Definition at line 3075 of file engine-gpg.c.

References add_arg(), gpg_keylist_build_options(), and start().

◆ gpg_keylist_build_options()

static gpg_error_t gpg_keylist_build_options ( engine_gpg_t  gpg,
int  secret_only,
gpgme_keylist_mode_t  mode 
)
static

◆ gpg_keylist_data()

static gpgme_error_t gpg_keylist_data ( void *  engine,
gpgme_data_t  data 
)
static

Definition at line 3123 of file engine-gpg.c.

References add_arg(), add_data(), have_gpg_version(), and start().

◆ gpg_keylist_ext()

static gpgme_error_t gpg_keylist_ext ( void *  engine,
const char *  pattern[],
int  secret_only,
int  reserved,
gpgme_keylist_mode_t  mode,
int  engine_flags 
)
static

Definition at line 3096 of file engine-gpg.c.

References add_arg(), gpg_keylist_build_options(), and start().

◆ gpg_keylist_preprocess()

static gpgme_error_t gpg_keylist_preprocess ( char *  line,
char **  r_line 
)
static

Definition at line 2834 of file engine-gpg.c.

References NR_FIELDS.

Referenced by gpg_keylist_build_options().

◆ gpg_keysign()

static gpgme_error_t gpg_keysign ( void *  engine,
gpgme_key_t  key,
const char *  userid,
unsigned long  expire,
unsigned int  flags,
gpgme_ctx_t  ctx 
)
static

◆ gpg_new()

◆ gpg_passwd()

static gpgme_error_t gpg_passwd ( void *  engine,
gpgme_key_t  key,
unsigned int  flags 
)
static

Definition at line 1805 of file engine-gpg.c.

References add_arg(), and start().

◆ gpg_release()

◆ gpg_revsig()

static gpgme_error_t gpg_revsig ( void *  engine,
gpgme_key_t  key,
gpgme_key_t  signing_key,
const char *  userid,
unsigned int  flags 
)
static

Definition at line 3220 of file engine-gpg.c.

References add_arg(), add_arg_len(), add_arg_pfx(), have_gpg_version(), and start().

◆ gpg_set_colon_line_handler()

static gpgme_error_t gpg_set_colon_line_handler ( void *  engine,
engine_colon_line_handler_t  fnc,
void *  fnc_value 
)
static

◆ gpg_set_command_handler()

static gpgme_error_t gpg_set_command_handler ( void *  engine,
engine_command_handler_t  fnc,
void *  fnc_value 
)
static

◆ gpg_set_engine_flags()

◆ gpg_set_io_cbs()

static void gpg_set_io_cbs ( void *  engine,
gpgme_io_cbs_t  io_cbs 
)
static

Definition at line 3418 of file engine-gpg.c.

References engine_gpg::io_cbs.

◆ gpg_set_locale()

static gpgme_error_t gpg_set_locale ( void *  engine,
int  category,
const char *  value 
)
static

Definition at line 702 of file engine-gpg.c.

References engine_gpg::lc_ctype, engine_gpg::lc_messages, and value.

◆ gpg_set_pinentry_mode()

static gpgme_error_t gpg_set_pinentry_mode ( void *  engine,
gpgme_pinentry_mode_t  mode 
)
static

Definition at line 3427 of file engine-gpg.c.

References engine_gpg::pinentry_mode.

◆ gpg_set_status_cb()

static void gpg_set_status_cb ( void *  engine,
gpgme_status_cb_t  cb,
void *  cb_value 
)
static

Definition at line 749 of file engine-gpg.c.

References engine_gpg::mon_cb, engine_gpg::mon_cb_value, and engine_gpg::status.

◆ gpg_set_status_handler()

static void gpg_set_status_handler ( void *  engine,
engine_status_handler_t  fnc,
void *  fnc_value 
)
static

Definition at line 761 of file engine-gpg.c.

References engine_gpg::fnc, engine_gpg::fnc_value, and engine_gpg::status.

◆ gpg_setexpire()

static gpgme_error_t gpg_setexpire ( void *  engine,
gpgme_key_t  key,
unsigned long  expires,
const char *  subfprs,
unsigned int  reserved 
)
static

Definition at line 3482 of file engine-gpg.c.

◆ gpg_sign()

static gpgme_error_t gpg_sign ( void *  engine,
gpgme_data_t  in,
gpgme_data_t  out,
gpgme_sig_mode_t  mode,
int  use_armor,
int  use_textmode,
int  include_certs,
gpgme_ctx_t  ctx 
)
static

◆ gpg_tofu_policy()

static gpgme_error_t gpg_tofu_policy ( void *  engine,
gpgme_key_t  key,
gpgme_tofu_policy_t  policy 
)
static

Definition at line 3266 of file engine-gpg.c.

References add_arg(), have_gpg_version(), and start().

◆ gpg_verify()

static gpgme_error_t gpg_verify ( void *  engine,
gpgme_data_t  sig,
gpgme_data_t  signed_text,
gpgme_data_t  plaintext,
gpgme_ctx_t  ctx 
)
static

◆ have_gpg_version()

◆ read_colon_line()

◆ read_status()

◆ start()

◆ status_handler()

static gpgme_error_t status_handler ( void *  opaque,
int  fd 
)
static

◆ string_from_data()

static const char* string_from_data ( gpgme_data_t  data,
int  delim,
void **  helpptr,
gpgme_error_t *  r_err 
)
static

Definition at line 2659 of file engine-gpg.c.

References gpgme_data_read(), and MYBUFLEN.

Referenced by gpg_import().

Variable Documentation

◆ _gpgme_engine_ops_gpg

struct engine_ops _gpgme_engine_ops_gpg

Definition at line 3482 of file engine-gpg.c.