Commit graph

474 commits

Author SHA1 Message Date
Treehugger Robot
f65abbd1c8 Merge "Allowing GSI patch level to be greater than vbmeta SPL" am: b22330e065 am: c12559f79e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1256345

Change-Id: If6721904a50f164626d30460a2b13c59ffd2814f
2020-09-02 03:39:52 +00:00
Treehugger Robot
c12559f79e Merge "Allowing GSI patch level to be greater than vbmeta SPL" am: b22330e065
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1256345

Change-Id: Ic3b7ee64244f03625af7cd2aea055f31febdb19d
2020-09-02 02:27:02 +00:00
TreeHugger Robot
484456242d Merge "Keymaster: update the verifyAuthorization call time and delta time in VerificationToken VTS" into stage-aosp-rvc-ts-dev am: 9ade092595 am: 872216fd37
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12430970

Change-Id: I065b9d6122747a55eb4decf0b32b7ff20756e26c
2020-08-31 18:34:09 +00:00
Xin Li
36dcf1a404 Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I6502829205ede2de914b27e6c2c5c42916af2b39
Change-Id: I7cb06511e43bd1fffd5f80a11dbdf5b1314cfe8e
2020-08-28 13:05:04 -07:00
Bowgo Tsai
63c0129fa6 Allowing GSI patch level to be greater than vbmeta SPL
The GSI patch level might be greater than the vbmeta SPL, because
GSI system.img might be updated via the DSU flow, where vbmeta.img won't
be updated in this scenario.

  https://developer.android.com/topic/dsu

Allowing GSI patch level to be greater than or equal to the vbmeta SPL,
since Treble allows new system.img works on old vendor images.

Bug: 145377203
Test: atest VtsHalKeymasterV4_0TargetTest
Change-Id: Ib761d80c88695eb2db08b0dc00e30fcdc2788865
2020-08-26 13:16:25 +08:00
Treehugger Robot
1790d8c313 Merge "Disable the test TooManyOperations in keymaster VTS" am: 8a42374ffa am: bf31c055f5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1370458

Change-Id: I438ee9a69722fc6e190a0c5440194dbd29c839ea
2020-08-26 00:37:03 +00:00
kh0705
f5b567afab Keymaster: update the verifyAuthorization call time and delta time in VerificationToken VTS
The keymaster function affects the performance of secure os. When considering the swtiching time of the normal world < - > Secure world and the processing delay of the SecureOS by the scheduling policy of the normal world, it is necessary to increase the time.
Even though Secure world is no problem, Sometimes there is a possibility of that the test will fail because it is a limited resource normal world.
On average, it is performed in a very fast time, but sometimes it takes a lot of time. After many tests, the safe time was measured.

Bug: 162115135

Change-Id: I55862204ef71f69bc88c79fe2259f7cb8365699a
Signed-off-by: kh0705 <kh0705.park@samsung.com>
2020-08-24 15:01:16 +08:00
Treehugger Robot
8a42374ffa Merge "Disable the test TooManyOperations in keymaster VTS" 2020-08-19 19:07:08 +00:00
Eran Messeri
6a1198e166 Merge "Fix Keymaster VTS unique attestation failure" am: 3e4d8d0856 am: b0f932739a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1372156

Change-Id: I0e2ee2609c8fcf82ad31d9c97423b9006862cb97
(cherry picked from commit 4e3c9a1d65)

Bug: 160518399

Exempt-From-Owner-Approval: already approved as aosp/1372156.
Change-Id: I0e2ee2609c8fcf82ad31d9c97423b9006862cb97
2020-08-05 14:54:17 +00:00
Dan Shi
e5c9b5e722 Suppress gtest error for tests without any instance am: ba4d532fee am: 73122cd284
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1374050

Change-Id: Ie5e956d4613f5e947c36ba4f1048f0c3aa8944ba
2020-07-29 05:45:58 +00:00
Dan Shi
ba4d532fee Suppress gtest error for tests without any instance
Bug: 162052785
Test: m -j vts
Change-Id: I8c1a48e6fbd7c8161137902b5332911fa0d7b8b3
2020-07-28 15:12:32 -07:00
Eran Messeri
4e3c9a1d65 Merge "Fix Keymaster VTS unique attestation failure" am: 3e4d8d0856 am: b0f932739a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1372156

