aboutsummaryrefslogtreecommitdiffstats
path: root/common/util.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2019-01-24 09:02:52 +0000
committerWerner Koch <[email protected]>2019-01-24 09:02:52 +0000
commit055f8854d3f49b8d06105d20f344f5ac10e4f6a6 (patch)
tree1201e7f05fd4faf50989340590475be395034a7e /common/util.h
parentscd: Support PASSWD --clear for OpenPGP card. (diff)
downloadgnupg-055f8854d3f49b8d06105d20f344f5ac10e4f6a6.tar.gz
gnupg-055f8854d3f49b8d06105d20f344f5ac10e4f6a6.zip
common: Extend function percent_data_escape.
* common/percent.c (percent_data_escape): Add new args prefix and plus_escape. * agent/command.c (cmd_put_secret): Adjust for changed function * common/t-percent.c (test_percent_data_escape): Extend test for the prefix. (test_percent_data_escape_plus): new test for the plus escaping. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'common/util.h')
-rw-r--r--common/util.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/util.h b/common/util.h
index 682415d92..d3a846f00 100644
--- a/common/util.h
+++ b/common/util.h
@@ -201,7 +201,8 @@ char *hex2str_alloc (const char *hexstring, size_t *r_count);
/*-- percent.c --*/
char *percent_plus_escape (const char *string);
-char *percent_data_escape (const void *data, size_t datalen);
+char *percent_data_escape (int plus, const char *prefix,
+ const void *data, size_t datalen);
char *percent_plus_unescape (const char *string, int nulrepl);
char *percent_unescape (const char *string, int nulrepl);