mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gcc-4 defaults forced me to edit many many files to get rid of the
char * vs. unsigned char * warnings. The GNU coding standards used to say that these mismatches are okay and better than a bunch of casts. Obviously this has changed now.
This commit is contained in:
parent
3370164182
commit
deeba405a9
69 changed files with 558 additions and 348 deletions
|
@ -153,7 +153,7 @@ iso7816_select_file (int slot, int tag, int is_dir,
|
|||
p0 = (tag == 0x3F00)? 0: is_dir? 1:2;
|
||||
p1 = 0x0c; /* No FC return. */
|
||||
sw = apdu_send_simple (slot, 0x00, CMD_SELECT_FILE,
|
||||
p0, p1, 2, tagbuf );
|
||||
p0, p1, 2, (char*)tagbuf );
|
||||
return map_sw (sw);
|
||||
}
|
||||
|
||||
|
@ -285,7 +285,7 @@ iso7816_put_data (int slot, int tag,
|
|||
|
||||
sw = apdu_send_simple (slot, 0x00, CMD_PUT_DATA,
|
||||
((tag >> 8) & 0xff), (tag & 0xff),
|
||||
datalen, data);
|
||||
datalen, (const char*)data);
|
||||
return map_sw (sw);
|
||||
}
|
||||
|
||||
|
@ -303,7 +303,7 @@ iso7816_manage_security_env (int slot, int p1, int p2,
|
|||
return gpg_error (GPG_ERR_INV_VALUE);
|
||||
|
||||
sw = apdu_send_simple (slot, 0x00, CMD_MSE, p1, p2,
|
||||
data? datalen : -1, data);
|
||||
data? datalen : -1, (const char*)data);
|
||||
return map_sw (sw);
|
||||
}
|
||||
|
||||
|
@ -323,7 +323,7 @@ iso7816_compute_ds (int slot, const unsigned char *data, size_t datalen,
|
|||
*result = NULL;
|
||||
*resultlen = 0;
|
||||
|
||||
sw = apdu_send (slot, 0x00, CMD_PSO, 0x9E, 0x9A, datalen, data,
|
||||
sw = apdu_send (slot, 0x00, CMD_PSO, 0x9E, 0x9A, datalen, (const char*)data,
|
||||
result, resultlen);
|
||||
if (sw != SW_SUCCESS)
|
||||
{
|
||||
|
@ -364,13 +364,15 @@ iso7816_decipher (int slot, const unsigned char *data, size_t datalen,
|
|||
|
||||
*buf = padind; /* Padding indicator. */
|
||||
memcpy (buf+1, data, datalen);
|
||||
sw = apdu_send (slot, 0x00, CMD_PSO, 0x80, 0x86, datalen+1, buf,
|
||||
sw = apdu_send (slot, 0x00, CMD_PSO, 0x80, 0x86,
|
||||
datalen+1, (char*)buf,
|
||||
result, resultlen);
|
||||
xfree (buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
sw = apdu_send (slot, 0x00, CMD_PSO, 0x80, 0x86, datalen, data,
|
||||
sw = apdu_send (slot, 0x00, CMD_PSO, 0x80, 0x86,
|
||||
datalen, (const char *)data,
|
||||
result, resultlen);
|
||||
}
|
||||
if (sw != SW_SUCCESS)
|
||||
|
@ -399,7 +401,7 @@ iso7816_internal_authenticate (int slot,
|
|||
*resultlen = 0;
|
||||
|
||||
sw = apdu_send (slot, 0x00, CMD_INTERNAL_AUTHENTICATE, 0, 0,
|
||||
datalen, data, result, resultlen);
|
||||
datalen, (const char*)data, result, resultlen);
|
||||
if (sw != SW_SUCCESS)
|
||||
{
|
||||
/* Make sure that pending buffers are released. */
|
||||
|
@ -426,7 +428,7 @@ do_generate_keypair (int slot, int readonly,
|
|||
*resultlen = 0;
|
||||
|
||||
sw = apdu_send (slot, 0x00, CMD_GENERATE_KEYPAIR, readonly? 0x81:0x80, 0,
|
||||
datalen, data, result, resultlen);
|
||||
datalen, (const char*)data, result, resultlen);
|
||||
if (sw != SW_SUCCESS)
|
||||
{
|
||||
/* Make sure that pending buffers are released. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue