aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gpgme.texi
diff options
context:
space:
mode:
authorIngo Klöcker <[email protected]>2023-01-23 11:17:22 +0000
committerIngo Klöcker <[email protected]>2023-01-23 11:17:22 +0000
commit419adf41afa40e5b34f646f2cb16d8aebda20048 (patch)
tree36bc59215f41a551f6dfeecd3fe5b4c975969c35 /doc/gpgme.texi
parentdoc: Update NEWS and API documentation (diff)
downloadgpgme-419adf41afa40e5b34f646f2cb16d8aebda20048.tar.gz
gpgme-419adf41afa40e5b34f646f2cb16d8aebda20048.zip
core: Allow setting the base directory when creating an archive
* src/engine-gpg.c (gpg_encrypt, gpg_encrypt_sign, gpg_sign): Pass file name set in data with --directory option to gpgtar. * tests/run-encrypt.c (show_usage): New option --directory. (main): Parse new option. Set file name of input data to option value. * tests/run-sign.c (show_usage): New option --directory. (main): Parse new option. Set file name of input data to option value. -- GnuPG-bug-id: 6342
Diffstat (limited to 'doc/gpgme.texi')
-rw-r--r--doc/gpgme.texi11
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/gpgme.texi b/doc/gpgme.texi
index 8b6106af..b8b90bb1 100644
--- a/doc/gpgme.texi
+++ b/doc/gpgme.texi
@@ -2199,6 +2199,11 @@ associated with the data object. The file name will be stored in the
output when encrypting or signing the data and will be returned to the
user when decrypting or verifying the output data.
+If a signed or encrypted archive is created, then the file name will be
+interpreted as the base directory for the relative paths of the files and
+directories to put into the archive. This corresponds to the --directory
+option of gpgtar.
+
The function returns the error code @code{GPG_ERR_INV_VALUE} if
@var{dh} is not a valid pointer and @code{GPG_ERR_ENOMEM} if not
enough memory is available.
@@ -6260,7 +6265,8 @@ If signature mode @code(GPGME_SIG_MODE_ARCHIVE) is requested, then a
signed archive is created from the files and directories given as
NUL-separated list in the data object @var{plain} and returned in the
data object @var{sig}. The paths of the files and directories have to
-be given as paths relative to the current working directory.
+be given as paths relative to the current working directory or relative
+to the base directory set with @code{gpgme_data_set_file_name}.
After the operation completed successfully, the result can be
retrieved with @code{gpgme_op_sign_result}.
@@ -6437,7 +6443,8 @@ If the flag @code(GPGME_ENCRYPT_ARCHIVE) is set, then an encrypted
archive is created from the files and directories given as NUL-separated
list in the data object @var{plain} and returned in the data object
@var{cipher}. The paths of the files and directories have to
-be given as paths relative to the current working directory.
+be given as paths relative to the current working directory or relative
+to the base directory set with @code{gpgme_data_set_file_name}.
@var{recp} must be a @code{NULL}-terminated array of keys. The user
must keep references for all keys during the whole duration of the