Am Dienstag 06 Oktober 2009 16:06:52 schrieb Aktiv Co. Aleksey Samsonov: > Aktiv Co. Aleksey Samsonov: > > Hello, > > Rutoken initialization failed after > > http://www.opensc-project.org/opensc/changeset/3765#file8 > > $ pkcs15-init -l "Rutoken ECP User PIN" -a 02 --pin "12345678" --puk "" > > -P --so-pin "87654321" -F > > Failed to store PIN: Requested object not found > > => > > new_entry -> calloc > > ... > > sc_keycache_get_key -> search_key -> if (s->len != 0) then error > > > > Any idea? > > Thanks. > > Cause: http://www.opensc-project.org/opensc/changeset/3741
hmm. I'm not 100% sure how keycache works either. but that code is bogus - int is returned from the function, written into an unsigned int, which is then checked "< 0" which can't ever happen to unsigned int. thus I "fixed" the code to get the value as int, compare "< 0" and only write it into the unsigned int len field if it is >= 0. but no idea when keycache code is actually used. can you post a backtrace? or does anyone else know? Regards, Andreas _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel