Hello, I would like to use the function parse_tokeninfo() wich is defined static in libopensc/pkcs15.c.
In order to keep the same naming scheme I propose to rename it in sc_pkcs15_parse_tokeninfo(). I added its definition in libopensc/pkcs15.h This function is only used once so the impacts on the code are very limited. Patch included. Any comment or objection? Bye, -- Dr. Ludovic Rousseau
Index: libopensc/pkcs15.c =================================================================== --- libopensc/pkcs15.c (révision 2862) +++ libopensc/pkcs15.c (copie de travail) @@ -49,7 +49,7 @@ static const struct sc_asn1_entry c_asn1 { NULL, 0, 0, 0, NULL, NULL } }; -static void parse_tokeninfo(struct sc_pkcs15_card *card, const u8 * buf, size_t buflen) +void sc_pkcs15_parse_tokeninfo(struct sc_pkcs15_card *card, const u8 * buf, size_t buflen) { int r; u8 serial[128]; @@ -618,7 +618,7 @@ static int sc_pkcs15_bind_internal(sc_pk err = SC_ERROR_PKCS15_APP_NOT_FOUND; goto end; } - parse_tokeninfo(p15card, buf, (size_t)err); + sc_pkcs15_parse_tokeninfo(p15card, buf, (size_t)err); ok = 1; end: Index: libopensc/pkcs15.h =================================================================== --- libopensc/pkcs15.h (révision 2862) +++ libopensc/pkcs15.h (copie de travail) @@ -507,6 +507,8 @@ int sc_pkcs15_find_so_pin(struct sc_pkcs int sc_pkcs15_encode_dir(struct sc_context *ctx, struct sc_pkcs15_card *card, u8 **buf, size_t *buflen); +void sc_pkcs15_parse_tokeninfo(struct sc_pkcs15_card *card, const u8 * buf, + size_t buflen); int sc_pkcs15_encode_tokeninfo(struct sc_context *ctx, struct sc_pkcs15_card *card, u8 **buf, size_t *buflen);
_______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel