diff options
| author | Ben Kibbey <[email protected]> | 2015-08-15 00:56:14 +0000 | 
|---|---|---|
| committer | Ben Kibbey <[email protected]> | 2015-08-15 00:56:14 +0000 | 
| commit | aa89252256fc87d637d3793a1fabdbee207967a4 (patch) | |
| tree | b5a325d3120370417498981db36cc3c1b3293cae /src/gpgme.c | |
| parent | Parse the INQUIRE_MAXLEN status message. (diff) | |
| parent | Also check the return code in gpg_sign(). (diff) | |
| download | gpgme-aa89252256fc87d637d3793a1fabdbee207967a4.tar.gz gpgme-aa89252256fc87d637d3793a1fabdbee207967a4.zip | |
Merge branch 'master' into passphrase-inquirebjk/passphrase-inquire
Diffstat (limited to '')
| -rw-r--r-- | src/gpgme.c | 24 | 
1 files changed, 24 insertions, 0 deletions
| diff --git a/src/gpgme.c b/src/gpgme.c index ac2c95e1..9c09827e 100644 --- a/src/gpgme.c +++ b/src/gpgme.c @@ -472,6 +472,30 @@ gpgme_get_textmode (gpgme_ctx_t ctx)  } +/* Enable offline mode for this context. In offline mode dirmngr +  will be disabled. */ +void +gpgme_set_offline (gpgme_ctx_t ctx, int offline) +{ +  TRACE2 (DEBUG_CTX, "gpgme_set_offline", ctx, "offline=%i (%s)", +          offline, offline ? "yes" : "no"); + +  if (!ctx) +    return; + +  ctx->offline = offline; +} + +/* Return the state of the offline flag.  */ +int +gpgme_get_offline (gpgme_ctx_t ctx) +{ +  TRACE2 (DEBUG_CTX, "gpgme_get_offline", ctx, "ctx->offline=%i (%s)", +          ctx->offline, ctx->offline ? "yes" : "no"); +  return ctx->offline; +} + +  /* Set the number of certifications to include in an S/MIME message.     The default is GPGME_INCLUDE_CERTS_DEFAULT.  -1 means all certs,     and -2 means all certs except the root cert.  */ | 
