The lastUpdate field is in the EF(TokenInfo), not in the ODF (thx Nils)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2525 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
891ed0f197
commit
d8639b16ce
@ -354,7 +354,7 @@ sc_pkcs15init_unbind(struct sc_profile *profile)
|
||||
int r;
|
||||
struct sc_context *ctx = profile->card->ctx;
|
||||
|
||||
if (profile->dirty != 0 && profile->p15_data != NULL && profile->pkcs15.odf_last_update) {
|
||||
if (profile->dirty != 0 && profile->p15_data != NULL && profile->pkcs15.do_last_update) {
|
||||
r = sc_pkcs15init_update_tokeninfo(profile->p15_data, profile);
|
||||
if (r < 0)
|
||||
sc_error(ctx, "Failed to update TokenInfo: %s\n", sc_strerror(r));
|
||||
|
@ -20,8 +20,8 @@ pkcs15 {
|
||||
direct-certificates = no;
|
||||
# Put the DF length into the ODF file?
|
||||
encode-df-length = no;
|
||||
# Have a lastUpdate field in the ODF?
|
||||
odf-last-update = yes;
|
||||
# Have a lastUpdate field in the EF(TokenInfo)?
|
||||
do-last-update = yes;
|
||||
}
|
||||
|
||||
# Default settings.
|
||||
|
@ -255,7 +255,7 @@ sc_profile_new(void)
|
||||
return NULL;
|
||||
pro->p15_spec = p15card = sc_pkcs15_card_new();
|
||||
|
||||
pro->pkcs15.odf_last_update = 1;
|
||||
pro->pkcs15.do_last_update = 1;
|
||||
|
||||
/* Set up EF(TokenInfo) and EF(ODF) */
|
||||
p15card->file_tokeninfo = init_file(SC_FILE_TYPE_WORKING_EF);
|
||||
@ -752,9 +752,9 @@ do_encode_df_length(struct state *cur, int argc, char **argv)
|
||||
}
|
||||
|
||||
static int
|
||||
do_encode_odf_update_field(struct state *cur, int argc, char **argv)
|
||||
do_encode_update_field(struct state *cur, int argc, char **argv)
|
||||
{
|
||||
return get_bool(cur, argv[0], &cur->profile->pkcs15.odf_last_update);
|
||||
return get_bool(cur, argv[0], &cur->profile->pkcs15.do_last_update);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1497,7 +1497,7 @@ static struct command pi_commands[] = {
|
||||
static struct command p15_commands[] = {
|
||||
{ "direct-certificates", 1, 1, do_direct_certificates },
|
||||
{ "encode-df-length", 1, 1, do_encode_df_length },
|
||||
{ "odf-last-update", 1, 1, do_encode_odf_update_field },
|
||||
{ "do-last-update", 1, 1, do_encode_update_field },
|
||||
{ NULL, 0, 0, NULL }
|
||||
};
|
||||
|
||||
|
@ -110,7 +110,7 @@ struct sc_profile {
|
||||
struct {
|
||||
unsigned int direct_certificates;
|
||||
unsigned int encode_df_length;
|
||||
unsigned int odf_last_update;
|
||||
unsigned int do_last_update;
|
||||
} pkcs15;
|
||||
|
||||
/* PKCS15 information */
|
||||
|
Loading…
Reference in New Issue
Block a user