check tpin before trying to delete application

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3391 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
nils 2008-02-25 19:47:11 +00:00
parent 69742ed3a9
commit c46c366f1d

View File

@ -118,6 +118,10 @@ static int asepcos_erase(struct sc_profile *profile, sc_card_t *card)
* - use EF(DIR) to get the DF of the OpenSC
* pkcs15 application.
*/
/* Check wether a transport exists and verify it if present */
r = asepcos_check_verify_tpin(profile, card);
if (r != SC_SUCCESS)
return r;
/* EF(DIR) */
sc_format_path("3f002f00", &path);
r = asepcos_cond_delete(profile, card, &path);