aboutsummaryrefslogtreecommitdiffstats
path: root/g13
diff options
context:
space:
mode:
Diffstat (limited to 'g13')
-rw-r--r--g13/create.c4
-rw-r--r--g13/g13-common.h4
-rw-r--r--g13/g13.c10
-rw-r--r--g13/mount.c3
4 files changed, 19 insertions, 2 deletions
diff --git a/g13/create.c b/g13/create.c
index c4e94b830..91b290cd1 100644
--- a/g13/create.c
+++ b/g13/create.c
@@ -111,7 +111,9 @@ encrypt_keyblob (ctrl_t ctrl, void *keyblob, size_t keybloblen,
gpg_error_t err;
/* FIXME: For now we only implement OpenPGP. */
- err = gpg_encrypt_blob (ctrl, opt.gpg_program, keyblob, keybloblen, keys,
+ err = gpg_encrypt_blob (ctrl, opt.gpg_program, opt.gpg_arguments,
+ keyblob, keybloblen,
+ keys,
r_encblob, r_encbloblen);
return err;
diff --git a/g13/g13-common.h b/g13/g13-common.h
index f27dca4aa..316b94a73 100644
--- a/g13/g13-common.h
+++ b/g13/g13-common.h
@@ -30,6 +30,7 @@
#include "../common/util.h"
#include "../common/status.h"
#include "../common/session-env.h"
+#include "../common/strlist.h"
/* Debug values and macros. */
@@ -65,6 +66,9 @@ struct
filename. */
const char *gpg_program;
+ /* GPG arguments. XXX: Currently it is not possible to set them. */
+ strlist_t gpg_arguments;
+
/* Environment variables passed along to the engine. */
char *display;
char *ttyname;
diff --git a/g13/g13.c b/g13/g13.c
index e6c76130a..7fe207ac1 100644
--- a/g13/g13.c
+++ b/g13/g13.c
@@ -577,6 +577,16 @@ main ( int argc, char **argv)
}
}
+ /* XXX Construct GPG arguments. */
+ {
+ strlist_t last;
+ last = strlist_append (&opt.gpg_arguments, "-z");
+ last = strlist_append (&last, "0");
+ last = strlist_append (&last, "--trust-model");
+ last = strlist_append (&last, "always");
+ (void) last;
+ }
+
if (configfp)
{
fclose (configfp);
diff --git a/g13/mount.c b/g13/mount.c
index 1f7fbcc4c..e9b9c1be7 100644
--- a/g13/mount.c
+++ b/g13/mount.c
@@ -202,7 +202,8 @@ decrypt_keyblob (ctrl_t ctrl, const void *enckeyblob, size_t enckeybloblen,
gpg_error_t err;
/* FIXME: For now we only implement OpenPGP. */
- err = gpg_decrypt_blob (ctrl, opt.gpg_program, enckeyblob, enckeybloblen,
+ err = gpg_decrypt_blob (ctrl, opt.gpg_program, opt.gpg_arguments,
+ enckeyblob, enckeybloblen,
r_keyblob, r_keybloblen);
return err;