Ludovic Rousseau wrote:
The compiler is right. The value dfpath is used but is never uninitialized (unless some black magic is involved). variable declared at line 217: int dfpath; and used at lines 308-309: pin_info.path.value[2] = dfpath >> 8; pin_info.path.value[3] = dfpath & 0xff; I don't know how to solve the problem since I don't know what dfpath is supposed to be. Douglas, any idea as you are the author?
It was a holdover from the gemsafe module where the static path in the pindata structure needed to be modified when copied to the pin_info. With the PIV there is no way to access the pin via a path. The pin_info.path is filled in by line 307 from a null path of "". So the three lines can be deleted. See the attachment.
Bye, -- Dr. Ludovic Rousseau _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel
-- Douglas E. Engert <[EMAIL PROTECTED]> Argonne National Laboratory 9700 South Cass Avenue Argonne, Illinois 60439 (630) 252-5444
Index: pkcs15-piv.c =================================================================== --- pkcs15-piv.c (revision 2864) +++ pkcs15-piv.c (working copy) @@ -214,7 +214,6 @@ }; int r, i; - int dfpath; sc_card_t *card = p15card->card; SC_FUNC_CALLED(card->ctx, 1); @@ -305,8 +304,6 @@ pin_info.max_length = pins[i].maxlen; pin_info.pad_char = pins[i].pad_char; sc_format_path(pins[i].path, &pin_info.path); - pin_info.path.value[2] = dfpath >> 8; - pin_info.path.value[3] = dfpath & 0xff; pin_info.tries_left = -1; strncpy(pin_obj.label, pins[i].label, SC_PKCS15_MAX_LABEL_SIZE - 1);
_______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel