Commit graph

8612 commits

Author SHA1 Message Date
Rajesh Nyamagoud
19fe29adb3 Removed dependency on libkeymint_vts_test_utils.
Test: mmm system/security/keystore2/test_utils/; mmm system/security/keystore2/tests;
atest keystore2_client_tests; atest keystore2_test_utils_test; atest keystore2_test; atest keystore2_legacy_blobs_test;
Bug: 194359114

Change-Id: I2e17697c8ea54b1c38e128b32b4d30f1214c51fc
2023-10-06 23:15:21 +00:00
Eric Biggers
37e72923ce IKeystoreMaintenance.aidl: document permissions correctly
Test: N/A
Change-Id: Ia31dd277e17d32b857d1dd0fe58b8903c6ad2679
2023-10-06 21:42:06 +00:00
Rajesh Nyamagoud
3f6c15c656 Restructuring of AAID using aidl_interface build system.
Making changes to use cpp backend generated by aidl_interface
build system for KeyAttestationApplicationProvider.
Removed custom parcelables defined for AAID.
Updated the tests to use the aidl_interface generated bindings.

Bug: 267452060
Test: atest android.keystore.cts.KeyAttestationTest; atest
keystore_unit_tests; keystoreSignature_fuzzer;
keystorePackageInfo_fuzzer; keystoreApplicationId_fuzzer;
keystoreAttestationId_fuzzer

Change-Id: Ibdfb8e2837538d01a04b6771b1a71c38529d1307
2023-10-06 04:23:41 +00:00
Shaquille Johnson
776dfe3ece Merge "Use pragma WAL in db connections" into main am: 3df6966cd6 am: 1a7cd1d195 am: 5b84c49f36 am: a4d9e1e6ec
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2763288

Change-Id: I01f13c9eab1311dcd21a3a7668bb4f2bfbf73666
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-04 14:05:08 +00:00
Shaquille Johnson
a4d9e1e6ec Merge "Use pragma WAL in db connections" into main am: 3df6966cd6 am: 1a7cd1d195 am: 5b84c49f36
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2763288

Change-Id: I782112d28b83676ccb03a01c14f1a4d236e9e91a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-04 13:31:54 +00:00
Shaquille Johnson
5b84c49f36 Merge "Use pragma WAL in db connections" into main am: 3df6966cd6 am: 1a7cd1d195
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2763288

Change-Id: I8457fbf76c3400e018fa053a5e7f5e41c9cdc99c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-04 13:02:06 +00:00
Shaquille Johnson
1a7cd1d195 Merge "Use pragma WAL in db connections" into main am: 3df6966cd6
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2763288

Change-Id: I62e8915eeb935c11f7e54ff788f513e9cab1694b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-04 12:17:53 +00:00
Shaquille Johnson
3df6966cd6 Merge "Use pragma WAL in db connections" into main 2023-10-04 11:40:49 +00:00
Shaquille Johnson
7f5a815ac4 Use pragma WAL in db connections
WAL mode allows db connections to open when the disk
is full. This is done in the current and legacy db and
tested manually by the commandline.

Testing: Filled a file with empty values until it took up all the space on the disk then accessed the database. This was not possible with this mode disabled but was once I enabled it on a new flash

Bug: 191777960
Test: atest keystore2_test and atest CtsKeystoreTestCases, filled real device to full and tested
Change-Id: Ic1a45fd635168061a6c5489a42a67cb59d3ddc6a
2023-10-03 11:39:28 +00:00
Shaquille Johnson
2fad560eda Merge "Remove java generated files" into main am: 89f48f77c8 am: ab681b262f am: 6bd3a6b4a5 am: 8fe308b124
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2766245

Change-Id: I8d6eb7476ccce9b4b343b43a58f7f53f4a6dc99e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 14:02:26 +00:00
Shaquille Johnson
8fe308b124 Merge "Remove java generated files" into main am: 89f48f77c8 am: ab681b262f am: 6bd3a6b4a5
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2766245

