More size_t fixes
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@128 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
a95ed6fc75
commit
fb4321ce0f
@ -179,8 +179,9 @@ static void print_tags_recursive(const u8 * buf0, const u8 * buf,
|
||||
const u8 *p = buf;
|
||||
|
||||
while (bytesleft >= 2) {
|
||||
int cla, tag, len, hlen;
|
||||
unsigned int cla, tag, hlen;
|
||||
const u8 *tagp = p;
|
||||
size_t len;
|
||||
|
||||
r = read_tag(&tagp, bytesleft, &cla, &tag, &len);
|
||||
if (r < 0) {
|
||||
|
@ -279,7 +279,7 @@ int sc_pkcs15_read_certificate(struct sc_pkcs15_card *p15card,
|
||||
|
||||
static int parse_x509_cert_info(struct sc_context *ctx,
|
||||
struct sc_pkcs15_cert_info *cert,
|
||||
const u8 ** buf, int *buflen)
|
||||
const u8 ** buf, size_t *buflen)
|
||||
{
|
||||
u8 id_value[128];
|
||||
int id_type, id_value_len = sizeof(id_value);
|
||||
@ -334,7 +334,8 @@ void sc_pkcs15_print_cert_info(const struct sc_pkcs15_cert_info *cert)
|
||||
static int get_certs_from_file(struct sc_pkcs15_card *card,
|
||||
struct sc_file *file)
|
||||
{
|
||||
int r, bytes_left;
|
||||
int r;
|
||||
size_t bytes_left;
|
||||
u8 buf[2048];
|
||||
const u8 *p = buf;
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
static int parse_pin_info(struct sc_context *ctx,
|
||||
struct sc_pkcs15_pin_info *pin,
|
||||
const u8 ** buf, int *buflen)
|
||||
const u8 ** buf, size_t *buflen)
|
||||
{
|
||||
int r;
|
||||
struct sc_asn1_struct asn1_com_ao_attr[] = {
|
||||
@ -98,7 +98,8 @@ void sc_pkcs15_print_pin_info(const struct sc_pkcs15_pin_info *pin)
|
||||
static int get_pins_from_file(struct sc_pkcs15_card *card,
|
||||
struct sc_file *file)
|
||||
{
|
||||
int r, bytes_left;
|
||||
int r;
|
||||
size_t bytes_left;
|
||||
u8 buf[2048];
|
||||
const u8 *p = buf;
|
||||
|
||||
|
@ -50,7 +50,7 @@ void sc_pkcs15_print_prkey_info(const struct sc_pkcs15_prkey_info *prkey)
|
||||
|
||||
static int parse_rsa_prkey_info(struct sc_context *ctx,
|
||||
struct sc_pkcs15_prkey_info *prkey,
|
||||
const u8 **buf, int *buflen)
|
||||
const u8 **buf, size_t *buflen)
|
||||
{
|
||||
int r;
|
||||
int usage_len = sizeof(prkey->usage);
|
||||
@ -95,7 +95,8 @@ static int parse_rsa_prkey_info(struct sc_context *ctx,
|
||||
static int get_prkeys_from_file(struct sc_pkcs15_card *card,
|
||||
struct sc_file *file)
|
||||
{
|
||||
int r, bytes_left;
|
||||
int r;
|
||||
size_t bytes_left;
|
||||
u8 buf[2048];
|
||||
const u8 *p = buf;
|
||||
|
||||
|
@ -163,7 +163,8 @@ static int parse_dir(const u8 * buf, size_t buflen, struct sc_pkcs15_card *card)
|
||||
static int parse_odf(const u8 * buf, int buflen, struct sc_pkcs15_card *card)
|
||||
{
|
||||
const u8 *p = buf;
|
||||
int r, left = buflen;
|
||||
size_t left = buflen;
|
||||
int r;
|
||||
struct sc_path path;
|
||||
struct sc_asn1_struct asn1_obj_or_path[] = {
|
||||
{ "path", SC_ASN1_PATH, SC_ASN1_CONS | SC_ASN1_SEQUENCE, 0, &path },
|
||||
|
Loading…
Reference in New Issue
Block a user