From 711cbda2e0a06fa587e2f02f973735e01a78eddc Mon Sep 17 00:00:00 2001 From: martin Date: Wed, 2 Mar 2011 14:18:09 +0000 Subject: [PATCH] PC/SC: Add "PIN length not in range" interpretation to PC/SC pinpad code. This way this condition won't get translated to a generic -1200 error, as 0x6403 is not a known SW. git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5217 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/libopensc/reader-pcsc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libopensc/reader-pcsc.c b/src/libopensc/reader-pcsc.c index 13f7b593..5d5681a2 100644 --- a/src/libopensc/reader-pcsc.c +++ b/src/libopensc/reader-pcsc.c @@ -1507,6 +1507,9 @@ pcsc_pin_cmd(sc_reader_t *reader, struct sc_pin_cmd_data *data) case 0x6402: /* PINs don't match */ r = SC_ERROR_KEYPAD_PIN_MISMATCH; break; + case 0x6403: /* Entered PIN is not in length limits */ + r = SC_ERROR_INVALID_PIN_LENGTH; /* XXX: designed to be returned when PIN is in API call */ + break; case 0x6B80: /* Wrong data in the buffer, rejected by firmware */ r = SC_ERROR_READER; break;