aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpgme.c
diff options
context:
space:
mode:
authorBen Kibbey <[email protected]>2015-08-15 00:56:14 +0000
committerBen Kibbey <[email protected]>2015-08-15 00:56:14 +0000
commitaa89252256fc87d637d3793a1fabdbee207967a4 (patch)
treeb5a325d3120370417498981db36cc3c1b3293cae /src/gpgme.c
parentParse the INQUIRE_MAXLEN status message. (diff)
parentAlso check the return code in gpg_sign(). (diff)
downloadgpgme-bjk/passphrase-inquire.tar.gz
gpgme-bjk/passphrase-inquire.zip
Merge branch 'master' into passphrase-inquirebjk/passphrase-inquire
Diffstat (limited to 'src/gpgme.c')
-rw-r--r--src/gpgme.c24
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. */