Ludovic Rousseau wrote:
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?

well parse_tokeninfo() isn't really a function I would like to
export as the return parameter, the sc_pkcs15_card_t object, is
not really suitable for this function. Better would be something
like

typedef struct {
        unsigned int version;
        the various tokenInfo fields
} sc_token_info_t;

int sc_pkcs15_parse_tokeninfo(sc_token_info_t *ti,
        const unsigned char * , size_t );

However this would require some bigger changes in the internal
library.

On the other hand one might argue that the api in pkcs15.h
isn't really usable (as an external api) so it doesn't really
matter anymore.

Cheers,
Nils
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to