diff options
Diffstat (limited to 'tests/run-decrypt.c')
-rw-r--r-- | tests/run-decrypt.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/run-decrypt.c b/tests/run-decrypt.c index 6869f4d5..c724e407 100644 --- a/tests/run-decrypt.c +++ b/tests/run-decrypt.c @@ -97,6 +97,7 @@ show_usage (int ex) " --directory DIR extract the files into the directory DIR\n" " --diagnostics print diagnostics\n" " --direct-file-io pass FILE instead of stream with content of FILE to backend\n" + " --known-notations STRING Parse STRING and pass to gpg\n" , stderr); exit (ex); } @@ -120,6 +121,7 @@ main (int argc, char **argv) const char *request_origin = NULL; const char *output = NULL; const char *directory = NULL; + const char *known_notations = NULL; int no_symkey_cache = 0; int ignore_mdc_error = 0; int raw_output = 0; @@ -239,6 +241,14 @@ main (int argc, char **argv) direct_file_io = 1; argc--; argv++; } + else if (!strcmp (*argv, "--known-notations")) + { + argc--; argv++; + if (!argc) + show_usage (1); + known_notations = *argv; + argc--; argv++; + } else if (!strncmp (*argv, "--", 2)) show_usage (1); @@ -324,6 +334,13 @@ main (int argc, char **argv) } } + if (known_notations) + { + err = gpgme_set_ctx_flag (ctx, "known-notations", known_notations); + fail_if_err (err); + } + + if (direct_file_io) err = gpgme_data_new (&in); else |