pkcs15: remove unused variables
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5057 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
82adc9361e
commit
cb5b141391
|
@ -485,8 +485,6 @@ static int
|
||||||
authentic_erase_binary(struct sc_card *card, unsigned int offs, size_t count, unsigned long flags)
|
authentic_erase_binary(struct sc_card *card, unsigned int offs, size_t count, unsigned long flags)
|
||||||
{
|
{
|
||||||
struct sc_context *ctx = card->ctx;
|
struct sc_context *ctx = card->ctx;
|
||||||
struct sc_apdu *apdus = NULL, *cur_apdu = NULL;
|
|
||||||
size_t sz, rest;
|
|
||||||
int rv;
|
int rv;
|
||||||
unsigned char *buf_zero = NULL;
|
unsigned char *buf_zero = NULL;
|
||||||
|
|
||||||
|
@ -1375,7 +1373,7 @@ authentic_pin_verify(struct sc_card *card, struct sc_pin_cmd_data *pin_cmd)
|
||||||
if (pin_cmd->pin1.data)
|
if (pin_cmd->pin1.data)
|
||||||
SHA1(pin_cmd->pin1.data, pin_cmd->pin1.len, pin_sha1);
|
SHA1(pin_cmd->pin1.data, pin_cmd->pin1.len, pin_sha1);
|
||||||
else
|
else
|
||||||
SHA1("", 0, pin_sha1);
|
SHA1((unsigned char *)"", 0, pin_sha1);
|
||||||
|
|
||||||
if (!memcmp(pin_sha1, prv_data->pins_sha1[pin_cmd->pin_reference], SHA_DIGEST_LENGTH)) {
|
if (!memcmp(pin_sha1, prv_data->pins_sha1[pin_cmd->pin_reference], SHA_DIGEST_LENGTH)) {
|
||||||
sc_log(ctx, "Already verified");
|
sc_log(ctx, "Already verified");
|
||||||
|
@ -1953,7 +1951,6 @@ authentic_manage_sdo(struct sc_card *card, struct sc_authentic_sdo *sdo, unsigne
|
||||||
{
|
{
|
||||||
struct sc_context *ctx = card->ctx;
|
struct sc_context *ctx = card->ctx;
|
||||||
struct sc_apdu apdu;
|
struct sc_apdu apdu;
|
||||||
unsigned char rbuf[0x400];
|
|
||||||
unsigned char *data = NULL;
|
unsigned char *data = NULL;
|
||||||
size_t data_len = 0, save_max_send = card->max_send_size;
|
size_t data_len = 0, save_max_send = card->max_send_size;
|
||||||
int rv;
|
int rv;
|
||||||
|
|
|
@ -18,7 +18,9 @@
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -258,9 +260,6 @@ static const struct sc_asn1_entry c_asn1_ddo[] = {
|
||||||
|
|
||||||
static void fix_authentic_ddo(struct sc_pkcs15_card *p15card)
|
static void fix_authentic_ddo(struct sc_pkcs15_card *p15card)
|
||||||
{
|
{
|
||||||
struct sc_context *ctx = p15card->card->ctx;
|
|
||||||
struct sc_path tmp_path;
|
|
||||||
|
|
||||||
/* AuthentIC v3.2 card has invalid ODF and tokenInfo paths encoded into DDO.
|
/* AuthentIC v3.2 card has invalid ODF and tokenInfo paths encoded into DDO.
|
||||||
* Cleanup this attributes -- default values must be OK.
|
* Cleanup this attributes -- default values must be OK.
|
||||||
*/
|
*/
|
||||||
|
@ -698,18 +697,21 @@ static struct sc_app_info *sc_dup_app_info(const struct sc_app_info *info)
|
||||||
|
|
||||||
static int sc_pkcs15_bind_internal(sc_pkcs15_card_t *p15card, struct sc_aid *aid)
|
static int sc_pkcs15_bind_internal(sc_pkcs15_card_t *p15card, struct sc_aid *aid)
|
||||||
{
|
{
|
||||||
unsigned char *buf = NULL;
|
|
||||||
int err, ok = 0, ii;
|
|
||||||
size_t len;
|
|
||||||
sc_path_t tmppath;
|
sc_path_t tmppath;
|
||||||
sc_card_t *card = p15card->card;
|
sc_card_t *card = p15card->card;
|
||||||
sc_context_t *ctx = card->ctx;
|
sc_context_t *ctx = card->ctx;
|
||||||
sc_pkcs15_tokeninfo_t tokeninfo;
|
sc_pkcs15_tokeninfo_t tokeninfo;
|
||||||
sc_pkcs15_df_t *df;
|
sc_pkcs15_df_t *df;
|
||||||
const sc_app_info_t *info = NULL;
|
const sc_app_info_t *info = NULL;
|
||||||
|
unsigned char *buf = NULL;
|
||||||
|
size_t len;
|
||||||
|
int err, ok = 0;
|
||||||
|
|
||||||
SC_FUNC_CALLED(ctx, SC_LOG_DEBUG_NORMAL);
|
SC_FUNC_CALLED(ctx, SC_LOG_DEBUG_NORMAL);
|
||||||
|
|
||||||
|
err = sc_parse_ef_atr(card);
|
||||||
|
SC_TEST_RET(ctx, SC_LOG_DEBUG_NORMAL, err, "Failed to parse EF(ATR) content");
|
||||||
|
|
||||||
/* Enumerate apps now */
|
/* Enumerate apps now */
|
||||||
if (card->app_count < 0) {
|
if (card->app_count < 0) {
|
||||||
err = sc_enum_apps(card);
|
err = sc_enum_apps(card);
|
||||||
|
|
Loading…
Reference in New Issue