aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/run-decrypt.c17
-rw-r--r--tests/run-verify.c16
2 files changed, 33 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
diff --git a/tests/run-verify.c b/tests/run-verify.c
index 13efd89f..b4f2e06f 100644
--- a/tests/run-verify.c
+++ b/tests/run-verify.c
@@ -242,6 +242,7 @@ show_usage (int ex)
" --diagnostics print diagnostics\n"
" --direct-file-io pass file names instead of streams with content of files to backend\n"
" --proc-all-sigs pass this option to gpg\n"
+ " --known-notations STRING Parse STRING and pass to gpg\n"
, stderr);
exit (ex);
}
@@ -258,6 +259,7 @@ main (int argc, char **argv)
const char *sender = NULL;
const char *output = NULL;
const char *directory = NULL;
+ const char *known_notations = NULL;
int auto_key_retrieve = 0;
int auto_key_import = 0;
gpgme_data_encoding_t encoding = GPGME_DATA_ENCODING_NONE;
@@ -367,6 +369,14 @@ main (int argc, char **argv)
proc_all_sigs = 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);
@@ -441,6 +451,12 @@ main (int argc, char **argv)
}
}
+ if (known_notations)
+ {
+ err = gpgme_set_ctx_flag (ctx, "known-notations", known_notations);
+ fail_if_err (err);
+ }
+
if (auto_key_import)
{
gpgme_set_ctx_flag (ctx, "auto-key-import", "1");