Change-Id: I000cf6d51b3db90462c358b4e2fd63aa016b91e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 13:16:25 +00:00
Shaquille Johnson
6bd3a6b4a5 Merge "Remove java generated files" into main am: 89f48f77c8 am: ab681b262f
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2766245

Change-Id: I8832ef1401ba118b26d72d7086f684ccc46382d6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 12:15:16 +00:00
Shaquille Johnson
ab681b262f Merge "Remove java generated files" into main am: 89f48f77c8
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2766245

Change-Id: I49779d4ca387bcbb722777f4abd7d4c790199dc0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 11:08:58 +00:00
Shaquille Johnson
89f48f77c8 Merge "Remove java generated files" into main 2023-09-28 10:31:28 +00:00
Treehugger Robot
fb29c5eead Merge "Add aconfig flags for rust keystore2" into main am: 2ff4165d26 am: 8537a2456f am: 608e05c481 am: 0afbfbd4fc
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2763287

Change-Id: Icce9120ad7d6c28169cbfd1e826dd7168c0f7b6e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-27 23:38:23 +00:00
Treehugger Robot
0afbfbd4fc Merge "Add aconfig flags for rust keystore2" into main am: 2ff4165d26 am: 8537a2456f am: 608e05c481
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2763287

Change-Id: I3c8d0cba57709c739be5ba257fef92e55d2f9d84
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-27 22:52:52 +00:00
Treehugger Robot
608e05c481 Merge "Add aconfig flags for rust keystore2" into main am: 2ff4165d26 am: 8537a2456f
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2763287

Change-Id: Ie0d77b4219e042e5631a1b142040c0faf29826d8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-27 21:51:35 +00:00
Shaquille Johnson
bce0cac39f Remove java generated files
Remove improper import and make the flag a constant
with the read only option

Bug: 191777960
Test: m keystore2
Change-Id: I34bd2d0d891686c93a167456e8d50eec75374244
2023-09-27 22:28:05 +01:00
Treehugger Robot
8537a2456f Merge "Add aconfig flags for rust keystore2" into main am: 2ff4165d26
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2763287

Change-Id: I64d10a4157680f0fa4ef8e3e4eec094a44d4da7a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-27 20:45:33 +00:00
Treehugger Robot
2ff4165d26 Merge "Add aconfig flags for rust keystore2" into main 2023-09-27 19:48:49 +00:00
Shaquille Johnson
6a751993d5 Add aconfig flags for rust keystore2
Test: m keystore2
Change-Id: I0bdd3d34a4e78500b266b8aac321ff1e2903dffb
2023-09-27 17:08:42 +01:00
Seth Moore
45b9e69e92 Merge "Include challenge in test_rkpd_attestation_key_upgrade" into main am: 373225c6c5 am: c59cdc597f am: b24b6bde7c am: b4d57c9597
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2762489

Change-Id: I1402c80a3af912db29f525bf88bb3f4185a6d588
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-26 23:16:06 +00:00
Seth Moore
b4d57c9597 Merge "Include challenge in test_rkpd_attestation_key_upgrade" into main am: 373225c6c5 am: c59cdc597f am: b24b6bde7c
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2762489

Change-Id: I996a16c9e38457c171c9ad79611595082bb8f1ea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-26 22:38:50 +00:00
Seth Moore
b24b6bde7c Merge "Include challenge in test_rkpd_attestation_key_upgrade" into main am: 373225c6c5 am: c59cdc597f
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2762489

Change-Id: I7ce1514b7543e4964a2354d2dcef2828d51a9c96
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-26 21:39:40 +00:00
Seth Moore
c59cdc597f Merge "Include challenge in test_rkpd_attestation_key_upgrade" into main am: 373225c6c5
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2762489