Change-Id: I0e2ee2609c8fcf82ad31d9c97423b9006862cb97
2020-07-24 13:34:02 +00:00
allen.zhang
569a61290e Fix Keymaster VTS unique attestation failure
Adding TAG_DEVICE_UNIQUE_ATTESTATION & CheckedDeleteKey()
in TEST_P(DeviceUniqueAttestationTest, NonStrongBoxOnly)
Test procedure:
1.Build APP "VtsHalKeymasterV4_1TargetTest" in android project,
then replace it to VTS testcase(version in 0610).
2. ./vts-tradefed
3.run vts -m VtsHalKeymasterV4_1TargetTest
Result:all testcase pass

Bug: 158724430
Test: m VtsHalKeymasterV4_1TargetTest && echo run vts -m VtsHalKeymasterV4_1TargetTest | ./vts-tradefed

Change-Id: I693c23596a045bf9af9fe6cc483924fd7cfc6ce6
2020-07-23 12:39:13 +01:00
Gaurav Kashyap
48f67e8438 Disable the test TooManyOperations in keymaster VTS
The test fails on devices because an unknown
client starts a keymaster BEGIN operation during
bootup but does not finish it. This affects the
keymaster hardware implementation's capability
to support the maximum possible operations while
running this test.

Bug: 154801042

Change-Id: Ib6adc6c28ebe76ddfdc2c66cd17cf78c04e5b468
2020-07-22 11:14:44 -07:00
Jooyung Han
d610435ac4 update hidl .bp
HIDL libs are not necessarily part of VNDK now. Because some are
used by VNDK libs, they are still VNDK. But rest are now just
vendor-available.

.hidl_for_test files are also removed because they are used to exclude
test-purpose hidl libs from VNDK libs.

Instead, .hidl_for_system_ext files are added to tests/lazy to
distinguish them from others which are installed /system.

Bug: 143933769
Test: update-makefiles.sh && m com.android.vndk.current
Merged-In: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
Change-Id: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
(cherry picked from commit b0907a6bb8)
2020-07-07 16:22:36 +09:00
Joseph Jang
955aa4ecc6 Merge "Keymaster: Fix potential bug in extractUint32()/extractUint64()" am: 991650fd8a am: e9e59bd5d1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1354466

Change-Id: I1bf12c37f39067857ab27f51ed08bbe1bfd73ef3
2020-07-07 03:01:03 +00:00
josephjang
4feb8cd284 Keymaster: Fix potential bug in extractUint32()/extractUint64()
In deserializeVerificationToken(), we use extractUint64() to extract
VerificationToken.challenge. A potential bug was found in
extractUint64() that will cause VerificationToken.challenge()
incorrect.

Bug: 160198696
Merged-In: Ie0d2c0127cc34f1bb90455e4f7869e15e5542173
Change-Id: Ie0d2c0127cc34f1bb90455e4f7869e15e5542173
2020-07-06 07:03:27 +00:00
josephjang
c96b1fab12 Keymaster: Fix potential bug in extractUint32()/extractUint64()
In deserializeVerificationToken(), we use extractUint64() to extract
VerificationToken.challenge. A potential bug was found in
extractUint64() that will cause VerificationToken.challenge()
incorrect.

Bug: 160198696
Change-Id: Ie0d2c0127cc34f1bb90455e4f7869e15e5542173
2020-07-06 14:53:55 +08:00
Jooyung Han
d18cba85fe update hidl .bp
HIDL libs are not necessarily part of VNDK now. Because some are
used by VNDK libs, they are still VNDK. But rest are now just
vendor-available.

.hidl_for_test files are also removed because they are used to exclude
test-purpose hidl libs from VNDK libs.

Instead, .hidl_for_system_ext files are added to tests/lazy to
distinguish them from others which are installed /system.

