diff options
Diffstat (limited to 'tests/run-export.c')
-rw-r--r-- | tests/run-export.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/run-export.c b/tests/run-export.c index 623c7331..f071b8c2 100644 --- a/tests/run-export.c +++ b/tests/run-export.c @@ -128,6 +128,11 @@ main (int argc, char **argv) mode |= GPGME_EXPORT_MODE_SECRET; argc--; argv++; } + else if (!strcmp (*argv, "--secret-subkey")) + { + mode |= GPGME_EXPORT_MODE_SECRET_SUBKEY; + argc--; argv++; + } else if (!strcmp (*argv, "--raw")) { mode |= GPGME_EXPORT_MODE_RAW; @@ -168,6 +173,16 @@ main (int argc, char **argv) err = gpgme_op_export_ext (ctx, (const char**)argv, mode, out); fail_if_err (err); } + else if ((mode & GPGME_EXPORT_MODE_SECRET_SUBKEY)) + { + keyarray[0] = NULL; + + printf ("exporting secret subkeys!\n"); + + gpgme_set_armor (ctx, 1); + err = gpgme_op_export_ext (ctx, (const char**)argv, mode, out); + fail_if_err (err); + } else { /* Lookup the keys as required by the export_keys function. */ |