diff options
author | Werner Koch <[email protected]> | 2023-06-15 10:28:55 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2023-06-15 10:28:55 +0000 |
commit | e9c337c0b94b0db4c1bf8ce668477ff7675c0199 (patch) | |
tree | 46db06bea134cf89519dafe5fb641a29b16c8713 /sm/gpgsm.c | |
parent | gpgsm: Fix last commit (diff) | |
download | gnupg-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/gpgsm.c')
-rw-r--r-- | sm/gpgsm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sm/gpgsm.c b/sm/gpgsm.c index 07c3ff480..ad7652c7d 100644 --- a/sm/gpgsm.c +++ b/sm/gpgsm.c @@ -139,6 +139,7 @@ enum cmd_and_opt_values { oAssumeArmor, oAssumeBase64, oAssumeBinary, + oInputSizeHint, oBase64, oNoArmor, @@ -326,6 +327,7 @@ static gpgrt_opt_t opts[] = { N_("assume input is in base-64 format")), ARGPARSE_s_n (oAssumeBinary, "assume-binary", N_("assume input is in binary format")), + ARGPARSE_s_s (oInputSizeHint, "input-size-hint", "@"), ARGPARSE_header ("Output", N_("Options controlling the output")), @@ -1188,6 +1190,10 @@ main ( int argc, char **argv) ctrl.is_base64 = 0; break; + case oInputSizeHint: + ctrl.input_size_hint = string_to_u64 (pargs.r.ret_str); + break; + case oDisableCRLChecks: opt.no_crl_check = 1; break; |