Commit graph

761 commits

Author SHA1 Message Date
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
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
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
Seth Moore
5a0320fbda Do not require StrongBox to implement RKP
Detect if there is an IRemotelyProvisionedComponent for strongbox, and
if so run the associated keymint tests. Else, allow strongbox to skip
the test as it's not required to implement the IRPC HAL.

Bug: 271948302
Test: VtsAidlKeyMintTargetTest
Change-Id: Ibf98e594e725d6ad14c0ff189ab9fbcc25b51f80
2023-03-24 12:29:31 -07:00
Max Bires
e8bf31b5a4 Merge "Strictly enforce DeviceInfo entries." am: 6f135a7a19 am: 52ac82b75d am: bf7fc8196d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2503517

Change-Id: I4730de5fe33f607827f70899a646ab52b5a2a15b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-24 18:10:20 +00:00
Max Bires
60c53aeb7e Strictly enforce DeviceInfo entries.
Ensure that v3 HALs have exactly the expected number of entries present
when returning DeviceInfo inside of the Certificate Signing Request. Do
not allow for additional or fewer entries.

Test: atest VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I8ea628335d5eed35ca2b65e22980e13fc9806738
2023-03-23 20:04:27 -07:00
Seth Moore
bc1363bb5c Merge "Note the relationship of patchlevels with keymint" am: 58686e5882 am: 0eaa396dc0 am: e68cc7b3e8
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2496162

Change-Id: I02a90a63169115344a1ec8e98b60360071de3cbe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-20 20:56:33 +00:00
Seth Moore
33d654b693 Merge "Add old DeviceInfo version documentation" am: d0c02789ad am: ec275b18d7 am: a6f398aa75
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2494236

Change-Id: I41f460d25f4992a895ae7c9d6c833b27afe5e799
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-17 22:49:57 +00:00
Seth Moore
192c575ffb Note the relationship of patchlevels with keymint
Some of the DeviceInfo must match existing tags in KeyMint, but this
was not documented.

Test: n/a
Change-Id: I7733e2a4b0c08b0b89ece41390c0ce0711459d82
2023-03-17 15:36:11 -07:00
Seth Moore
d0c02789ad Merge "Add old DeviceInfo version documentation" 2023-03-17 20:48:35 +00:00
Seth Moore
47194fa089 Add old DeviceInfo version documentation
Since comments are stripped from the stable AIDL snapshots, the CDDL
describing the DeviceInfo contents is lost for the older versions. Add
the comments from older DeviceInfo versions as a reference for
maintainers of older HAL implementations.

Test: n/a
Change-Id: I7dd3d285b3d8422a6df4228ad0cf5797e78609c1
2023-03-16 16:24:57 -07:00
Steven Moreland
18fc2fe524 rkp: add keymint v2 hash into rkp v2 am: 184f64bcee am: 817bdea5fc am: 80513bcab3
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2492259

Change-Id: Ib24ebeae1d897b092011f6e8347201a85c7c9c95
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-15 23:12:02 +00:00
Steven Moreland
184f64bcee rkp: add keymint v2 hash into rkp v2
When we split the rkp interface, we only added one hash to rkp v2, but
on Android S devices, this interface was in keymint v2, and so it used
the keymint v2 hash.

In order for that old implementation to be recognized, we need to add the hash in specifically.

Note: v1 was missed in b/264549860, but this was v2.

Fixes: 271513408
Test: vts_treble_vintf_vendor_test
Change-Id: I58c7c41633000df933261a147edd3477afd09a36
2023-03-15 19:48:45 +00:00
Treehugger Robot
a6b6bb18e2 Merge "Fix RKP support assumptions for keymint VTS" am: f84593a459 am: 298a35f967 am: 82710086e6
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2469486

Change-Id: Id471cffc96d7995f5b585d186ee374e0d524c31a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-14 23:02:45 +00:00
Treehugger Robot
f84593a459 Merge "Fix RKP support assumptions for keymint VTS" 2023-03-14 21:18:37 +00:00
Andrew Scull
314f40bf24 Merge "Validate DICE chain based on context" am: e5a5610018 am: e02b80a11f am: 022a26ffa2
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2485115

Change-Id: I028a7a12cb6e249ac7102961159a8b509da474fb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-14 16:50:55 +00:00
Seth Moore
a12ac74603 Fix RKP support assumptions for keymint VTS
The support level for strongbox is different from the tee
implementation. Additionally, we were incorrectly checking the keymint
aidl version. KeyMint 1.0 supported ATTEST_KEY, so it's unclear why we
were ever checking for KeyMint 2.0.

Test: VtsAidlKeyMintTargetTest
Bug: 263844771
Change-Id: I750367902fec90204d71c1e158404b2421f9ad87
2023-03-14 15:48:08 +00:00
Andrew Scull
e5a5610018 Merge "Validate DICE chain based on context" 2023-03-14 15:15:06 +00:00
Tri Vo
0250a08493 Merge "Remove KM dependency on RemoteProvisioner" am: 230ee1c79c am: c26a57f974 am: f850aba3b3
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2486035

Change-Id: I6587bac67b968c7783d5c145fe09dd33d8b3d304
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-14 01:00:07 +00:00
Tri Vo
d5d9b02219 Remove KM dependency on RemoteProvisioner
HAL implementation shouldn't require an app.

Bug: 273325840
Test: m
Change-Id: I920d29c582d288959e639f4e755d48cd4788d223
2023-03-13 13:59:00 -07:00
Andrew Scull
a601d07478 Validate DICE chain based on context
The DICE chain in the ProtectedData objects are evaluated against the
specification from v1 and v2 of the HAL whereas the chain in
AuthenticatedMessage objects are evaluated against the specification
from v3.

There are only small differences with v3 aligning to the standards where
there was previously more leniency.

Fix: 262599829
Test: TH
Change-Id: Ied14362b5530485eb6c2302a0ae0f21da9cdb33f
2023-03-13 16:52:40 +00:00
Treehugger Robot
dd6b73684c Merge "Updated to enforce leaf certificate containing attestation record to not to hold the CRL Distribution Points extension in it." am: adff54caf4 am: 3e619b8cc5 am: 8b5cf88af1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2427795

Change-Id: I6819590e2e6281db97cccde3115a538d9475ce4b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-13 12:32:59 +00:00
Treehugger Robot
adff54caf4 Merge "Updated to enforce leaf certificate containing attestation record to not to hold the CRL Distribution Points extension in it." 2023-03-11 22:25:35 +00:00
Cole Faust
f437e65d60 Merge "Baseline NewApi issues" into udc-dev 2023-03-10 18:33:57 +00:00
David Drysdale
475bb11af0 Merge "Re-order skip checks for attestation tests" 2023-03-10 07:11:56 +00:00
Tri Vo
1be04ec2d2 Merge "Update challenge size check" 2023-03-09 22:47:12 +00:00
Cole Faust
e76cbec982 Baseline NewApi issues
NewApi was recently updated to support linting methods in
the system, module_lib, and system_server sdks, and was
demoted to a warning due to the new issues it finds.
Baseline all the new issues that NewApi can be made an error
again.

These cls were generated automatically by a script that
copied the NewApi issues from the reference baselines.

Bug: 268261262
Test: m lint-check
Change-Id: I22f3b3575b6ea00d72d143019d9eed028aa98b56
2023-03-09 14:20:10 -08:00
Tri Vo
2fcd4b6bc3 Update challenge size check
aosp/2480181 changed minimum challenge size to 16.

Bug: 272392463
Test: VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I420f230651192e8fd67aab2ceff916a9c8b6db92
2023-03-09 13:23:09 -08:00
Seth Moore
ceeb357048 Merge "Fix minimum size description of challenge" 2023-03-09 20:58:22 +00:00
Seth Moore
3182cc00a3 Fix minimum size description of challenge
The server-provided challenge is almost always smaller than 32 bytes,
so we cannot enforce that as a minimum. I fixed up the CDDL a while
back, but missed one mention of the 32 byte minimum in the description.

Test: n/a (it's a comment)
Bug: 272392463
Change-Id: Ia5994e2b7cf107ab131c6b028bee7881d0e657ac
2023-03-09 12:54:08 -08:00
David Drysdale
5b94874691 Re-order skip checks for attestation tests
Put the test arm that just involves checking a property
first, so that tests which involve a round trip to the Package
Manager are only executed when they're needed.

Test: VtsAidlKeyMintTargetTest
Bug: 271026714
Change-Id: I4caad6243a3b9d511a32717fd95f58864b857eeb
2023-03-09 11:03:10 +00:00
David Drysdale
4cbe215e34 Allow for 32-bit VTS builds
In 32-bit builds a `long` may be 32 bits, but the `long` values on an
AIDL interface are 64 bits.  Therefore need to use `int64_t` for the
corresponding C++ type, not `long`.

Bug: 271056044
Test: VtsAidlKeyMintTargetTest --gtest_filter="*AuthTest*" (32-b)
Change-Id: I19f5a1d825dfcc45087534bbd4239a13cdfec3f7
2023-03-07 14:47:11 +00:00
Rajesh Nyamagoud
e98263ec55 Updated to enforce leaf certificate containing attestation record
to not to hold the CRL Distribution Points extension in it.

Bug: 260332189
Test: atest VtsAidlKeyMintTargetTest
Change-Id: I7b191b4351984ce82db0e9440027ddbfc14b1c3a
2023-03-03 16:48:28 +00:00
Yi Kong
bd5d365d82 Fix return-stack-address warning
hardware/interfaces/security/keymint/aidl/vts/performance/KeyMintBenchmark.cpp:79:26: error: reference to stack memory associated with local variable 'message' returned [-Werror,-Wreturn-stack-address]
return std::move(message);
^~~~~~~

Test: presubmit
Change-Id: I4298b4a25ccb809a7ae180bb218e673a7f1aa623
2023-03-01 16:19:43 +09:00
Alice Wang
6fdd6b000b Merge "[dice] Remove unused service android.hardware.security.dice" 2023-02-28 08:22:40 +00:00
Treehugger Robot
657934eebb Merge "Update KeyMint VTS tests to use pre-defined API level symbols" 2023-02-27 11:19:50 +00:00
Tri Vo
20bb427427 Merge "Add test for IRPC DeviceInfo" 2023-02-24 18:02:14 +00:00
Alice Wang
acc1a5bd38 [dice] Remove unused service android.hardware.security.dice
This cl removes the unused service android.hardware.security.dice
together with all its usages (all of them are tests), because the
service is incomplete and not used anywhere for now and in the
near future.

The cl also removes dice from the compat matrix.

This helps us reduce some maintainance burden for the Rust dice
wrapper libraries such as libdiced_open_dice[_nostd],
libdiced_sample_inputs, libdiced_utils and their tests.

Test: atest diced_utils_test diced_sample_inputs_test \
diced_open_dice_cbor_test \
libdiced_open_dice_nostd.integration_test \
libdiced_open_dice.integration_test diced_open_dice_cbor_test
Test: m pvmfw_img microdroid_manager
Bug: 267575445
Bug: 270511529

Change-Id: I3d2497d2e8d3f88c49cae9ae80a6b4f7b652cc4a
2023-02-24 09:03:11 +00:00
Tri Vo
ec50ee162a Add test for IRPC DeviceInfo
Bug: 243148852
Test: atest VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: If873996f0d756662808d785d2ef57118737a5aab
2023-02-23 20:01:31 -08:00
Treehugger Robot
53faa27ace Merge "Correct AttestKey test that checks Qualcomm's SPU waiver." 2023-02-23 20:43:12 +00:00
David Drysdale
e85498a968 Merge "Add Gatekeeper-based auth tests" 2023-02-23 11:44:43 +00:00
Shawn Willden
1a545db363 Update KeyMint VTS tests to use pre-defined API level symbols
Test: VtsKeyMintAidlTargetTest
Change-Id: I11ccd0c4959a2b3504009fdd95f4a313a5d6d5f6
2023-02-22 16:06:19 -07:00
Shawn Willden
3a4a3a95b8 Correct AttestKey test that checks Qualcomm's SPU waiver.
The test exempted KeyMint on the affected chips from having to implement
ATTEST_KEY if they have StrongBox in all Android releases from Android S
onwards, but the waiver was given only for Android S and T.  This CL
changes the test to reinstate the requirement after Android T.

Test: VtsAidlKeyMintTargetTest
Change-Id: I8481ae31de34aae220af7e7188632edcc2d391f0
2023-02-22 16:06:19 -07:00
David Drysdale
28fa931f00 Add Gatekeeper-based auth tests
Add tests that directly exercise Gatekeeper to get auth tokens for use
with auth-bound keys.

Test: VtsAidlKeyMintTargetTest
Change-Id: Ie668674d81ca487e8bbc18fdd9f36610bcab4c8c
2023-02-22 07:14:25 +00:00
Treehugger Robot
efd4cf71e5 Merge "Enforce boot and vendor patch level format always" 2023-02-21 18:36:50 +00:00
Rajesh Nyamagoud
5283f81f64 Adding a test using second IMEI as attestation ids.
1. Using second IMEI as attestation id without using first IMEI.
       Test should generate a key using second IMEI as attestation id
       without using first IMEI as attestation id. Test should validate
       second IMEI in attesation record.

    2. Using first IMEI as well as second IMEI as attestation ids.
       Test should generate a key using first IMEI and second IMEI as
       attestation ids. Test should validate first IMEI and second IMEI
       in attestation record.

Test: atest -c VtsAidlKeyMintTargetTest
Bug: 263197083, 264979486
Change-Id: I61c3f32e15a8d478a838d14e7db9917a33682267
2023-02-20 20:40:12 +00:00
Tri Vo
b21e6df7c2 Enforce boot and vendor patch level format always
Test: atest VtsAidlKeyMintTargetTest
Change-Id: I80bc96a6aee62474b33b015b6d04de7527fe757c
2023-02-17 14:55:51 -08:00