summaryrefslogtreecommitdiffstats
path: root/sm/server.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2023-06-15 12:28:55 +0200
committerWerner Koch <wk@gnupg.org>2023-06-15 12:28:55 +0200
commite9c337c0b94b0db4c1bf8ce668477ff7675c0199 (patch)
tree46db06bea134cf89519dafe5fb641a29b16c8713 /sm/server.c
parentgpgsm: Fix last commit (diff)
downloadgnupg2-e9c337c0b94b0db4c1bf8ce668477ff7675c0199.tar.xz
gnupg2-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/server.c')
-rw-r--r--sm/server.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sm/server.c b/sm/server.c
index 1510590a7..b545c1bfb 100644
--- a/sm/server.c
+++ b/sm/server.c
@@ -298,6 +298,10 @@ option_handler (assuan_context_t ctx, const char *key, const char *value)
opt.request_origin = i;
}
}
+ else if (!strcmp (key, "input-size-hint"))
+ {
+ ctrl->input_size_hint = string_to_u64 (value);
+ }
else
err = gpg_error (GPG_ERR_UNKNOWN_OPTION);