bugfix: select DF before setting sec. attributes
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3262 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
c25e4f765c
commit
c2ee37e6c7
|
@ -615,6 +615,10 @@ static int asepcos_create_file(sc_card_t *card, sc_file_t *file)
|
||||||
SC_TEST_RET(card->ctx, r, "APDU transmit failed");
|
SC_TEST_RET(card->ctx, r, "APDU transmit failed");
|
||||||
if (apdu.sw1 != 0x90 || apdu.sw2 != 0x00)
|
if (apdu.sw1 != 0x90 || apdu.sw2 != 0x00)
|
||||||
return sc_check_sw(card, apdu.sw1, apdu.sw2);
|
return sc_check_sw(card, apdu.sw1, apdu.sw2);
|
||||||
|
|
||||||
|
r = sc_select_file(card, &file->path, NULL);
|
||||||
|
if (r != SC_SUCCESS)
|
||||||
|
return r;
|
||||||
/* set security attributes */
|
/* set security attributes */
|
||||||
r = asepcos_set_security_attributes(card, file);
|
r = asepcos_set_security_attributes(card, file);
|
||||||
if (r != SC_SUCCESS) {
|
if (r != SC_SUCCESS) {
|
||||||
|
|
Loading…
Reference in New Issue