Commit graph

805 commits

Author SHA1 Message Date
Andrew Scull
1c91d9ccdc Merge "Add security version to config descriptor" into stage-aosp-udc-ts-dev 2023-09-20 18:55:10 +00:00
Andrew Scull
1dc9c9f7a2 Merge "Support to get EC public key from the UdsCertchain." into stage-aosp-udc-ts-dev 2023-09-20 17:18:58 +00:00
Subrahmanyaman
d1bc0389e4 Support to get EC public key from the UdsCertchain.
Bug: 297123463
Bug: 285896470
Test: VtsHalRemotelyProvisionedComponentTargetTest
(cherry picked from https://android-review.googlesource.com/q/commit:a18883a58cc9f6b702095bb17bbd0e4e894be49c)
Merged-In: I7f829b1346feeab0fd429ad7b9714181b6668b34
Change-Id: I7f829b1346feeab0fd429ad7b9714181b6668b34
2023-09-20 12:40:33 +00:00
David Drysdale
a15d593ccd Merge "KeyMint: check missing EC_CURVE on v3+" into stage-aosp-udc-ts-dev 2023-09-20 11:08:21 +00:00
Andrew Scull
95318f2960 Add security version to config descriptor
Introduce a field to the configuration descriptor that provides a
standard semantically-defined version number rather than the
vendor-defined component version which acts more like a build ID.

Test: n/a
Bug: 298580435
Bug: 282205139
(cherry picked from https://android-review.googlesource.com/q/commit:0d520e8e1751fde5a3207c6f27be88a8bbc245dc)
Merged-In: Idb0c991ab12ae75687236f2489e639e4422a0225
Change-Id: Idb0c991ab12ae75687236f2489e639e4422a0225
2023-09-19 12:29:23 +00:00
David Drysdale
24e594e05e KeyMint VTS: re-order auth failure arms
Allow for devices that claim to need external timestamps, but don't.

Test: VtsAidlKeyMintTargetTest
Bug: 300211206
(cherry picked from https://android-review.googlesource.com/q/commit:a35699cb5cfef3773afebf51c2dd38530db43bf0)
Merged-In: Ie450d9969c337d5274502f3600e14c0b481e8b34
Change-Id: Ie450d9969c337d5274502f3600e14c0b481e8b34
2023-09-15 10:46:09 +00:00
David Drysdale
e63c5bb5c3 KeyMint: check missing EC_CURVE on v3+
The original change to add this test didn't make it into the Android 13
version of the VTS test, so the version gate needs to be updated to be
v3+

Bug: 292318194
Test: VtsAidlKeyMintTargetTest --gtest_filter="*EcdsaMissingCurve*"
(cherry picked from https://android-review.googlesource.com/q/commit:9ed7d2c5bfa3958ef399567e12d84a3f67f0cb80)
Merged-In: I94bf816688e57c7c04893a23cf0399129de94229
Change-Id: I94bf816688e57c7c04893a23cf0399129de94229
2023-09-15 10:01:09 +00:00
Seth Moore
166d160b78 Only require RKP on T+ chipsets
It turns out we had a bug (b/263844771) in how RKP support was
detected, and that was fixed. However, due to this bug, some S chipests
shipped without RKP support which is now required by the tests.

This change drops the RKP requirement from S chipsets. There should be
no new S chipsets, so this effectively grandfathers in the previous
ones that were skipped by the RKP VTS tests.

T+ tests (both VTS and other suites) will verify that RKP support is
there, so there is no gap introduced by this change.

Bug: 297139913
Test: VtsAidlKeyMintTargetTest
(cherry picked from https://android-review.googlesource.com/q/commit:8be875e0d0c18b8de67744c8b9629f2ff518dd60)
Merged-In: I387e5f058ada698747aac103c1745682291f2d1c
Change-Id: I387e5f058ada698747aac103c1745682291f2d1c
2023-09-06 00:03:53 +00:00
Yusuke Yoshimura
bc88f61afb Merge "Skip ATTEST_KEY using variant on waivered devices" into stage-aosp-udc-ts-dev 2023-07-14 06:25:50 +00:00
David Drysdale
4a70416566 Allow extra ID attestation error codes am: 3f6ab601b9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2646973

Change-Id: I50cb0d0bcbc65034315fef54ef5b772fb6d3d38b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-13 07:15:02 +00:00
Treehugger Robot
fcabe78a65 Merge "Strongbox may not support 1024 bit key size for RSA." into stage-aosp-udc-ts-dev 2023-07-12 20:40:47 +00:00
David Drysdale
3f6ab601b9 Allow extra ID attestation error codes
When deliberately testing invalid ID attestation, use the helper
function (which checks the error return code is correct) in one more
place.

Test: VtsAidlKeyMintTargetTest
Bug: 286733800
Change-Id: I6ea5bd7ee19b3b172330117bfde1b16745debba7
(cherry-picked from commit c68dc93788)
Merged-In: I6ea5bd7ee19b3b172330117bfde1b16745debba7
2023-07-12 13:58:41 +00:00
David Drysdale
35621098de Fix attestation error checks
Avoid the ADD_FAILURE at the end if attestion ID failure uses an allowed
return code.

Test: VtsAidlKeyMintTargetTest
Bug: 286733800
(cherry picked from https://android-review.googlesource.com/q/commit:810fbcffed8e86a3b53e8212ce4fdb64971d812f)
Change-Id: I0dcac312ac4516a078b2742721e3a19074da52b1
Merged-In: I0dcac312ac4516a078b2742721e3a19074da52b1
2023-07-06 13:02:48 +01:00
David Drysdale
94042a987c Allow extra error code in device ID attestation
Generalize the existing helper function to allow more variants.

Remove a couple of pointless invocations of the existing helper.

Bug: 286733800
Test: VtsAidlKeyMintTargetTest
(cherry picked from https://android-review.googlesource.com/q/commit:f42238c99ffe0df2e51cec84a96ed859a878b2b0)
Merged-In: Ic01c53cbe79f55c2d403a66acbfd04029395c287
Change-Id: Ic01c53cbe79f55c2d403a66acbfd04029395c287
2023-07-06 13:01:24 +01:00
David Drysdale
b18c757eda [RESTRICT AUTOMERGE] Allow extra error code in device ID attestation
Generalize the existing helper function to allow more variants.

Manual cherry-pick of aosp/2627969 combined with aosp/2648423 to avoid
merge conflicts

Bug: 286733800
Test: VtsAidlKeyMintTargetTest
Merged-In: Ic01c53cbe79f55c2d403a66acbfd04029395c287
Merged-In: I0dcac312ac4516a078b2742721e3a19074da52b1

Change-Id: I328f7b3195d4b4dd1ed1da17377696261094ea76
2023-07-05 13:41:54 +01:00
David Drysdale
997efaa191 Skip ATTEST_KEY using variant on waivered devices
Bug: 281452355
Bug: 289451966
Test: VtsAidlKeyMintTargetTest
(cherry picked from https://android-review.googlesource.com/q/commit:c3de1caf4327dc367a95f7416cba19827428bd1b)
Merged-In: Id448edae88569518deb2db4ab7bf50d16f33709a
Change-Id: Id448edae88569518deb2db4ab7bf50d16f33709a
2023-07-04 14:17:58 +00:00
Subrahmanyaman
558dbedf51 Strongbox may not support 1024 bit key size for RSA.
Strongbox may not support 1024 bit key size for RSA.
So in NoUserConfirmation test updated the key size to
2048 so that the test works for both TEE and Strongbox.

Bug: 280117495
Test: run VtsAidlKeyMintTarget
(cherry picked from https://android-review.googlesource.com/q/commit:ce2bebdd79cf7536b06c2d67cdee8867475a3b10)
Merged-In: I32bb28001aca9b69eedb1bd3d0bcff43052d06e4
Change-Id: I32bb28001aca9b69eedb1bd3d0bcff43052d06e4
2023-07-03 17:45:42 +00:00
Rajesh Nyamagoud
ba824fe285 KM VTS test fix - handled "null" value for imei.
Added a check to make sure IMEI is not "null".

Bug: 281676499
Test: atest VtsAidlKeyMintTargetTest
(cherry picked from https://android-review.googlesource.com/q/commit:71d19b21c30596b24ba053bfd9765528ee36901d)
Merged-In: Ia1569a30412d633eee4d4de8cd00dea077d1c23d
Change-Id: Ia1569a30412d633eee4d4de8cd00dea077d1c23d
2023-05-15 16:57:04 +00:00
Tri Vo
dbb1c89347 Test cases for attested Root-of-Trust
Add tests for verfied boot state and VBMeta digest.

Bug: 255344624
Test: VtsKeyMintAidlTargetTest
Change-Id: I4f0697e1a7cb83ca87150b6683cac3084a593864
Merged-In: I4f0697e1a7cb83ca87150b6683cac3084a593864
2023-05-11 16:30:21 -04:00
Subrahmanyaman
0e0f60cff1 Support for non-factory attestation in Strongbox.
Updated the BootLoaderStateTest for strongbox implementations which
do not support factory attestation.

Bug: 255344624
Test: vts -m VtsAidlKeyMintTarget
Change-Id: I8fe176a18fc0b9e2b2d0b012b7b63124d15c9e2f
Merged-In: I8fe176a18fc0b9e2b2d0b012b7b63124d15c9e2f
2023-05-11 16:30:14 -04:00
Andrew Scull
b450714667 Document expectations of DICE mode
The Open Profile for DICE give possible guidelines on the requirements
for the DICE mode but Android needs those to be strictly specified.

Fix: 263144485
Test: n/a
(cherry picked from https://android-review.googlesource.com/q/commit:ed74a681ebf859f2652a4bbbd669f6000243aee9)
Merged-In: Ia5fc937654504199cabf4709f1c15484242e0161
Change-Id: Ia5fc937654504199cabf4709f1c15484242e0161
2023-05-10 20:18:24 +00:00
Seth Moore
33e2d0113c Add VSR annotations for RKP DICE
Bug: 277965670
Test: n/a (comment changes only)
(cherry picked from https://android-review.googlesource.com/q/commit:ac1639f227f7edb1ce284adc2a4f48f88d347da1)
Merged-In: I64e34c1f9865811f0967148cad914f7ef77f9448
Change-Id: I64e34c1f9865811f0967148cad914f7ef77f9448
2023-04-27 21:00:48 +00:00
Andrew Scull
18a1915f04 Strictly deprecate IRPC test mode key generation
It's already documented that IRPC v3 doesn't make use of test mode keys
however VTS still required support for their generation. Fix this and
simplify implementation of the v3 HAL by expecting an error in all cases
that the deprecated test mode keys are seen.

IRPC v3 also fully deprecated the EEK meaning a v3 implementation must
unconditionally report CURVE_NONE for supportedEekCurve.

The VTS tests are enhanced with contextual version constants rather than
reusing constants with seemingly unrelated names.

Bug: 278013975
Test: atest VtsHalRemotelyProvisionedComponentTargetTest
(cherry picked from https://android-review.googlesource.com/q/commit:f2ae193680d6f02a2394423f805aadd13a7d152b)
Merged-In: I5709a0b1cd77eb28e677f64bb781fad58d91570a
Change-Id: I5709a0b1cd77eb28e677f64bb781fad58d91570a
2023-04-25 13:22:39 +00:00
Treehugger Robot
3e925253ad Merge "Add checks for different size of challenge" am: a95f69da2e am: 15ffcaf669 am: 6b32036b41
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2495456

Change-Id: Iab818789f86cf498e40a4e6fb2f592b7be7d9822
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-17 05:43:33 +00:00
Treehugger Robot
a95f69da2e Merge "Add checks for different size of challenge" 2023-04-17 04:20:54 +00:00
Treehugger Robot
9d9af1049a Merge "Allow uninstantiated BootloaderStateTest" am: d83eed2fe3 am: cfc708d3ef am: d5663b9625
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2535086

Change-Id: I43e8c83658920718a9a7588ea8ab195cdd6d6f0a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-14 23:04:26 +00:00
Tri Vo
78e07d5dff Allow uninstantiated BootloaderStateTest
No tests are instantiated if KeyMint is present on the the device.
Explicitly allow that.

Bug: 277975776
Test: VtsAidlKeyMintTargetTest
Change-Id: I88f1c0a81f36d198dabcb1420b62a00bacdbb6e7
2023-04-14 11:01:22 -07:00
Tri Vo
dc91a4dbf4 Merge "Test for bootloader state" am: eb94a4f9ef am: e1c1abb059 am: cd06c1740a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2514097

Change-Id: I96df03008dc42ad6c251b8d6f22f115a9480a680
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-12 17:54:36 +00:00
Tri Vo
eb94a4f9ef Merge "Test for bootloader state" 2023-04-12 16:20:51 +00:00
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
Andrew Scull
37ce42ae95 Merge "Document that the component version can be a string" am: de49fca027 am: f82e894f01 am: 35b6a90035
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2513920

Change-Id: I2c535f073f752bc145d8a8f8770b23a5bfa0962d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-07 22:53:13 +00:00
Andrew Scull
de49fca027 Merge "Document that the component version can be a string" 2023-04-07 20:57:25 +00:00
Treehugger Robot
0da122adb4 Merge "VTS: Restore 2nd-IMEI tests" am: a3bc09e02a am: d0c6ea094d am: d1d3192505
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2517335

Change-Id: I1f95571497b6c28b2e0ffb01515090ad7a274ba6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-06 07:05:43 +00:00
Treehugger Robot
a3bc09e02a Merge "VTS: Restore 2nd-IMEI tests" 2023-04-06 05:58:35 +00:00
Tommy Chiu
728336ffa3 VTS: Restore 2nd-IMEI tests
Enable some tests that are bypassed on strongbox implementation.

Bug: 262255219
Test: VtsAidlKeyMintTargetTest
Change-Id: I548bddcd16c0a1ee1c1cb8266d4d99dbdff3d39b
2023-04-06 02:09:22 +00:00
Tri Vo
bf75a4070d Test for bootloader state
Bug: 255344624
Test: VtsKeyMintAidlTargetTest
Change-Id: I8b34a94c11d7cc174821483f624fd083ca1763ac
2023-03-30 15:45:16 -07:00
Andrew Scull
17894fc62b Merge "Use VSR to tell libhwtrust_cxx how to validate" am: c71a8d0ef1 am: 4110edd04f am: f737da6e6e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2513919

Change-Id: Ia84791a71605b76ba9a3771d03c811f3398efced
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-30 19:16:44 +00:00
David Drysdale
b521af19e9 Merge "Test specifying CERTIFICATE_NOT_{BEFORE,AFTER}" am: a2f63439c7 am: 4b6c4784be am: b06defead3
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2509815

Change-Id: I56d5673c075a71990f984aede4505c89474748b2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-30 19:16:25 +00:00
Andrew Scull
c71a8d0ef1 Merge "Use VSR to tell libhwtrust_cxx how to validate" 2023-03-30 09:36:31 +00:00
David Drysdale
a2f63439c7 Merge "Test specifying CERTIFICATE_NOT_{BEFORE,AFTER}" 2023-03-30 06:21:09 +00:00
Andrew Scull
65a514dcf6 Document that the component version can be a string
Following feedback from partners, allow the component version in the
configuration descriptor to be either an int or a string.

Bug: 273552826
Test: n/a
Change-Id: Iecc9889592a2e634a3b9e40f14347b231b703c60
2023-03-29 17:56:31 +00:00
Andrew Scull
2b1e5d9fc8 Use VSR to tell libhwtrust_cxx how to validate
The DICE chain specification changes slightly between VSR versions so
the VSR is used to select the set of validation rules that should be
applied.

Test: TH
Change-Id: I3697279d9348705a0279736c61e8333720321214
2023-03-29 17:53:14 +00:00
Andrew Scull
aae2f5adde Merge "Deprecate CSR v1 and v2 in IRPC v3" am: 74a699c4d8 am: eb06c44f4f am: 2379f9b037
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2510195

Change-Id: I65fbce13aa8cae31acc1f0eb01794de09fff0caa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-29 15:41:45 +00:00
Tommy Chiu
d53bedb5bd Correct the expection of DeviceInfo size am: 72abbbd36d am: 015b828def am: 9258bfe861
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2513015

Change-Id: I05a77f78a2f23ec29a9d58254cad077e5607c105
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-29 14:41:13 +00:00
Andrew Scull
74a699c4d8 Merge "Deprecate CSR v1 and v2 in IRPC v3" 2023-03-29 14:18:51 +00:00
David Drysdale
ad785f53dc Test specifying CERTIFICATE_NOT_{BEFORE,AFTER}
Bug: 275363977
Test: VtsAidlKeyMintTargetTest
Change-Id: I69c0577a73eabda42c8ccffce5af0e5fa45e9320
2023-03-29 14:29:35 +01:00
Tommy Chiu
72abbbd36d Correct the expection of DeviceInfo size
Bug: 275645815
Test: VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I24187be5b7b34285aa53ddaa420b871826a3b825
2023-03-29 07:11:23 +00:00
Andrew Scull
95b3131370 Deprecate CSR v1 and v2 in IRPC v3
Deprecate the CSR format from v1 and v2 of the HAL, again. The older CSR
versions were allowed in order to ease migration from the
RemoteProvisioner app over to rkpd and that has now been completed.

Bug: 260920864
Test: atest VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I4d16eb64e4ffe602b4b252159202a4ddb56d63d7
2023-03-28 18:17:34 +00:00
Tommy Chiu
fde3ad1db5 Add checks for different size of challenge
RKP allows 0 ~ 64 byte challenge to be provided.
Test it by several different size inputs.

Bug: 272392463
Test: VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I488c75745dc68778ff6d862506a5beeec82f7ac1
2023-03-28 00:57:43 +00:00
Seth Moore
c6e81d24dc Merge "Do not require StrongBox to implement RKP" am: fc746fb1aa am: d3d5e859f9 am: 4e433f800d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2507901

Change-Id: Ibaadf0b8e891abc1eca9300615926d680bba9149
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-24 23:04:29 +00:00