Hello Martin, personally I would like to keep this patch specific to the separation of attributes from (public) TokenInfo and (internal) sc_pkcs15_card structure. Fixing the use of tokeninfo->version is another task and therefore I would suggest a separate patch for that one.
The matter of renaming the flags related to TokenInfo sounds easy at first. But trying to do it the right way has taken some time. Here is what I found: 1. Every data type directly related to PKCS#15 is prefixed with sc_pkcs15. Upper case is used for constants. 2. Every function operating on data types from 1) is prefixed with sc_pkcs15 too. 3. Two conventions are used for the naming of PKCS#15 flags: a) [SC_PKCS15] + [name of ASN1 type with last letter stripped] + [name of flag] (i.e. SC_PKCS15_PIN_FLAG_CASE_SENSITIVE) b) [SC_PKCS15] + [PR + name of ASN1 type with "FLAGS" stripped] + [name of flag] (i.e. SC_PKCS15_PRKEY_USAGE_ENCRYPT, SC_PKCS15_PRKEY_ACCESS_EXTRACTABLE 4. Everything dealing with card I/O has prefix of "sc" but not "sc_pkcs15" Conclusion: For the new names of flags, I would prefer convention b) but without the misleading "PR" letters. For example SC_PKCS15_TOKEN_READONLY. Regards Andre _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel