aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gpgme.texi
diff options
context:
space:
mode:
authorIngo Klöcker <[email protected]>2023-06-21 12:20:52 +0000
committerIngo Klöcker <[email protected]>2023-06-21 12:38:50 +0000
commit1a9f192ab450288aea7a889527e78afd2c067b59 (patch)
tree7a26822f3ba236ffe96509c47da8308f3fab1296 /doc/gpgme.texi
parentqt: Support writing signed/encrypted archives directly to a file (diff)
downloadgpgme-1a9f192ab450288aea7a889527e78afd2c067b59.tar.gz
gpgme-1a9f192ab450288aea7a889527e78afd2c067b59.zip
core: Support reading the archive to decrypt/verify directly from a file
* src/engine-gpg.c (add_file_name_arg_or_data): New. (gpg_decrypt): Use add_file_name_arg_or_data instead of add_data for the ciphertext. (gpg_verify): Use add_file_name_arg_or_data instead of add_data for the signature and the signed text. * tests/run-decrypt.c (show_usage): New option --direct-file-io. (main): Parse new option. If option is given, then don't open input file, create simple data object instead of data object from stream and set input file name on input data. * tests/run-verify.c (show_usage): New option --direct-file-io. (main): Parse new option. If option is given, then don't open input files, create simple data objects instead of data objects from stream and set input file names on input data objects. -- This change makes it possible to tell gpg (and gpgtar) to read the input (i.e. the signed/encrypted data or the signature or the created archive) directly from the files with given file names instead of from streams piped through GpgME's Data IO. GnuPG-bug-id: 6530
Diffstat (limited to 'doc/gpgme.texi')
-rw-r--r--doc/gpgme.texi10
1 files changed, 7 insertions, 3 deletions
diff --git a/doc/gpgme.texi b/doc/gpgme.texi
index cf0525fc..fb604f30 100644
--- a/doc/gpgme.texi
+++ b/doc/gpgme.texi
@@ -5592,8 +5592,9 @@ An error code describing the reason why the key was found invalid.
@deftypefun gpgme_error_t gpgme_op_decrypt (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_data_t @var{cipher}}, @w{gpgme_data_t @var{plain}})
The function @code{gpgme_op_decrypt} decrypts the ciphertext in the
-data object @var{cipher} and stores it into the data object
-@var{plain}.
+data object @var{cipher} or, if a file name is set on the data object,
+the ciphertext stored in the corresponding file. The decrypted
+ciphertext is stored into the data object @var{plain}.
The function returns the error code @code{GPG_ERR_NO_ERROR} if the
ciphertext could be decrypted successfully, @code{GPG_ERR_INV_VALUE}
@@ -5806,7 +5807,10 @@ detached signature, then the signed text should be provided in
Otherwise, if @var{sig} is a normal (or cleartext) signature,
@var{signed_text} should be a null pointer and @var{plain} should be a
writable data object that will contain the plaintext after successful
-verification.
+verification. If a file name is set on the data object @var{sig} (or
+on the data object @var{signed_text}), then the data of the signature
+(resp. the data of the signed text) is not read from the data object
+but from the file with the given file name.
The results of the individual signature verifications can be retrieved
with @code{gpgme_op_verify_result}.