diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/context.h | 5 | ||||
| -rw-r--r-- | src/gpgme.c | 13 | 
2 files changed, 16 insertions, 2 deletions
| diff --git a/src/context.h b/src/context.h index 078f0cbd..de69a7a6 100644 --- a/src/context.h +++ b/src/context.h @@ -105,6 +105,11 @@ struct gpgme_context     * lines.  */    unsigned int full_status : 1; +  /* The Tofu info has a human readable string which is presented to +   * the user in a directly usable format.  By enabling this flag the +   * unmodified string, as received form gpg, will be returned.  */ +  unsigned int raw_description : 1; +    /* Flags for keylist mode.  */    gpgme_keylist_mode_t keylist_mode; diff --git a/src/gpgme.c b/src/gpgme.c index 3289be9d..e0cd9b05 100644 --- a/src/gpgme.c +++ b/src/gpgme.c @@ -93,11 +93,20 @@ gpgme_set_global_flag (const char *name, const char *value)  gpgme_error_t  gpgme_set_ctx_flag (gpgme_ctx_t ctx, const char *name, const char *value)  { +  int abool; +    if (!ctx || !name || !value)      return gpg_error (GPG_ERR_INV_VALUE); -  else if (!strcmp (name, "full-status")) + +  abool = *value? !!atoi (value) : 0; + +  if (!strcmp (name, "full-status")) +    { +      ctx->full_status = abool; +    } +  else if (!strcmp (name, "raw-description"))      { -      ctx->full_status = *value? !!atoi (value) : 0; +      ctx->raw_description = abool;      }    else      return gpg_error (GPG_ERR_UNKNOWN_NAME); | 
