summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornxp72763 <anil.hiranniah@nxp.com>2019-12-09 12:57:07 +0530
committernxp72763 <anil.hiranniah@nxp.com>2019-12-09 12:57:07 +0530
commit8f850a80845f2c1a0030af1da9c6bf9838710048 (patch)
treeca5844df23876b514f7f88a3914c9363335bc28a
parent48b59a20f629b0dfd92087d087af76436ab9ec0e (diff)
downloadsecure_element-8f850a80845f2c1a0030af1da9c6bf9838710048.tar.gz
Fix for GSMA TS27 TC 6.3.1.6.4.7eSE ID10.
If response to manage channel open command returns 0x6985 or 0x6999, return "No such element" error. Bug:142574709 Test: GSMA test, VTS Change-Id: Id168543978df0f5fb208bb525796a320bf037afd
-rwxr-xr-x1.0/SecureElement.cpp6
-rwxr-xr-x1.1/SecureElement.cpp6
2 files changed, 8 insertions, 4 deletions
diff --git a/1.0/SecureElement.cpp b/1.0/SecureElement.cpp
index 6a38a25..90a1c08 100755
--- a/1.0/SecureElement.cpp
+++ b/1.0/SecureElement.cpp
@@ -225,7 +225,8 @@ Return<void> SecureElement::openLogicalChannel(const hidl_vec<uint8_t>& aid,
sestatus = SecureElementStatus::SUCCESS;
}
/*AID provided doesn't match any applet on the secure element*/
- else if (sw1 == 0x6A && sw2 == 0x82) {
+ else if ((sw1 == 0x6A && sw2 == 0x82) ||
+ (sw1 == 0x69 && (sw2 == 0x99 || sw2 == 0x85))) {
sestatus = SecureElementStatus::NO_SUCH_ELEMENT_ERROR;
}
/*Operation provided by the P2 parameter is not permitted by the applet.*/
@@ -306,7 +307,8 @@ Return<void> SecureElement::openBasicChannel(const hidl_vec<uint8_t>& aid,
sestatus = SecureElementStatus::SUCCESS;
}
/*AID provided doesn't match any applet on the secure element*/
- else if (sw1 == 0x6A && sw2 == 0x82) {
+ else if ((sw1 == 0x6A && sw2 == 0x82) ||
+ (sw1 == 0x69 && (sw2 == 0x99 || sw2 == 0x85))) {
sestatus = SecureElementStatus::NO_SUCH_ELEMENT_ERROR;
}
/*Operation provided by the P2 parameter is not permitted by the applet.*/
diff --git a/1.1/SecureElement.cpp b/1.1/SecureElement.cpp
index e04b8ba..3792f6f 100755
--- a/1.1/SecureElement.cpp
+++ b/1.1/SecureElement.cpp
@@ -266,7 +266,8 @@ Return<void> SecureElement::openLogicalChannel(const hidl_vec<uint8_t>& aid,
sestatus = SecureElementStatus::SUCCESS;
}
/*AID provided doesn't match any applet on the secure element*/
- else if (sw1 == 0x6A && sw2 == 0x82) {
+ else if ((sw1 == 0x6A && sw2 == 0x82) ||
+ (sw1 == 0x69 && (sw2 == 0x99 || sw2 == 0x85))) {
sestatus = SecureElementStatus::NO_SUCH_ELEMENT_ERROR;
}
/*Operation provided by the P2 parameter is not permitted by the applet.*/
@@ -347,7 +348,8 @@ Return<void> SecureElement::openBasicChannel(const hidl_vec<uint8_t>& aid,
sestatus = SecureElementStatus::SUCCESS;
}
/*AID provided doesn't match any applet on the secure element*/
- else if (sw1 == 0x6A && sw2 == 0x82) {
+ else if ((sw1 == 0x6A && sw2 == 0x82) ||
+ (sw1 == 0x69 && (sw2 == 0x99 || sw2 == 0x85))) {
sestatus = SecureElementStatus::NO_SUCH_ELEMENT_ERROR;
}
/*Operation provided by the P2 parameter is not permitted by the applet.*/