Change-Id: I856468f9f57314a92928427dd35ef0450d6f91aa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-26 20:39:28 +00:00
Seth Moore
373225c6c5 Merge "Include challenge in test_rkpd_attestation_key_upgrade" into main 2023-09-26 19:25:05 +00:00
Seth Moore
29fd461ceb Include challenge in test_rkpd_attestation_key_upgrade
KeyMint.generateKey requires a challenge to be passed when a key
blob is also passed. The test missed this, and was thus failing on
compliant HALs.

Bug: 301223273
Test: keystore2_test
Change-Id: Icf7a32683c85d87fddd7d05ba07a110bb4e38c79
2023-09-26 10:45:43 -07:00
Treehugger Robot
521915a263 Merge "Reuse error mapping logic for key operation metrics" into main am: 6b57def860 am: 61e02ba90d am: 600a7bc8e6 am: bcbf660e58
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2736534

Change-Id: I59c8eab5e59e6b462655d61fd0a1cdffd3eb1ae2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-20 18:22:29 +00:00
Treehugger Robot
bcbf660e58 Merge "Reuse error mapping logic for key operation metrics" into main am: 6b57def860 am: 61e02ba90d am: 600a7bc8e6
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2736534

Change-Id: Iefc27a44243d1fea4bee626c21c4f51a2c8fe2c7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-20 17:42:20 +00:00
Treehugger Robot
600a7bc8e6 Merge "Reuse error mapping logic for key operation metrics" into main am: 6b57def860 am: 61e02ba90d
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2736534

Change-Id: Idf4fc13c0c8754b167d9f26e1b8c1071b6ae03b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-20 16:48:17 +00:00
Treehugger Robot
61e02ba90d Merge "Reuse error mapping logic for key operation metrics" into main am: 6b57def860
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2736534

Change-Id: Ie2d78eca613d4c705ad0e3c75913c2cce14d3e56
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-20 15:50:07 +00:00
Treehugger Robot
6b57def860 Merge "Reuse error mapping logic for key operation metrics" into main 2023-09-20 15:23:14 +00:00
Treehugger Robot
799f4a635a Merge "[dice] Add nostd version of libdiced_sample_inputs" into main am: 63207be169 am: 379147ee95 am: cd347259e2 am: f814bd924f
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2756507

Change-Id: I99ce27bc384ea7b7e8edb4f39193a686910ec1a5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-20 14:48:00 +00:00
Treehugger Robot
f814bd924f Merge "[dice] Add nostd version of libdiced_sample_inputs" into main am: 63207be169 am: 379147ee95 am: cd347259e2
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2756507

Change-Id: I4d8bd34293d31872b4b263232c48355eadff46eb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-20 14:07:17 +00:00
Treehugger Robot
cd347259e2 Merge "[dice] Add nostd version of libdiced_sample_inputs" into main am: 63207be169 am: 379147ee95
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2756507

Change-Id: I0aba62e7d2617eff1863295da4740b8648206151
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-20 13:15:02 +00:00
Treehugger Robot
379147ee95 Merge "[dice] Add nostd version of libdiced_sample_inputs" into main am: 63207be169
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2756507

Change-Id: Ife1599e44cf555433b87290184b89f2fa2f1b741
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-20 12:16:45 +00:00
Treehugger Robot
63207be169 Merge "[dice] Add nostd version of libdiced_sample_inputs" into main 2023-09-20 11:46:29 +00:00
Alice Wang
db748d251e [dice] Add nostd version of libdiced_sample_inputs
This cl adds a version of libdiced_sample_inputs
that is compatible with the nostd environment.

This allows the sample inputs to be used as DICE
chain in the non-protected rialto later for testing
purposes.

Test: atest libdiced_sample_inputs.integration_test \
libdiced_sample_inputs_nostd.integration_test
Bug: 287233786