Bug: 143933769
Test: update-makefiles.sh && m com.android.vndk.current
Merged-In: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
Change-Id: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
(cherry picked from commit b0907a6bb8)
2020-07-02 12:26:37 +09:00
Shawn Willden
a2a6a33ea9 Fix delivery of earlyBootEnded to KM4.1
Bug: 152932559
Test: Boot and observe that Strongbox gets the message
Merged-In: I752b44f5cc20d85bf819188ccaaf0813a5607ba5
Change-Id: I752b44f5cc20d85bf819188ccaaf0813a5607ba5
2020-06-01 14:08:39 -06:00
Bowgo Tsai
307d2bba7d Allow unlocked in VTS
VTS was running on a userdebug build GSI before Android 10.
Starting from Android 10, VTS is switched to running on top of a
user build GSI image, plus the device-specific boot-debug.img to
allow adb root.

   https://source.android.com/compatibility/vts/vts-on-gsi

So 'ro.build.type' will be 'user' because the value comes from
/system/build.prop. Switching to using 'ro.debuggable' to decide
whether we should check the device is locked or not. Note that
'ro.debuggable' will be '1' for userdebug/eng images or when a
boot-debug.img is used.

Bug: 154449286
Test: atest VtsHalKeymasterV4_0TargetTest
Change-Id: If5a90d62f77489aa58f96e908553a052cf6d1e18
Merged-In: If5a90d62f77489aa58f96e908553a052cf6d1e18
(cherry picked from commit 43dd6e34bd)
2020-06-01 13:20:52 +08:00
Bowgo Tsai
40eb1a490b Allow unlocked in VTS am: 43dd6e34bd am: 767b4b3c2a
Change-Id: Ia559b9083b1ac7960b93f710fc5cb2d5390dfac7
2020-06-01 04:25:02 +00:00
Bowgo Tsai
43dd6e34bd Allow unlocked in VTS
VTS was running on a userdebug build GSI before Android 10.
Starting from Android 10, VTS is switched to running on top of a
user build GSI image, plus the device-specific boot-debug.img to
allow adb root.

   https://source.android.com/compatibility/vts/vts-on-gsi

So 'ro.build.type' will be 'user' because the value comes from
/system/build.prop. Switching to using 'ro.debuggable' to decide
whether we should check the device is locked or not. Note that
'ro.debuggable' will be '1' for userdebug/eng images or when a
boot-debug.img is used.

Bug: 154449286
Test: atest VtsHalKeymasterV4_0TargetTest
Change-Id: If5a90d62f77489aa58f96e908553a052cf6d1e18
2020-05-29 07:49:11 +00:00
David Zeuthen
b1e8ff545a Identity Credential: Add method to accept verification token.
This is to facilitate HAL implementations using a TA existing in a
different environment than where auth tokens are minted. This method
will be used by credstore in a companion CL.

This modifies version 2 of the Identity Credential API (which was
never been released) to add a new method and creates version 2 of the
Keymaster types-only AIDL API to include the new VerificationToken
parcelable and SecurityLevel enum.

Bug: 156076333
Test: atest VtsHalIdentityTargetTest
Test: atest android.security.identity.cts
Merged-In: I7d05413a9ec70225ce419079f3cc9daf026cf744
Change-Id: Idd7ab041d87617556ed840403033b642f8c2ab86
2020-05-18 15:55:21 -04:00
Steven Moreland
1fd48bb036 Merge "Reminder to freeze keymaster at version "5"" am: a634e859df am: b9e98012e4
Change-Id: I08e4083e092030aaf16eb81c69783d9b1d24dc84
2020-05-11 19:45:36 +00:00
Treehugger Robot
5f2523d609 Merge "Identity Credential: Add method to accept verification token." am: 1ac087e4d6 am: 40577ac4f9
Change-Id: I232a8c45dd5d94cf8a2a2215fa99dd54425a9789
2020-05-11 19:45:12 +00:00
Steven Moreland
a634e859df Merge "Reminder to freeze keymaster at version "5"" 2020-05-11 17:46:10 +00:00
Steven Moreland
3c1519c550 Reminder to freeze keymaster at version "5"
Fixes: 155808722
Test: freeze-api produces error
Change-Id: I0b6d41a129f1a8cb064c394c73a3a70a6f2abc32
2020-05-08 16:33:55 +00:00
David Zeuthen
a8ed82cbb4 Identity Credential: Add method to accept verification token.
This is to facilitate HAL implementations using a TA existing in a
different environment than where auth tokens are minted. This method
will be used by credstore in a companion CL.

