mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01:00
gpgsm: Fix storing of the serial number
* sm/certreqgen.c (create_request): Fix hex-bin conversion.
This commit is contained in:
parent
9274d4d182
commit
3f284e4050
@ -889,7 +889,7 @@ create_request (ctrl_t ctrl,
|
|||||||
*p++ = '0';
|
*p++ = '0';
|
||||||
strcpy (p, string);
|
strcpy (p, string);
|
||||||
for (p=hexbuf, len=0; p[0] && p[1]; p += 2)
|
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. */
|
/* Now build the S-expression. */
|
||||||
snprintf (numbuf, DIM(numbuf), "%u:", (unsigned int)len);
|
snprintf (numbuf, DIM(numbuf), "%u:", (unsigned int)len);
|
||||||
buf = p = xtrymalloc (1 + strlen (numbuf) + len + 1 + 1);
|
buf = p = xtrymalloc (1 + strlen (numbuf) + len + 1 + 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user