iasecc: pkcs15init: when deleting SDO, do not try to overwrite 'non-updateable' SDO attribut

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5419 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
vtarasov 2011-05-03 07:54:13 +00:00
parent 2aa4673577
commit 0783ffd4c7
1 changed files with 8 additions and 0 deletions

View File

@ -1229,6 +1229,14 @@ iasecc_pkcs15_delete_sdo (struct sc_profile *profile, struct sc_pkcs15_card *p15
iasecc_sdo_free(card, sdo);
LOG_FUNC_RETURN(ctx, rv);
}
if (sdo->sdo_class == IASECC_SDO_CLASS_RSA_PUBLIC) {
if (sdo->data.pub_key.cha.value) {
free(sdo->data.pub_key.cha.value);
sdo->data.pub_key.cha.value = NULL;
sdo->data.pub_key.cha.size = 0;
}
}
sc_log(ctx, "iasecc_pkcs15_delete_sdo() SDO class 0x%X, ref 0x%X", sdo->sdo_class, sdo->sdo_ref);
rv = iasecc_sdo_convert_to_file(card, sdo, &dummy_file);