- Small update to MioCOS pkcs15init driver
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@578 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
68e6292c44
commit
79bf099f0d
|
@ -22,15 +22,7 @@ PIN user-puk {
|
|||
# main profile.
|
||||
filesystem {
|
||||
DF MF {
|
||||
ACL = *=NONE;
|
||||
|
||||
DF PKCS15-AppDF {
|
||||
EF pinfile {
|
||||
type = internal-ef;
|
||||
file-id = 5001;
|
||||
size = 20;
|
||||
ACL = *=NEVER;
|
||||
}
|
||||
EF template-private-key {
|
||||
type = internal-ef;
|
||||
file-id = 4B01; # This is the base FileID
|
||||
|
|
|
@ -50,23 +50,12 @@ miocos_new_pin(struct sc_profile *profile, struct sc_card *card,
|
|||
const u8 *pin, size_t pin_len,
|
||||
const u8 *puk, size_t puk_len)
|
||||
{
|
||||
sc_file_t *pinfile;
|
||||
struct sc_pkcs15_pin_info tmpinfo;
|
||||
struct sc_cardctl_miocos_ac_info ac_info;
|
||||
int r;
|
||||
|
||||
/* Profile must define a "pinfile" */
|
||||
if (sc_profile_get_file(profile, "pinfile", &pinfile) < 0) {
|
||||
profile->cbs->error("Profile doesn't define \"pinfile\"");
|
||||
return SC_ERROR_INVALID_ARGUMENTS;
|
||||
}
|
||||
info->path = pinfile->path;
|
||||
if (info->path.len > 2)
|
||||
info->path.len -= 2;
|
||||
pinfile->id += index;
|
||||
pinfile->path.value[pinfile->path.len-1] += index;
|
||||
r = sc_pkcs15init_create_file(profile, card, pinfile);
|
||||
sc_file_free(pinfile);
|
||||
info->path = profile->df_info->file->path;
|
||||
r = sc_select_file(card, &info->path, NULL);
|
||||
if (r)
|
||||
return r;
|
||||
memset(&ac_info, 0, sizeof(ac_info));
|
||||
|
|
Loading…
Reference in New Issue