summaryrefslogtreecommitdiff
path: root/src/com/android/se/Terminal.java
AgeCommit message (Collapse)Author
2021-09-14Merge remote-tracking branch 'nxp-oss/br_android_ncihalx_row_12' into ↵alk3pInjection
lineage-18.1 Signed-off-by: alk3pInjection <webmaster@raspii.tech> Change-Id: Ifda025f9963e067b37475cf65de4276fdaeeedd2
2021-09-14SecureElement: Do not try to initialze the access control enforcer in NFC APIJack Yu
If there is temporary failures in access rules retrieval, Secure Element service should handle the re-initialization. NFC transactions usually need to be completed in short time and should not wait for the access control enforcer re-initialization. Bug: 186588474 Test: HCE test in CtsVerifier Change-Id: I6e6dd8c05622ff67f6b75a8a93d0db0d35bc7056 (cherry picked from commit 8ca26b9e6c7381ac51c3bfe4d774b5d61b1b30c3)
2021-09-14SecureElement: Improve isNfcEventAllowedGeorge Chang
Return when SE is not connected Bug: 185198557 Test: manual Change-Id: I0c90862585f311bc6695235e316023aeceb9df7a (cherry picked from commit cba6328078700b0d3adc92c8a95da9337718597a)
2021-07-02Do not try to initialze the access control enforcer in NFC APInxf56319
If there is temporary failures in access rules retrieval, Secure Element service should handle the re-initialization. NFC transactions usually need to be completed in short time and should not wait for the access control enforcer re-initialization. Bug: 186588474 Test: HCE test in CtsVerifier Change-Id: I6e6dd8c05622ff67f6b75a8a93d0db0d35bc7056
2021-07-02Improve isNfcEventAllowednxf56319
Return when SE is not connected Bug: 185198557 Test: manual Change-Id: I0c90862585f311bc6695235e316023aeceb9df7a
2020-09-09{11.0.0_r3}: Migrate to SecureElementStatsLog from StatsLogGanesh Deva
As part of statsd becoming a Mainline module in R, autogenerated StatsLog.write() calls are going away and replaced by *StatsLog.java that is autogenerated for each module. This CL adds autogenerated SecureElementStatsLog and replaces usages of StatsLog with SecureElementStatsLog.
2020-09-09Resolve JAVA warnings.nxf56319
Warnings fixed: FORWARD_NULL Checked for null before accessing method on mSEHal11.
2020-09-08Strengthen the robustness of concurrent operationsGanesh Deva
1. Ensure the concurrent access to mChannels in Terminal.java is protected by the same lock instance 2. Move the remove operation of mSessions into synchronized block in method of Terminal.removeSession 3. Add synchronous block protection to mChannels.add operation in SecureElementService.java
2020-09-08Deny the operation to select ISD-R aidGanesh Deva
Do not directly provide privilege access to carrier privilege apps to select ISD-R aid. Fallback to GP rules checking.
2020-09-08Allow OpenLogicalChannel with null aid for privilege appsGanesh Deva
Do not return null directly when application try to openLogicalChannel with null aid. Check if it is privilege application first.
2020-09-08Refresh terminal instances when switching between SS and DSGanesh Deva
Listen to CARRIER_CONFIG_CHANGED and reinitialize UICC terminals.
2020-09-08OpenBasicChannel with UICC should not be allowed for non-privilege appsGanesh Deva
Throw exception in setUpChannelAccess if this is not a privilege app.
2020-09-08Fix redundant codeflow in openLogicalChannel with UICC terminalGanesh Deva
When setup channel access for UICC terminal, carrier privileges checking add unnecessary rules loading.
2020-06-11Refresh terminal instances when switching between SS and DSJack Yu
Listen to CARRIER_CONFIG_CHANGED and reinitialize UICC terminals. Bug: 152008670 Test: adb shell dumpsys secure_element Merged-In: I8bb13b43de6f17f0b5b82440708d90bf684ca7ec Change-Id: I8bb13b43de6f17f0b5b82440708d90bf684ca7ec
2020-06-10Merge "Allow OpenLogicalChannel with null aid for privilege apps" into rvc-devTreeHugger Robot
2020-06-08Deny the operation to select ISD-R aidJack Yu
Do not directly provide privilege access to carrier privilege apps to select ISD-R aid. Fallback to GP rules checking. Bug: 157968163 Test: select ISD-R aid is not directly allowed for carrier privilege apps Merged-In: Id7dd6e3afcb88d97b7c62e8710ef16fbc35010f3 Change-Id: Id7dd6e3afcb88d97b7c62e8710ef16fbc35010f3
2020-06-03Allow OpenLogicalChannel with null aid for privilege appsJack Yu
Do not return null directly when application try to openLogicalChannel with null aid. Check if it is privilege application first. Bug: 157349625 Test: openLogicalChannel with null aid Merged-In: Icf7ee2b299154874f1bdd4b5b409c7df04eb831b Change-Id: Icf7ee2b299154874f1bdd4b5b409c7df04eb831b
2020-05-01Enum mismatch fix for HAL_ESE_IOCTL_OMAPI_TRY_GET_ESE_SESSION & ↵nxp61433
HAL_ESE_IOCTL_OMAPI_RELEASE_ESE_SESSION
2020-05-01{R-DP2} Add support for secure_element HAL 1.2Yerriswamy
Test: manual Bug: 142495673 Change-Id: I1338a2a11cc60fa50b1c8dd8e75022af9ea1b0a1
2020-05-01{R-DP2} Allow privilege app access to open channelYerriswamy
Allow privilege app access to open channel even if AccessControlEnforcer is not available. Throw exception only for non privileged access. Bug: 149632580 Test: OpenBasicChannel from Privileged/Non privileged app Change-Id: Ie188d397f6bf641923d010ad3a9d00d21bc9351b
2020-05-01{R-DP2} Include channel operation in synchronized areaYerriswamy
When application try to stress OMAPI by continuously open/close channels with multi-thread, there is possibility channel management is incorrect and result to no response. Bug: 148892905 Test: OMAPI works normal after multi-thread stress tests Change-Id: I530015ff20ed143a129024d6385fae9392a00a99
2020-05-01{R-DP1} Add Carrier Privilege supportYerriswamy
Support Carrier Privilege rules. Bug: 139701995 Test: Check carrier privilege rules could be parsed correctly Change-Id: I2838d335f9993eb7e50323773ed52579f53766a3
2020-05-01{R-DP1} Provide privilege access to system applicationYerriswamy
Provide access to eSE when system application granted privilege permission. Bug: 141963658 Test: Manual Change-Id: I5f00ee71c4d42ea612abeeeb637248337af3c1f6
2020-05-01{R-DP1} Support configurable AIDs for ARAMYerriswamy
1. Try to retrieve ARs from a configurable list of AIDs. If all AIDs are not accessible, then try default AID. 2. Add PKG_REF_DO/PERM_AR_DO for AR parsing. Bug:139078767 Test: Access rules could be retrieved from different AIDs.
2020-05-01{R-DP1} Fix bug transmit APDU status word 6CXX follow by 61XX case.Yerriswamy
transmit method can handle 6CXX or 61XX once, and then call transmitInternal method. transmitInternal method cannot handle 6CXX or 61XX. After process 6CXX, call transmit method again to handle 61XX. Bug: 141838332 Test: CTS OmapiTest Change-Id: I4e7ff90953d7a5374b012f55c25f29a73adb586b
2020-05-01{R-DP1} Don't retry on failure for Terminals after index 1Yerriswamy
Terminals are loaded in the onCreate, which has a limited amount of time to do work without ANRing. For DSDS, its possible that although a SIM2 ese exists in a manifest, the HAL won't be loaded if DSDS is inactive on the device. Don't allow retries when trying to fetch terminals after index 1, in case they don't actually exist. Bug: 139010988 Change-Id: I250cfed507a2805abba21e2c8ebfb025431cfb0d
2020-04-22OpenBasicChannel with UICC should not be allowed for non-privilege appsJack Yu
Throw exception in setUpChannelAccess if this is not a privilege app. Bug: 153934978 Test: atest CtsOmapiTestCases Merged-In: Id39bcad679e856370b985bb77ca77aaadc84c7a0 Change-Id: Id39bcad679e856370b985bb77ca77aaadc84c7a0
2020-04-14Fix redundant codeflow in openLogicalChannel with UICC terminalJack Yu
When setup channel access for UICC terminal, carrier privileges checking add unnecessary rules loading. Bug: 152060727 Bug: 153832909 Test: atest CtsOmapiTestCases Merged-In: Ia3230a7f0165b9233196a698d9bfd0e243fa0db6 Change-Id: Ia3230a7f0165b9233196a698d9bfd0e243fa0db6
2020-03-31Allow privilege app access to open channelAnil Hiranniah
Allow privilege app access to open channel even if AccessControlEnforcer is not available. Throw exception only for non privileged access. Bug: 149632580 Test: OpenBasicChannel from Privileged/Non privileged app Merged-In: Ie188d397f6bf641923d010ad3a9d00d21bc9351b Change-Id: Ie188d397f6bf641923d010ad3a9d00d21bc9351b
2020-03-16Change naming to be more specificJack Yu
Change SECURE_ELEMENT_PRIVILEGED to SECURE_ELEMENT_PRIVILEGED_OPERATION. Bug: 150877612 Test: build pass Merged-In: I5c0d557f9ac43b64f2113de6c4a46f92e99b7c27 Change-Id: I5c0d557f9ac43b64f2113de6c4a46f92e99b7c27
2020-02-12Include channel operation in synchronized area am: 38da55f2ec am: 96b22f4f87 ↵Automerger Merge Worker
am: 235b4688ef Change-Id: Id9083df806b6cceaf0f339bf998971bb90afd42c
2020-02-06Include channel operation in synchronized areaJack Yu
When application try to stress OMAPI by continuously open/close channels with multi-thread, there is possibility channel management is incorrect and result to no response. Bug: 148892905 Test: OMAPI works normal after multi-thread stress tests Change-Id: I530015ff20ed143a129024d6385fae9392a00a99
2020-01-31Merge "Migrate to SecureElementStatsLog from StatsLog"TreeHugger Robot
2020-01-24Migrate to SecureElementStatsLog from StatsLogMuhammad Qureshi
As part of statsd becoming a Mainline module in R, autogenerated StatsLog.write() calls are going away and replaced by *StatsLog.java that is autogenerated for each module. This CL adds autogenerated SecureElementStatsLog and replaces usages of StatsLog with SecureElementStatsLog. Bug: 145952197 Test: m SecureElement Change-Id: Ided6c27ba2be86152949dcbf430bcc3140a62b58
2020-01-23Merge "Add support for secure_element HAL 1.2"Treehugger Robot
2020-01-21Add support for secure_element HAL 1.2Jack Yu
Test: manual Bug: 142495673 Change-Id: I1338a2a11cc60fa50b1c8dd8e75022af9ea1b0a1
2020-01-08Add Carrier Privilege supportJack Yu
Support Carrier Privilege rules. Bug: 139701995 Test: Check carrier privilege rules could be parsed correctly Change-Id: I2838d335f9993eb7e50323773ed52579f53766a3
2020-01-08Provide privilege access to system applicationJack Yu
Provide access to eSE when system application granted privilege permission. Bug: 141963658 Test: Manual Change-Id: I5f00ee71c4d42ea612abeeeb637248337af3c1f6
2019-12-13Merge "Fix bug transmit APDU status word 6CXX follow by 61XX case."George Chang
2019-11-06Reverted AOSP changes.nxf48293
2019-11-06Resolve JAVA warningsnxf48293
Warnings resolved: GUARDED_BY_VIOLATION, FORWARD_NULL, NULL_RETURN, CALL_SUPER
2019-10-21Support configurable AIDs for ARAMJack Yu
am: 71c804e16d Change-Id: I3cc94965bfd98316ffd91ff53e9858ed2f5ed2ab
2019-10-18Support configurable AIDs for ARAMJack Yu
1. Try to retrieve ARs from a configurable list of AIDs. If all AIDs are not accessible, then try default AID. 2. Add PKG_REF_DO/PERM_AR_DO for AR parsing. Bug:139078767 Test: Access rules could be retrieved from different AIDs. Change-Id: Id14418ebd39646d4b50e2ad240f50bc74507f816
2019-09-30Fix bug transmit APDU status word 6CXX follow by 61XX case.yifan.bai
transmit method can handle 6CXX or 61XX once, and then call transmitInternal method. transmitInternal method cannot handle 6CXX or 61XX. After process 6CXX, call transmit method again to handle 61XX. Bug: 141838332 Test: CTS OmapiTest Change-Id: I4e7ff90953d7a5374b012f55c25f29a73adb586b
2019-08-07Don't retry on failure for Terminals after index 1Andrew Chant
Terminals are loaded in the onCreate, which has a limited amount of time to do work without ANRing. For DSDS, its possible that although a SIM2 ese exists in a manifest, the HAL won't be loaded if DSDS is inactive on the device. Don't allow retries when trying to fetch terminals after index 1, in case they don't actually exist. Bug: 139010988 Change-Id: I250cfed507a2805abba21e2c8ebfb025431cfb0d
2019-07-12{Q_AOSP} : Initialize Access Control Enforcer if access rules are newly ↵Ganesh Deva
installed If no access rule is accessible, access to secure element is allowed in eSE case and denied in UICC SE case in accordance with the chapter 4 of GP SEAC specification. The problem with the current implementation is that there is no mechanism to re-initialize Access Control Enforcer when access rule becomes accessible. If access rule is installed to the secure element, Access Controler Enforcer shall work to cache the rules.
2019-05-28Copyright year updatenxf35421
2019-05-28{Q_DP1}: Add Secure Element statistic dataGanesh Deva
2019-05-28{Q-DP2}: Add useful logs regarding channels and ATRGanesh Deva
Session and Terminal should output more logs helpful for the device development. This change adds logs for openBasicChannel(), openLogicalChannel() and getAtr(). New logs should be output only for debuggable build variants.
2019-05-08Initialize SEHAL 1.1 after initializing mSEHal variable.Arach MOHAMMED BRAHIM
Keep the same order than SEHAL 1.0. There is possibility to use mSEHal before initialized. Bug: 131298247 Test: AccessRule loaded successfully Change-Id: I65c0fe98c4cafd179be3708e53b6d40165acd9f6 Merged-In: I65c0fe98c4cafd179be3708e53b6d40165acd9f6