aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine-uiserver.c
diff options
context:
space:
mode:
authorIngo Klöcker <[email protected]>2023-12-14 09:59:47 +0000
committerIngo Klöcker <[email protected]>2023-12-19 12:07:45 +0000
commit0221d7f28a315d305409cf2dcae853c22ad94d31 (patch)
treef7ae74a09d54e224a69dd6689d30e79c643c02e7 /src/engine-uiserver.c
parentdoc: Fix documentation for creating encrypted/signed archive (diff)
downloadgpgme-0221d7f28a315d305409cf2dcae853c22ad94d31.tar.gz
gpgme-0221d7f28a315d305409cf2dcae853c22ad94d31.zip
core: Support direct encryption of file with gpg
* src/gpgme.h.in (GPGME_ENCRYPT_FILE): New encryption flag. * src/engine-gpg.c (gpg_encrypt, gpg_encrypt_sign): Check for incompatible flags. Pass filename instead of fd to gpg when new flag is set. * src/engine-gpgsm.c (gpgsm_encrypt): Return error if new flag is set. * src/engine-uiserver.c (uiserver_encrypt): Ditto. * tests/run-encrypt.c (show_usage): New option --direct-file-io. (main): Parse new option. Make gpg read the input file itself if the option is given. -- With this change the gpgme_op_encrypt* and gpgme_op_encrypt_sign* functions gain the possibility to make gpg read the data to (sign and) encrypt directly from a file instead of from an input FD to which it is written by gpgme. GnuPG-bug-id: 6550
Diffstat (limited to 'src/engine-uiserver.c')
-rw-r--r--src/engine-uiserver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/engine-uiserver.c b/src/engine-uiserver.c
index a298bec6..a116feb9 100644
--- a/src/engine-uiserver.c
+++ b/src/engine-uiserver.c
@@ -1145,7 +1145,7 @@ uiserver_encrypt (void *engine, gpgme_key_t recp[], const char *recpstring,
else
return gpgme_error (GPG_ERR_UNSUPPORTED_PROTOCOL);
- if (flags & GPGME_ENCRYPT_ARCHIVE)
+ if (flags & (GPGME_ENCRYPT_ARCHIVE | GPGME_ENCRYPT_FILE))
return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
if (flags & GPGME_ENCRYPT_PREPARE)