From 24391715f5f88a7ee62681b74b4f6e38f3e0975b Mon Sep 17 00:00:00 2001 From: lurandal Date: Fri, 8 Jul 2022 10:21:33 +0800 Subject: [PATCH] Judgement fall into failure case If AID selection successfully get xx .. .. 90 00 response. Current judgement would fall into the error case. Need update to make it working as expected. --- HAL/OmapiTransport.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HAL/OmapiTransport.cpp b/HAL/OmapiTransport.cpp index 54d96c1b..25370f36 100644 --- a/HAL/OmapiTransport.cpp +++ b/HAL/OmapiTransport.cpp @@ -194,8 +194,8 @@ bool OmapiTransport::internalTransmitApdu( } if ((selectResponse.size() < 2) - || ((selectResponse[selectResponse.size() -1] & 0xFF) == 0x00) - || ((selectResponse[selectResponse.size() -2] & 0xFF) == 0x90)) + || ((selectResponse[selectResponse.size() -1] & 0xFF) != 0x00) + || ((selectResponse[selectResponse.size() -2] & 0xFF) != 0x90)) { LOG(ERROR) << "Failed to select the Applet."; return false;