Albert Solana wrote:
...
+ while(ii<num_objects && !found) {
+
+ if (!fw_data->objects[ii]->p15_object) {
+ ii++;
+ continue;
+ }
+ if ((fw_data->objects[ii]->p15_object->type != SC_PKCS15_TYPE_PUBKEY) &&
+ (fw_data->objects[ii]->p15_object->type != SC_PKCS15_TYPE_PUBKEY_RSA) &&
+ (fw_data->objects[ii]->p15_object->type != SC_PKCS15_TYPE_PUBKEY_DSA)) {
+ ii++;
+ continue;
+ }
+ if (memcmp(fw_data->objects[ii]->p15_object->data, id, size_id) == 0) {
this is not so nice as this makes some implicit assumptions about
the layout of the sc_pkcs15_*_info types.
I realize that, but i haven't found any other way to implement it.
of course one could implement it with a
"if (fw_data->objects[ii]->p15_object->type != SC_PKCS15_TYPE_PUBKEY_RSA)" etc.
+ a appropriate cast ... not really nice (but due to the design of the pkcs15
stuff is not really possible to do it elegantly ...)
Otherwise the patch looks ok.
So, I deduce that the patch is going to be committed.
yes but I would like to think about the above memcmp issue before
I commit it.
Cheers,
Nils
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel