cryptographix / pcsc-deno

Deno FFI binding to the PCSC API
MIT License
1 stars 3 forks source link

SCardControl() not documented? #3

Open LudovicRousseau opened 2 years ago

LudovicRousseau commented 2 years ago

It looks like SCardControl() is wrapped in https://github.com/cryptographix/pcsc-deno/blob/master/deno-pcsc-ffi/pcsc-ffi-wrapper.ts#L468 But it is not documented in the Low Level API https://github.com/cryptographix/pcsc-deno#low-level-and-legacy-usage

cryptographix commented 2 years ago

Added to docs, not tested .. do you have any suggestion for how to test control?

Did not close issue, since must also add SCardGetAttrib and SetAttrib to docs. Any suggestion of how to test them?

Also, is there a standard way of querying if a reader is contactless, maybe via SCardGetAttrib?

LudovicRousseau commented 2 years ago

On macOS you can test some attributes listed at https://salsa.debian.org/rousseau/CCID/blob/master/SCARDGETATTRIB.txt

For SCardControl() you can use CM_IOCTL_GET_FEATURE_REQUEST https://salsa.debian.org/rousseau/CCID/blob/master/SCARDCONTOL.txt