mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-18 14:17:03 +01:00
scd: fix for 64-bit arch.
* agent/pksign.c (agent_pksign_do): Use int. * scd/app-openpgp.c (get_public_key): Likewise. -- On 64-bit architecture, int and size_t might be different. For the first argument for '%b', int is expected.
This commit is contained in:
parent
87a218c3bf
commit
bb5a1b7c73
@ -363,12 +363,13 @@ agent_pksign_do (ctrl_t ctrl, const char *cache_nonce,
|
|||||||
*buf = 0;
|
*buf = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = gcry_sexp_build (&s_sig, NULL, "(sig-val(rsa(s%b)))", len, buf);
|
rc = gcry_sexp_build (&s_sig, NULL, "(sig-val(rsa(s%b)))",
|
||||||
|
(int)len, buf);
|
||||||
}
|
}
|
||||||
else if (is_EdDSA)
|
else if (is_EdDSA)
|
||||||
{
|
{
|
||||||
rc = gcry_sexp_build (&s_sig, NULL, "(sig-val(eddsa(r%b)(s%b)))",
|
rc = gcry_sexp_build (&s_sig, NULL, "(sig-val(eddsa(r%b)(s%b)))",
|
||||||
len/2, buf, len/2, buf + len/2);
|
(int)len/2, buf, (int)len/2, buf + len/2);
|
||||||
}
|
}
|
||||||
else if (is_ECDSA)
|
else if (is_ECDSA)
|
||||||
{
|
{
|
||||||
|
@ -1496,7 +1496,7 @@ get_public_key (app_t app, int keyno)
|
|||||||
if (app->app_local->keyattr[keyno].key_type == KEY_TYPE_RSA)
|
if (app->app_local->keyattr[keyno].key_type == KEY_TYPE_RSA)
|
||||||
{
|
{
|
||||||
err = gcry_sexp_build (&s_pkey, NULL, "(public-key(rsa(n%b)(e%b)))",
|
err = gcry_sexp_build (&s_pkey, NULL, "(public-key(rsa(n%b)(e%b)))",
|
||||||
mlen, mbuf, elen, ebuf);
|
(int)mlen, mbuf, (int)elen, ebuf);
|
||||||
if (err)
|
if (err)
|
||||||
goto leave;
|
goto leave;
|
||||||
|
|
||||||
@ -1518,7 +1518,7 @@ get_public_key (app_t app, int keyno)
|
|||||||
|
|
||||||
err = gcry_sexp_build (&s_pkey, NULL,
|
err = gcry_sexp_build (&s_pkey, NULL,
|
||||||
"(public-key(ecc(curve%s)(q%b)))",
|
"(public-key(ecc(curve%s)(q%b)))",
|
||||||
curve_name, mlen, mbuf);
|
curve_name, (int)mlen, mbuf);
|
||||||
if (err)
|
if (err)
|
||||||
goto leave;
|
goto leave;
|
||||||
|
|
||||||
@ -1541,7 +1541,7 @@ get_public_key (app_t app, int keyno)
|
|||||||
|
|
||||||
err = gcry_sexp_build (&s_pkey, NULL,
|
err = gcry_sexp_build (&s_pkey, NULL,
|
||||||
"(public-key(ecc(curve%s)(flags eddsa)(q%b)))",
|
"(public-key(ecc(curve%s)(flags eddsa)(q%b)))",
|
||||||
curve_name, mlen, mbuf);
|
curve_name, (int)mlen, mbuf);
|
||||||
if (err)
|
if (err)
|
||||||
goto leave;
|
goto leave;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user