aboutsummaryrefslogtreecommitdiffstats
path: root/sm/decrypt.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2023-06-15 10:28:55 +0000
committerWerner Koch <[email protected]>2023-06-15 10:28:55 +0000
commite9c337c0b94b0db4c1bf8ce668477ff7675c0199 (patch)
tree46db06bea134cf89519dafe5fb641a29b16c8713 /sm/decrypt.c
parentgpgsm: Fix last commit (diff)
downloadgnupg-e9c337c0b94b0db4c1bf8ce668477ff7675c0199.tar.gz
gnupg-e9c337c0b94b0db4c1bf8ce668477ff7675c0199.zip
gpgsm: New option --input-size-hint.
* sm/gpgsm.c (oInputSizeHint): New. (opts): Add "--input-size-hint". (main): Set option. * sm/server.c (option_handler): Add option "input-size-hint". * sm/gpgsm.h (struct server_control_s): Add field input_size_hint. * sm/encrypt.c (gpgsm_encrypt): Set the toatl file size. * sm/decrypt.c (gpgsm_decrypt): Ditto. * sm/sign.c (gpgsm_sign): Ditto. * sm/verify.c (gpgsm_verify): Ditto. -- This option allows to set a value for the progress output line. Note that as of now there is no other way to set the file size. GnuPG-bug-id: 6534
Diffstat (limited to 'sm/decrypt.c')
-rw-r--r--sm/decrypt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sm/decrypt.c b/sm/decrypt.c
index abc1f2602..62983fe9c 100644
--- a/sm/decrypt.c
+++ b/sm/decrypt.c
@@ -1108,6 +1108,8 @@ gpgsm_decrypt (ctrl_t ctrl, int in_fd, estream_t out_fp)
}
gnupg_ksba_set_progress_cb (b64writer, gpgsm_progress_cb, ctrl);
+ if (ctrl->input_size_hint)
+ gnupg_ksba_set_total (b64writer, ctrl->input_size_hint);
rc = ksba_cms_new (&cms);
if (rc)