Skip to content

Commit

Permalink
pkcs15init: NULL 'store-key' hahdle
Browse files Browse the repository at this point in the history
Card driver can not define 'store-key' init handle
  • Loading branch information
viktorTarasov committed Feb 9, 2014
1 parent 032a3ec commit 72bf7a8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pkcs15init/pkcs15-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1431,10 +1431,12 @@ sc_pkcs15init_store_private_key(struct sc_pkcs15_card *p15card, struct sc_profil
/* Get the number of private keys already on this card */
/*idx = sc_pkcs15_get_objects(p15card, SC_PKCS15_TYPE_PRKEY, NULL, 0);*/

r = profile->ops->create_key(profile, p15card, object);
if (profile->ops->create_key)
r = profile->ops->create_key(profile, p15card, object);
LOG_TEST_RET(ctx, r, "Card specific 'create key' failed");

r = profile->ops->store_key(profile, p15card, object, &key);
if (profile->ops->store_key)
r = profile->ops->store_key(profile, p15card, object, &key);
LOG_TEST_RET(ctx, r, "Card specific 'store key' failed");

sc_pkcs15_free_object_content(object);
Expand Down

0 comments on commit 72bf7a8

Please sign in to comment.