But what about the getChallenge/Internal-Authentication sequence - in which the return value WOULD be the challenge, as encrypted by the card?
Another issue that has come up is the semantics of internal-authentication() versus those of SCardGetStatusChange().
In
int
SCU_CardIsPresentDev(SCARDCONTEXT hContext, int dev_nb, int *present) {
LONG rv;
SCARD_READERSTATE_A reader_state;reader_state.szReader = GetReader(hContext, dev_nb); reader_state.pvUserData = NULL; reader_state.dwCurrentState = SCARD_STATE_UNAWARE;
#ifdef MSC_DEBUG
DebugLogB("Checking if card is present in reader %s ..\n",GetReader(hContext, dev_nb));
#endif
rv = SCardGetStatusChange(hContext, 0, &reader_state, 1);
CHECK_ERR(rv != SCARD_S_SUCCESS, "SCardGetStatusChange() failed !");
*present = (reader_state.dwEventState & SCARD_STATE_PRESENT) != 0x00; //*present = reader_state.dwEventState; return SCU_OK; }
we can use the PC/SC driver to indicate whether IT believes that a card is present. Shoudl the routine be extended to list the ATR, Windows will as the SCARD_STATE_ATRMATCH flag, should a particular ATR be indicated for some card, as present.
(a) does the host-side driver make the determination of card present
(b) is it the driver that is responsible for implementing whether or not a new reset/atr is obtained from the card, upon issuing SCardGetStatusChange() (or could it report a cached indication)
(c) do any drivers enforce internal-authentication , prioir to responding to this SCardGetStatusChange()?
I asuppose I'm really asking: who I am I trusting, when relying on the response? and what are the things Im being expected to rely on (e.g. old atr caches in the RM, or a fresh reset/authentication, by the driver....?)
Peter. _______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle
