- in pin_cmd, don't overwrite max_length if set by caller

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1689 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
okir 2003-12-19 09:56:57 +00:00
parent ae5dcea891
commit 78febf36cf
1 changed files with 4 additions and 2 deletions

View File

@ -900,8 +900,10 @@ etoken_pin_cmd(struct sc_card *card, struct sc_pin_cmd_data *data,
data->pin_reference |= 0x80;
/* FIXME: the following values depend on what pin length was
* used when creating the BS objects */
data->pin1.max_length = 8;
data->pin2.max_length = 8;
if (data->pin1.max_length == 0)
data->pin1.max_length = 8;
if (data->pin2.max_length == 0)
data->pin2.max_length = 8;
return iso_ops->pin_cmd(card, data, tries_left);
}