summaryrefslogtreecommitdiffstats
path: root/sm/certreqgen.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2011-12-06 16:45:46 +0100
committerWerner Koch <wk@gnupg.org>2011-12-06 16:45:46 +0100
commit3f284e40502d8181b0b3ea66c77cd7c1252ea781 (patch)
tree14a7cefd0b298a6bc91ddae37829d144ff1075a6 /sm/certreqgen.c
parentFix last change. (diff)
downloadgnupg2-3f284e40502d8181b0b3ea66c77cd7c1252ea781.tar.xz
gnupg2-3f284e40502d8181b0b3ea66c77cd7c1252ea781.zip
gpgsm: Fix storing of the serial number
* sm/certreqgen.c (create_request): Fix hex-bin conversion.
Diffstat (limited to '')
-rw-r--r--sm/certreqgen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sm/certreqgen.c b/sm/certreqgen.c
index 41a6d7f05..b4857b30f 100644
--- a/sm/certreqgen.c
+++ b/sm/certreqgen.c
@@ -889,7 +889,7 @@ create_request (ctrl_t ctrl,
*p++ = '0';
strcpy (p, string);
for (p=hexbuf, len=0; p[0] && p[1]; p += 2)
- ((unsigned char*)hexbuf)[len++] = xtoi_2 (s);
+ ((unsigned char*)hexbuf)[len++] = xtoi_2 (p);
/* Now build the S-expression. */
snprintf (numbuf, DIM(numbuf), "%u:", (unsigned int)len);
buf = p = xtrymalloc (1 + strlen (numbuf) + len + 1 + 1);