Skip to content

Commit

Permalink
Minidriver CardGetChallenge() parameters are output only
Browse files Browse the repository at this point in the history
According to minidriver specs CardGetChallenge() method parameters
are purely for output and do not have a meaning of requested challenge
length, so remove a misleading log line.

There is also no need to have a special case for pcbChallengeData being
NULL since in this case the function would have exited early anyway with
SCARD_E_INVALID_PARAMETER (also, it was just dereferenced in the previous
code line).

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
  • Loading branch information
maciejsszmigiero authored and frankmorgner committed Mar 27, 2017
1 parent 56f8806 commit d203ad7
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/minidriver/minidriver.c
Original file line number Diff line number Diff line change
Expand Up @@ -2982,15 +2982,6 @@ DWORD WINAPI CardGetChallenge(__in PCARD_DATA pCardData,
if (!ppbChallengeData || !pcbChallengeData)
return SCARD_E_INVALID_PARAMETER;

logprintf(pCardData, 1, "Asked challenge length %lu, buffer %p\n",
(unsigned long)*pcbChallengeData, *ppbChallengeData);
if (pcbChallengeData == NULL) {
*ppbChallengeData = NULL;

logprintf(pCardData, 7, "returns zero bytes\n");
return SCARD_S_SUCCESS;
}

vs = (VENDOR_SPECIFIC*)(pCardData->pvVendorSpecific);

check_reader_status(pCardData);
Expand Down

0 comments on commit d203ad7

Please sign in to comment.