diff options
| author | Werner Koch <[email protected]> | 2017-03-21 09:39:33 +0000 | 
|---|---|---|
| committer | Werner Koch <[email protected]> | 2017-03-21 09:39:33 +0000 | 
| commit | fab8b1a166fff7265d8a7a7acbbf5f30d26cc93c (patch) | |
| tree | e2f8f3f20fb025737cf7e43740d30db77604e0a0 /tests | |
| parent | core: New public API gpgme_op_keylist_from_data_start. (diff) | |
| download | gpgme-fab8b1a166fff7265d8a7a7acbbf5f30d26cc93c.tar.gz gpgme-fab8b1a166fff7265d8a7a7acbbf5f30d26cc93c.zip | |
core: New encryption flag GPGME_ENCRYPT_THROW_KEYIDS.
* src/gpgme.h.in (GPGME_ENCRYPT_THROW_KEYIDS): New flag.
* src/engine-gpg.c (gpg_encrypt): Implement flag
(gpg_encrypt_sign): Implement flag.
* tests/run-encrypt.c (main): New option --throw-keyids.
--
It would be nice to also selectively hide recipients (that is gpg
--hidden-recipient) but our API does not ye allow this because it is
based on key objects.  A possible way to implement that would be a API
to set processing flags into a key but this is complicated due to the
reference counting and thus the possibility that a key object is used
by different context.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
| -rw-r--r-- | tests/run-encrypt.c | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/tests/run-encrypt.c b/tests/run-encrypt.c index fd868368..c148e931 100644 --- a/tests/run-encrypt.c +++ b/tests/run-encrypt.c @@ -88,6 +88,7 @@ show_usage (int ex)           "  --uiserver       use the UI server\n"           "  --loopback       use a loopback pinentry\n"           "  --key NAME       encrypt to key NAME\n" +         "  --throw-keyids   use this option\n"           "  --symmetric      encrypt symmetric (OpenPGP only)\n"           , stderr);    exit (ex); @@ -170,6 +171,11 @@ main (int argc, char **argv)            keyargs[keycount++] = *argv;            argc--; argv++;          } +      else if (!strcmp (*argv, "--throw-keyids")) +        { +          flags |= GPGME_ENCRYPT_THROW_KEYIDS; +          argc--; argv++; +        }        else if (!strcmp (*argv, "--loopback"))          {            use_loopback = 1; | 
