aboutsummaryrefslogtreecommitdiffstats
path: root/sm/certdump.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2008-09-04 10:35:41 +0000
committerWerner Koch <[email protected]>2008-09-04 10:35:41 +0000
commitd30fdae24b9549342183ac65cf1726f7ebcada9d (patch)
treedabb30909bff35568b33f45c3c5d4d2df61582b6 /sm/certdump.c
parentFix gpg-preset-passphrase bug. (diff)
downloadgnupg-d30fdae24b9549342183ac65cf1726f7ebcada9d.tar.gz
gnupg-d30fdae24b9549342183ac65cf1726f7ebcada9d.zip
Workaround for a mingw runtime bug.
Diffstat (limited to 'sm/certdump.c')
-rw-r--r--sm/certdump.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sm/certdump.c b/sm/certdump.c
index 91539017f..9dbd24566 100644
--- a/sm/certdump.c
+++ b/sm/certdump.c
@@ -979,7 +979,13 @@ gpgsm_format_keydesc (ksba_cert_t cert)
buffer = p = xtrymalloc (strlen (name) * 3 + 1);
for (s=name; *s; s++)
{
- if (*s < ' ' || *s == '+')
+ /* We also escape the quote character to work around a bug in
+ the mingw32 runtime which does not correcty handle command
+ line quoting. We correctly double the quote mark when
+ calling a program (i.e. gpg-protec-tool), but the pre-main
+ code does not notice the double quote as an escaped
+ quote. */
+ if (*s < ' ' || *s == '+' || *s == '\"')
{
sprintf (p, "%%%02X", *(unsigned char *)s);
p += 3;