Change-Id: I6e96e051a8ba0b232521b259d5473520ac767383
2023-09-20 10:01:42 +00:00
Tri Vo
cd6fc7a578 Reuse error mapping logic for key operation metrics
Define SerializedError wire type for convenience and type safety. It
does not change the rules of how errors are downcasted to an i32.

Change operation outcome errors from Keymint ErrorCode to
SerializedError. This has an intended effect of binder errors being
reported to metrics as ResponseCode::SYSTEM_ERROR instead of
ErrorCode::UNKNOWN_ERROR.

Also update comments.

Bug: 298194325
Test: m
Change-Id: Ieff70245b776c38845c4f5142ab13d438ff79104
2023-09-19 16:28:37 -04:00
Devin Moore
907c5044b9 Merge "keystore2 compat: stop crashing without hwservicemanager" into main am: a764eb9f45 am: d640b4c0ee am: 758bec0930 am: d7c817b718
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2736025

Change-Id: Ic9ec7a73726c86a85c0cc6cd6bd1370a45978974
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06 20:23:02 +00:00
Devin Moore
d7c817b718 Merge "keystore2 compat: stop crashing without hwservicemanager" into main am: a764eb9f45 am: d640b4c0ee am: 758bec0930
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2736025

Change-Id: I48f75aa0ab4150cfeb65703bd1ef96df0a42a21d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06 19:47:01 +00:00
Devin Moore
758bec0930 Merge "keystore2 compat: stop crashing without hwservicemanager" into main am: a764eb9f45 am: d640b4c0ee
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2736025

Change-Id: I855a747c80a7ae18321d6417677deffe2bec918a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06 19:02:05 +00:00
Devin Moore
d640b4c0ee Merge "keystore2 compat: stop crashing without hwservicemanager" into main am: a764eb9f45
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2736025

Change-Id: Ic05a5bfd37fd520f318a2c0c4ec9bf608d774282
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06 18:10:26 +00:00
Devin Moore
a764eb9f45 Merge "keystore2 compat: stop crashing without hwservicemanager" into main 2023-09-06 17:33:15 +00:00
Tri Vo
08774f4ffb Merge "Updated to use shared library instead of static library." into main am: 0140d4b523 am: dbc1536a08 am: 50ba5813c2 am: 4ee9e50879
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2736305

Change-Id: Ifbd41c7f4b3ef9d02ae6423cd649e96912e00596
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-01 23:51:12 +00:00
Tri Vo
4ee9e50879 Merge "Updated to use shared library instead of static library." into main am: 0140d4b523 am: dbc1536a08 am: 50ba5813c2
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2736305

Change-Id: I75791739139a0e88f3089f7e98c2119ba02a0399
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-01 23:13:06 +00:00
Tri Vo
50ba5813c2 Merge "Updated to use shared library instead of static library." into main am: 0140d4b523 am: dbc1536a08
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2736305

Change-Id: I63dcae0cd11470451b91eb1d9e400ce2a1969959
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-01 22:24:18 +00:00
Tri Vo
dbc1536a08 Merge "Updated to use shared library instead of static library." into main am: 0140d4b523
Original change: https://android-review.googlesource.com/c/platform/system/security/+/2736305

Change-Id: I4ff5249c7d3e8e77134c150ac47032f77036af34
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-01 21:29:31 +00:00
Tri Vo
0140d4b523 Merge "Updated to use shared library instead of static library." into main 2023-09-01 21:01:54 +00:00
Rajesh Nyamagoud
42276da855 Updated to use shared library instead of static library.
Removed `libkeymint_vts_test_utils` and its dependent libs from static
libs list and added only `libkeymint_vts_test_utils` in shared libs
list.

Test: m libkeystore2_test_utils; atest keystore2_client_tests; atest keystore2_test_utils_test;
atest keystore2_test
Bug: 194359114

Change-Id: Iab4b8c174af81a8c64a9f44fcd634d54f78773da
2023-09-01 16:50:01 +00:00