> So, if i have (in my FCI) tag 80 coded as 80 01 80 (i.e. my file size is > 128 bytes), > the code doesn't work! It awaits 2-bytes LEN FIELD in this tlv > Explain, please!
note sure about that part of opensc, but many apps have a length encoding like this: * 0..127 -> one byte len of that value * 128..255 -> "81" plus one byte with that value * 256..65535 -> "82" plus two bytes with that value (and so on - if higher length are allowed) and tags can be one byte or several bytes in many data structures. not sure what the encoding for several bytes was - if the first byte ends in "0x0f" (i.e. last 4 bits set), then the tag has a length of two byte? something like that - at least in some standard for some card stuff I know. does this help? Regards, Andreas _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel