Fix: deleting a cert chain with 1 or more intermediate CA's crashed

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2625 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
sth 2005-09-28 14:52:32 +00:00
parent 4be1f40fd3
commit 10fa4a6962
1 changed files with 1 additions and 1 deletions

View File

@ -1160,7 +1160,7 @@ static int do_delete_crypto_objects(sc_pkcs15_card_t *p15card,
else if (has_sibling)
sc_debug(ctx, "Chain deletion stops with cert %s\n", sc_pkcs15_print_id(
&((sc_pkcs15_cert_info_t *) objs[count - 1]->data)->id));
else if ((objs[count] != NULL))
else if (stop && (objs[count] != NULL))
count++;
if (stop || (objs[count] == NULL))
break;