OpenSC API

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

OpenSC API

Martin Preuss-2
Hi,

I have a question (well, two actually): In your reader driver API you are
using the type sc_apdu_t as argument to the sc_reader_operations function
(*transmit)().

Internally your reader-drivers use the functions sc_apdu_get_octets() and
sc_apdu_set_resp().
Both functions aren't available to drivers outside OpenSC (they are only
declared in internal.h).

Since they both operate on types which actually *are* part of the API
(sc_apdu_t): wouldn't it be better to make these functions (and maybe more)
also part of the OpenSC API so that external drivers could use them as well?

I'm currently helping myself by rewriting those functions myself, but since
you know your types best it seems to be more appropriate to use functions of
OpenSC...

BTW: In what version did the argument lists for the transmit and disconnect
functions change (I'd like to make a version check in Libchipcard2 to be able
to compile against older and newer versions of OpenSC)?


Regards
Martin

--
"Things are only impossible until they're not"

AqBanking - http://www.aqbanking.de/
LibChipcard - http://www.libchipcard.de/
_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: OpenSC API

Nils Larsch
Martin Preuss wrote:

> Hi,
>
> I have a question (well, two actually): In your reader driver API you are
> using the type sc_apdu_t as argument to the sc_reader_operations function
> (*transmit)().
>
> Internally your reader-drivers use the functions sc_apdu_get_octets() and
> sc_apdu_set_resp().
> Both functions aren't available to drivers outside OpenSC (they are only
> declared in internal.h).
>
> Since they both operate on types which actually *are* part of the API
> (sc_apdu_t): wouldn't it be better to make these functions (and maybe more)
> also part of the OpenSC API so that external drivers could use them as well?
>
> I'm currently helping myself by rewriting those functions myself, but since
> you know your types best it seems to be more appropriate to use functions of
> OpenSC...
>

as far as I remember I put these functions into a internal header file
because I wasn't really happy with them ...
I will look at it again.

> BTW: In what version did the argument lists for the transmit and disconnect
> functions change (I'd like to make a version check in Libchipcard2 to be able
> to compile against older and newer versions of OpenSC)?

the first released version with the new/current driver api was 0.11.0

Have a nice weekend,
Nils
_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc-project.org/mailman/listinfo/opensc-devel