mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-02 12:01:32 +01:00
sm: Fix card access.
* sm/call-agent.c (gpgsm_scd_pksign): Cast to integer for %b. -- This fix is needed on big endian machine where size_t is bigger than integer. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
c51a568555
commit
37d758e5f2
@ -409,19 +409,19 @@ gpgsm_scd_pksign (ctrl_t ctrl, const char *keyid, const char *desc,
|
||||
{
|
||||
case GCRY_PK_RSA:
|
||||
rc = gcry_sexp_build (&sig, NULL, "(sig-val(rsa(s%b)))",
|
||||
sigbuflen, sigbuf);
|
||||
(int)sigbuflen, sigbuf);
|
||||
break;
|
||||
|
||||
case GCRY_PK_ECC:
|
||||
rc = gcry_sexp_build (&sig, NULL, "(sig-val(ecdsa(r%b)(s%b)))",
|
||||
sigbuflen/2, sigbuf,
|
||||
sigbuflen/2, sigbuf + sigbuflen/2);
|
||||
(int)sigbuflen/2, sigbuf,
|
||||
(int)sigbuflen/2, sigbuf + sigbuflen/2);
|
||||
break;
|
||||
|
||||
case GCRY_PK_EDDSA:
|
||||
rc = gcry_sexp_build (&sig, NULL, "(sig-val(eddsa(r%b)(s%b)))",
|
||||
sigbuflen/2, sigbuf,
|
||||
sigbuflen/2, sigbuf + sigbuflen/2);
|
||||
(int)sigbuflen/2, sigbuf,
|
||||
(int)sigbuflen/2, sigbuf + sigbuflen/2);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user