1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-06 23:17:47 +02:00

gpgsm: Fix storing of the serial number

* sm/certreqgen.c (create_request): Fix hex-bin conversion.
This commit is contained in:
Werner Koch 2011-12-06 16:45:46 +01:00
parent 9274d4d182
commit 3f284e4050

View File

@ -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);