Commit graph

13 commits

Author SHA1 Message Date
Alex Buynytskyy
ec1198d941 UpsideDownCake is now 34
Ignore-AOSP-First: UpsideDownCake Finalization
Bug: 275409981
Test: build
Change-Id: I832ab7a8b5445ba85e27bbcf5be64906bfa0e5be
2023-04-07 23:41:20 +00:00
Treehugger Robot
eab4d44782 Merge "secure_element/aidl: add state checking in TearDown()" 2023-03-27 04:14:17 +00:00
Treehugger Robot
48e5787888 Merge "secure_element/aidl: update test case transmit" 2023-03-24 09:44:43 +00:00
Jack Yu
e9d5efb5b7 secure_element/aidl: add state checking in TearDown()
For some secure elements, reset() may takes more than 2.5 seconds.
- Extend timeout duration
- In TearDown(), wait until reset() is completed.

Bug: 273872072
Test: atest VtsHalSecureElementTargetTest
Change-Id: I345e1ac28e87423cfcbecd07aa049034fa28c40f
2023-03-23 07:22:21 +00:00
Jack Yu
27ebbec30b secure_element/aidl: update test case transmit
When no logical or basic channel is opened, transmit() resturns an error
code CHANNEL_NOT_AVAILABLE with an empty response.

Bug: 270091254
Test: atest VtsHalSecureElementTargetTest
Change-Id: I7b302ec321089f0b8f1d9d67bb12f9bdddaa4ee1
2023-03-23 15:19:56 +08:00
Devin Moore
212a6da42c Specify @throws for secure_element AIDL reset() method
This was expected to return an error in the HIDL version, so we
explicitly say which it should return on failure.

Brought up in ANAPIC review in ag/21108335

Test: none
Bug: none
Change-Id: I6f183a490f91aca5e08b5ae83017e707b63268ea
2023-03-22 19:52:23 +00:00
Henri Chataing
27b30c61d0 secure_element/aidl: Add error case for transmit()
Modify the semantics of transmit() to return a service
specific error with code CHANNEL_NOT_AVAILABLE if there
was an error in communicating with the secure element.

This can happen if the SE is put in low power mode when
no logical or basic channel is opened, e.g.

Bug: 270091254
Test: m VtsHalSecureElementTargetTest
Change-Id: I7df3ec6d9b6d5eeb2272971c44fc078a8558d2e6
2023-02-27 17:59:58 +00:00
Henri Chataing
9ba974d817 secure_element: Check for support of basic channel in VTS tests
Do not use the basic channel in VTS tests if the channel is not
supported by the SE.

Bug: 266384111
Test: m VtsHalSecureElementTargetTest
Change-Id: Id40e7f43f5437f8e682bbd41495d89a4a4c45997
2023-02-10 17:32:26 +00:00
Henri Chataing
4b780ebe46 secure_element: Fix the expectation for closeChannel in VTS tests
The AIDL interface states that closeChannel must return FAILED
if the channel is not opened. The default AIDL implementation
did not respect this requirement either.

Bug: 266384111
Test: m VtsHalSecureElementTargetTest
Change-Id: I3e7142e6bbeb9d79cea2c109689da59c0615167a
2023-02-02 16:20:42 +00:00
Henri Chataing
cf06db3171 secure_element: Rework the VTS tests for ISecureElement AIDL
Add missing checks for the proper use of init() interface.
Test correct channel management.

Test: atest VtsHalSecureElementTargetTest
Bug: 123254068
Change-Id: I411b070aa1a3e1d4fb4ac38d004a1cfc81e86023
2023-01-12 13:51:38 +00:00
Henri Chataing
ec9331c232 Extend the default implementation of the secure element AIDL interface
- Improved channel managemenent to report accurate errors
  to OpenBasicChannel, OpenLogicalChannel, CloseChannel

- Minimal Applet emulation to report accurate responses
  to transmit. Embed the implementation for the
  CtsAndroidOmapi test Applet to pass the CTS verifier
  tests

Test: CTS
Bug: 123254068
Change-Id: I7f28ab495f6b510d574aa52a6ebc5f877135f516
2023-01-04 14:54:14 +00:00
Bob Badour
157a8518ba [LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces
Added SPDX-license-identifier-Apache-2.0 to:
  secure_element/aidl/Android.bp
  secure_element/aidl/default/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: I5cf05e56e11214deecaf84b150852ddfb2404f38
2022-12-01 08:19:14 -08:00
Steven Moreland
6fe6954dd4 secure-element to AIDL
Bug: 205762050
Test: atest VtsHalSecureElementTargetTest (8/8 passed)
Test: atest CtsOmapiTestCases
    - all tests pass except testStatusWordTransmit,
      testTransmitApdu, and testSelectNext. This is because
      these tests don't increase coverage of the HAL API
      except they call 'transmit' several times. Doing a full
      mock OMAPI/APDU implementation for cuttlefish/AOSP is
      tracked in b/123254068

Change-Id: I0ec0eb08fbcc4207d8c07427ccdf7ff106995627
2022-11-24 01:24:13 +00:00