This modifies version 2 of the Identity Credential API (which was
never been released) to add a new method and creates version 2 of the
Keymaster types-only AIDL API to include the new VerificationToken
parcelable and SecurityLevel enum.

Bug: 156076333
Test: atest VtsHalIdentityTargetTest
Test: atest android.security.identity.cts

Change-Id: I7d05413a9ec70225ce419079f3cc9daf026cf744
2020-05-08 11:33:23 -04:00
TreeHugger Robot
830c4875ad Merge "Round off attestation tests." into rvc-dev am: 2023afbe66
Change-Id: I1c83c78bd3ac674a5f4aeb2356d4e127ef2d617c
2020-05-07 16:28:58 +00:00
TreeHugger Robot
d35a504e05 Merge "Fix StrongBoxOnly test" into rvc-dev am: ba1a4c7f6d
Change-Id: Ie7ecb3d434786f3cf4bdb472cfe0c7cbfe673e4d
2020-05-07 16:28:44 +00:00
Treehugger Robot
349af3e40c Merge "Allow device properties tags for attestation" am: 9a2f497439 am: 3fd8b10984
Change-Id: I3b8e79ebf16b60d9236f1ba207255950ade3c701
2020-04-24 08:30:54 +00:00
nagendra modadugu
eb7f3527de Round off attestation tests.
This CL needs some polish.  Changes
herein are somewhat brute-force to
make things work, particularly with
authorization-list parsing and validation.

This CL also copies over support for
dumping attestation records.

Bug: 129282228
Test: VtsHalKeymasterV4_1TargetTest
Change-Id: I4fc0183dc0b8a76e84d14054b38ad7c1540a1897
2020-04-22 04:21:36 +00:00
nagendra modadugu
5d531a26c0 Fix StrongBoxOnly test
This test is expected to be run
on non-StrongBox instances.

Bug: 129282228
Test: StrongBoxOnly passes on TZ
Change-Id: Ia6b274d097b4c698904d1c51daed821188a50510
2020-04-22 02:17:08 +00:00
Dorin Drimus
b20a4e01ef Allow device properties tags for attestation
Test: atest CtsKeystoreTestCases
Bug: 152945378
Change-Id: I9c85283f007535612bf4ebbfbe8b7e86a758286c
2020-04-20 17:44:56 +02:00
TreeHugger Robot
0260d7d1ee Merge "Fix delivery of earlyBootEnded to KM4.1" into rvc-dev 2020-04-15 14:56:34 +00:00
Shawn Willden
08c7e71236 Fix delivery of earlyBootEnded to KM4.1
Bug: 152932559
Test: Boot and observe that Strongbox gets the message
Change-Id: I752b44f5cc20d85bf819188ccaaf0813a5607ba5
2020-04-14 21:48:11 -06:00
TreeHugger Robot
ecd5e55cc1 Merge "Correct UseHmacKey parameter" into rvc-dev 2020-04-15 02:19:58 +00:00
Treehugger Robot
08ea51852b Merge "Remove IOperation and beginOp." 2020-04-10 16:23:49 +00:00
Shawn Willden
ca71a6e839 Merge "Fixed encoding of device_locked field" into rvc-dev 2020-04-10 16:08:07 +00:00
Shawn Willden
994c65e5bc Fixed encoding of device_locked field
The attestation code used boringssl's ASN.1 encoding tools
incorrectly, causing it to encode incorrect values in device_locked.

Bug: b/152503089
Test: Build & boot
Merged-In: I3c5352523b2db37d539ad353ac8c48c1585eb08d
Change-Id: I3c5352523b2db37d539ad353ac8c48c1585eb08d
2020-04-09 15:44:36 -06:00
Jeongik Cha
a73d6bc97e Freeze vintf aidl interfaces
AIDL interfaces which are vintf-stable have to be frozen in release.
But these interfaces have been never frozen, so freeze them.

