diff options
Diffstat (limited to 'snxxx/1.2/VirtualISO.cpp')
-rwxr-xr-x | snxxx/1.2/VirtualISO.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/snxxx/1.2/VirtualISO.cpp b/snxxx/1.2/VirtualISO.cpp index 4550605..44ece57 100755 --- a/snxxx/1.2/VirtualISO.cpp +++ b/snxxx/1.2/VirtualISO.cpp @@ -16,15 +16,17 @@ * ******************************************************************************/ #include "VirtualISO.h" -#include <android-base/logging.h> + +#include "NxpEse.h" #include "SecureElement.h" -#include "phNxpEse_Apdu_Api.h" -#include "phNxpEse_Api.h" #ifdef NXP_BOOTTIME_UPDATE #include "eSEClient.h" #endif -#include "NxpEse.h" +#include <android-base/logging.h> + #include "hal_nxpese.h" +#include "phNxpEse_Apdu_Api.h" +#include "phNxpEse_Api.h" namespace vendor { namespace nxp { @@ -522,6 +524,11 @@ VirtualISO::internalCloseChannel(uint8_t channelNumber) { phNxpEse_memset(&cpdu, 0x00, sizeof(phNxpEse_7816_cpdu_t)); phNxpEse_memset(&rpdu, 0x00, sizeof(phNxpEse_7816_rpdu_t)); cpdu.cla = channelNumber; /* Class of instruction */ + // For Suplementary Channel update CLA byte according to GP + if ((channelNumber > 0x03) && (channelNumber < 0x14)) { + /* update CLA byte accoridng to GP spec Table 11-12*/ + cpdu.cla = 0x40 + (channelNumber - 4); /* Class of instruction */ + } cpdu.ins = 0x70; /* Instruction code */ cpdu.p1 = 0x80; /* Instruction parameter 1 */ cpdu.p2 = channelNumber; /* Instruction parameter 2 */ |