[pkg-opensc-commit] [opensc] 215/295: Minidriver CardGetChallenge() parameters are output only

Eric Dorland eric at moszumanska.debian.org
Sat Jun 24 21:11:33 UTC 2017


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository opensc.

commit d203ad76a4b645088180179de40c3eb5fee589da
Author: Maciej S. Szmigiero <mail at maciej.szmigiero.name>
Date:   Tue Mar 14 23:03:13 2017 +0100

    Minidriver CardGetChallenge() parameters are output only
    
    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 at maciej.szmigiero.name>
---
 src/minidriver/minidriver.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/src/minidriver/minidriver.c b/src/minidriver/minidriver.c
index 49f2903..d64d175 100644
--- a/src/minidriver/minidriver.c
+++ b/src/minidriver/minidriver.c
@@ -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);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/opensc.git



More information about the pkg-opensc-commit mailing list