- android.hardware.power
- android.hardware.identity
- android.hardware.keymaster
- android.hardware.vibrator
- android.hardware.light
- android.hardware.tests.extension.vibrator

Bug: 153500421
Bug: 153500550
Bug: 153511407
Bug: 153500549
Bug: 153501107
Bug: 153501202
Test: m
Change-Id: I643c25fc695f9d1e874dcceb327d465c49e9cab6
Merged-In: I643c25fc695f9d1e874dcceb327d465c49e9cab6
2020-04-09 08:27:34 +00:00
Treehugger Robot
15664d3f58 Merge "Freeze vintf aidl interfaces" 2020-04-09 07:49:49 +00:00
Jeongik Cha
cfb374895d Freeze vintf aidl interfaces
AIDL interfaces which are vintf-stable have to be frozen in release.
But these interfaces have been never frozen, so freeze them.

- android.hardware.power
- android.hardware.identity
- android.hardware.keymaster
- android.hardware.vibrator
- android.hardware.light
- android.hardware.tests.extension.vibrator

Bug: 153500421
Bug: 153500550
Bug: 153511407
Bug: 153500549
Bug: 153501107
Bug: 153501202
Test: m
Change-Id: I643c25fc695f9d1e874dcceb327d465c49e9cab6
2020-04-08 20:28:40 +09:00
Jiyong Park
fbaea712a3 Update the current API dump
All aidl_interface modules should by default considered as stable, in
case it is used across system and vendor partitions, or across modules.
Like other API surfaces, we need to have a dump for the current
(yet-to-be-released) version and update it when there is an API change.
This is done via .

Then the owner of the interface can freeze the current version as a
numbered version via .

This change shal be rejected only when the owner is certain that the
interface is not used across the updatable boundaries.

Bug: 152655547
Test: m
Change-Id: Id167905590c0a596b0ed470ef668c47810966836
Merged-In: Id167905590c0a596b0ed470ef668c47810966836
2020-04-08 18:38:49 +09:00
Dan Shi
aad51fa000 Rename vts-core to vts
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL update suite name vts-core to vts as
the suite name is updated. This CL won't change test logic or behavior.

Change-Id: I562b4dc50765e953800a814a8fd84a01c1b9352b
Merged-In: I562b4dc50765e953800a814a8fd84a01c1b9352b
2020-04-07 16:37:40 -07:00
Dan Shi
ba894f81db Rename vts-core to vts
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL update suite name vts-core to vts as
the suite name is updated. This CL won't change test logic or behavior.

Change-Id: I562b4dc50765e953800a814a8fd84a01c1b9352b
Merged-In: I562b4dc50765e953800a814a8fd84a01c1b9352b
2020-04-07 15:17:02 -07:00
Shawn Willden
e32c142da4 Remove IOperation and beginOp.
The way I planned for this to work doesn't work.  We'll revisit in
Keymaster5.  For now, removing IOperation and beginOp.

Test: Build & boot
Merged-In: I017d17079380cc3bacc6f05b2486e1b6e6c3f675
Change-Id: I017d17079380cc3bacc6f05b2486e1b6e6c3f675
2020-04-02 12:47:32 -06:00
Shawn Willden
664ff765af Fixed encoding of device_locked field
The attestation code used boringssl's ASN.1 encoding tools
incorrectly, causing it to encode incorrect values in device_locked.

Bug: b/152503089
Test: Build & boot
Change-Id: I3c5352523b2db37d539ad353ac8c48c1585eb08d
2020-04-01 13:54:33 -06:00
Tommy Chiu
83691500e1 Correct UseHmacKey parameter
HMAC key was created with Digest(Digest::SHA_2_256) which is missing in
the UseHmacKey function

Bug: 152932473
Test: VtsHalKeymasterV4_1TargetTest
Change-Id: If63dd197fe12172e14be9890ab07a00c3eef4a4c
2020-04-01 07:02:35 +00:00