Changeset View
Changeset View
Standalone View
Standalone View
src/gpgme.c
Show First 20 Lines • Show All 243 Lines • ▼ Show 20 Lines | gpgme_release (gpgme_ctx_t ctx) | ||||
_gpgme_signers_clear (ctx); | _gpgme_signers_clear (ctx); | ||||
_gpgme_sig_notation_clear (ctx); | _gpgme_sig_notation_clear (ctx); | ||||
free (ctx->sender); | free (ctx->sender); | ||||
free (ctx->signers); | free (ctx->signers); | ||||
free (ctx->lc_ctype); | free (ctx->lc_ctype); | ||||
free (ctx->lc_messages); | free (ctx->lc_messages); | ||||
free (ctx->override_session_key); | free (ctx->override_session_key); | ||||
free (ctx->request_origin); | free (ctx->request_origin); | ||||
free (ctx->auto_key_locate); | |||||
_gpgme_engine_info_release (ctx->engine_info); | _gpgme_engine_info_release (ctx->engine_info); | ||||
ctx->engine_info = NULL; | ctx->engine_info = NULL; | ||||
DESTROY_LOCK (ctx->lock); | DESTROY_LOCK (ctx->lock); | ||||
free (ctx); | free (ctx); | ||||
} | } | ||||
void | void | ||||
▲ Show 20 Lines • Show All 281 Lines • ▼ Show 20 Lines | gpgme_set_ctx_flag (gpgme_ctx_t ctx, const char *name, const char *value) | ||||
else if (!strcmp (name, "no-symkey-cache")) | else if (!strcmp (name, "no-symkey-cache")) | ||||
{ | { | ||||
ctx->no_symkey_cache = abool; | ctx->no_symkey_cache = abool; | ||||
} | } | ||||
else if (!strcmp (name, "ignore-mdc-error")) | else if (!strcmp (name, "ignore-mdc-error")) | ||||
{ | { | ||||
ctx->ignore_mdc_error = abool; | ctx->ignore_mdc_error = abool; | ||||
} | } | ||||
else if (!strcmp (name, "auto-key-locate")) | |||||
{ | |||||
free (ctx->auto_key_locate); | |||||
ctx->auto_key_locate = strdup (value); | |||||
if (!ctx->auto_key_locate) | |||||
err = gpg_error_from_syserror (); | |||||
} | |||||
else | else | ||||
err = gpg_error (GPG_ERR_UNKNOWN_NAME); | err = gpg_error (GPG_ERR_UNKNOWN_NAME); | ||||
return err; | return err; | ||||
} | } | ||||
/* Get the context flag named NAME. See gpgme_set_ctx_flag for a list | /* Get the context flag named NAME. See gpgme_set_ctx_flag for a list | ||||
Show All 37 Lines | gpgme_get_ctx_flag (gpgme_ctx_t ctx, const char *name) | ||||
else if (!strcmp (name, "no-symkey-cache")) | else if (!strcmp (name, "no-symkey-cache")) | ||||
{ | { | ||||
return ctx->no_symkey_cache? "1":""; | return ctx->no_symkey_cache? "1":""; | ||||
} | } | ||||
else if (!strcmp (name, "ignore-mdc-error")) | else if (!strcmp (name, "ignore-mdc-error")) | ||||
{ | { | ||||
return ctx->ignore_mdc_error? "1":""; | return ctx->ignore_mdc_error? "1":""; | ||||
} | } | ||||
else if (!strcmp (name, "auto-key-locate")) | |||||
{ | |||||
return ctx->auto_key_locate? ctx->auto_key_locate : ""; | |||||
} | |||||
else | else | ||||
return NULL; | return NULL; | ||||
} | } | ||||
/* Enable or disable the use of the special textmode. Textmode is for | /* Enable or disable the use of the special textmode. Textmode is for | ||||
example used for the RFC2015 signatures; note that the updated RFC | example used for the RFC2015 signatures; note that the updated RFC | ||||
3156 mandates that the MUA does some preparations so that textmode | 3156 mandates that the MUA does some preparations so that textmode | ||||
▲ Show 20 Lines • Show All 664 Lines • Show Last 20 Lines |