libopensc: authentIC: use macros; use common CPLC data type
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5440 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
e6a3d92de7
commit
c7ed3da502
@ -150,17 +150,4 @@ struct sc_authentic_sdo {
|
||||
unsigned magic;
|
||||
};
|
||||
|
||||
#define SC_MAX_AUTHENTIC_CPLC 45
|
||||
struct sc_authentic_cplc {
|
||||
unsigned char ic_data[4];
|
||||
unsigned char ic_serial[4];
|
||||
unsigned char ic_batch[4];
|
||||
unsigned char aid_last_bytes[2];
|
||||
unsigned char keyset_version;
|
||||
unsigned char starting_index;
|
||||
|
||||
unsigned char value[SC_MAX_AUTHENTIC_CPLC];
|
||||
size_t len;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -77,7 +77,7 @@ struct authentic_private_data {
|
||||
struct sc_pin_cmd_data pins[8];
|
||||
unsigned char pins_sha1[8][SHA_DIGEST_LENGTH];
|
||||
|
||||
struct sc_authentic_cplc cplc;
|
||||
struct sc_cplc cplc;
|
||||
};
|
||||
|
||||
static struct sc_atr_table authentic_known_atrs[] = {
|
||||
|
@ -370,7 +370,7 @@ iasecc_se_parse(struct sc_card *card, unsigned char *data, size_t data_len, stru
|
||||
if (offs != data_len)
|
||||
LOG_TEST_RET(ctx, SC_ERROR_INVALID_DATA, "parse error: not totaly parsed");
|
||||
|
||||
LOG_FUNC_RETURN(ctx, 0);
|
||||
LOG_FUNC_RETURN(ctx, SC_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
@ -455,7 +455,7 @@ iasecc_parse_chv(struct sc_card *card, unsigned char *data, size_t data_len, str
|
||||
offs += rv;
|
||||
}
|
||||
|
||||
LOG_FUNC_RETURN(ctx, 0);
|
||||
LOG_FUNC_RETURN(ctx, SC_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
@ -483,7 +483,7 @@ iasecc_parse_prvkey(struct sc_card *card, unsigned char *data, size_t data_len,
|
||||
offs += rv;
|
||||
}
|
||||
|
||||
LOG_FUNC_RETURN(ctx, 0);
|
||||
LOG_FUNC_RETURN(ctx, SC_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
@ -519,7 +519,7 @@ iasecc_parse_pubkey(struct sc_card *card, unsigned char *data, size_t data_len,
|
||||
offs += rv;
|
||||
}
|
||||
|
||||
LOG_FUNC_RETURN(ctx, 0);
|
||||
LOG_FUNC_RETURN(ctx, SC_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
@ -547,7 +547,7 @@ iasecc_parse_keyset(struct sc_card *card, unsigned char *data, size_t data_len,
|
||||
offs += rv;
|
||||
}
|
||||
|
||||
LOG_FUNC_RETURN(ctx, 0);
|
||||
LOG_FUNC_RETURN(ctx, SC_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
@ -609,7 +609,7 @@ iasecc_parse_docp(struct sc_card *card, unsigned char *data, size_t data_len, st
|
||||
rv = iasecc_parse_acls(card, &sdo->docp, 0);
|
||||
LOG_TEST_RET(ctx, rv, "Cannot parse ACLs in DOCP");
|
||||
|
||||
LOG_FUNC_RETURN(ctx, 0);
|
||||
LOG_FUNC_RETURN(ctx, SC_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
@ -739,7 +739,7 @@ iasecc_sdo_parse(struct sc_card *card, unsigned char *data, size_t data_len, str
|
||||
|
||||
sc_log(ctx, "docp.acls_contact.size %i, docp.size.size %i", sdo->docp.acls_contact.size, sdo->docp.size.size);
|
||||
|
||||
LOG_FUNC_RETURN(ctx, 0);
|
||||
LOG_FUNC_RETURN(ctx, SC_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
@ -770,7 +770,7 @@ iasecc_sdo_allocate_and_parse(struct sc_card *card, unsigned char *data, size_t
|
||||
sc_log(ctx, "sdo_class 0x%X, sdo_ref 0x%X", sdo->sdo_class, sdo->sdo_ref);
|
||||
if (data_len == 3) {
|
||||
*out = sdo;
|
||||
LOG_FUNC_RETURN(ctx, 0);
|
||||
LOG_FUNC_RETURN(ctx, SC_SUCCESS);
|
||||
}
|
||||
|
||||
size_size = iasecc_parse_size(data + 3, &size);
|
||||
@ -808,7 +808,7 @@ iasecc_update_blob(struct sc_context *ctx, struct iasecc_extended_tlv *tlv,
|
||||
int offs = 0, sz = tlv->size + 2;
|
||||
|
||||
if (tlv->size == 0)
|
||||
LOG_FUNC_RETURN(ctx, 0);
|
||||
LOG_FUNC_RETURN(ctx, SC_SUCCESS);
|
||||
|
||||
sz = tlv->size + 2;
|
||||
|
||||
@ -918,7 +918,7 @@ iasecc_encode_docp(struct sc_context *ctx, struct iasecc_sdo_docp *docp, unsigne
|
||||
*out_len = blob_size;
|
||||
}
|
||||
|
||||
LOG_FUNC_RETURN(ctx, 0);
|
||||
LOG_FUNC_RETURN(ctx, SC_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user