libopensc: procedure to log the card's cache
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5069 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
8ee55a38b3
commit
2244d0c96f
|
@ -961,3 +961,28 @@ scconf_block *sc_get_conf_block(sc_context_t *ctx, const char *name1, const char
|
||||||
return conf_block;
|
return conf_block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sc_print_cache(struct sc_card *card) {
|
||||||
|
struct sc_context *ctx = NULL;
|
||||||
|
|
||||||
|
assert(card != NULL);
|
||||||
|
ctx = card->ctx;
|
||||||
|
|
||||||
|
if (!card->cache.valid || (!card->cache.current_ef && !card->cache.current_df)) {
|
||||||
|
sc_debug(ctx, SC_LOG_DEBUG_NORMAL, "card cache invalid");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (card->cache.current_ef) {
|
||||||
|
sc_debug(ctx, SC_LOG_DEBUG_NORMAL, "current_ef(type=%i) %s",
|
||||||
|
card->cache.current_ef->path.type,
|
||||||
|
sc_print_path(&card->cache.current_ef->path));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (card->cache.current_df) {
|
||||||
|
sc_debug(ctx, SC_LOG_DEBUG_NORMAL, "current_df(type=%i, aid_len=%i) %s",
|
||||||
|
card->cache.current_df->path.type,
|
||||||
|
card->cache.current_df->path.aid.len,
|
||||||
|
sc_print_path(&card->cache.current_df->path));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -288,3 +288,4 @@ sc_pkcs15init_update_file
|
||||||
sc_pkcs15init_verify_secret
|
sc_pkcs15init_verify_secret
|
||||||
sc_pkcs15init_sanity_check
|
sc_pkcs15init_sanity_check
|
||||||
sc_card_find_rsa_alg
|
sc_card_find_rsa_alg
|
||||||
|
sc_print_cache
|
||||||
|
|
Loading…
Reference in New Issue