Commit Graph

13 Commits

Author SHA1 Message Date
Eran Messeri
6f965bea4a Merge "Batch fetching of key descriptors from Keystore" am: 2051907ae1 am: 5bb8c65e6b am: aa945174e9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2422847

Change-Id: If58ca21bdffd92aaea8fb387db7fb7bde5eb734c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-27 11:36:54 +00:00
Eran Messeri
17ad506f0e Batch fetching of key descriptors from Keystore
Change interaction with Keystore2 in the following manner:
* Return an enumerator over the entries in Keystore2 rather than
  attempting to get all of them into one single data structure.
* Use a new Keystore2 method for getting the count of entries
  rather than count the size of the array returned.

The enumerator reads a batch of key descriptors from Keystore2.
Once the batch has been exhausted, the enumerator added asks
Keystore2 for the next batch of keys starting with the last
alias it has processed, until it receives an empty array.

Bug: 222287335
Test: atest KeystoreTests
Change-Id: I309b3188df998825557a3c5e6d777b1c0807a924
2023-03-20 15:07:21 +00:00
Tomasz Wasilczyk
5ead731c57 Annotate KeyStore service as never null
Bug: 245258360
Change-Id: I4d9215486df275012dad495730ce0ff00839b7a6
Test: TH
2022-09-23 21:43:09 +00:00
Max Bires
9510ef1aa2 Make generateKey() return a status
This change adds some integers to the AIDL interface in order to convey
status back to the caller of generateKey(). This will inform the caller
as to whether or not the errors that may occur during provisioning are
permanent, and if not, what to do with the transient error.

Bug: 227306369
Test: RemoteProvisionerUnitTests
Change-Id: I9202358a102b0fb0a104525632a005acb7355840
2022-04-20 14:31:54 -07:00
Eran Messeri
5eedf5a373 Keystore: Surface service error message
Surface the service-specific error message. To avoid API changes, the
error message is surfaced in the toString / getMessage methods.

Test: atest android.security.keystore.KeyStoreExceptionTest
Bug: 217593122
Change-Id: Id4090564b46db9b3b10ea390390f6683f7314463
2022-02-08 13:26:57 +00:00
Janis Danisevskis
04d5622233 Keystore 2.0 SPI: Silence warning about blocking calls to Keystore.
Test: N/A
Bug: 184108046
Change-Id: I7401b88e5055cb781113656021f3ec274d1951a4
2021-05-12 16:53:14 -07:00
Steven Moreland
5fdf93fc9d Merge "Keystore 2.0: Update to canonical service name." 2021-03-29 17:02:31 +00:00
Janis Danisevskis
5d1c590723 Keystore 2.0: Disable BackendBusyException.
This disables throwing BackendBusyException in Android S. Instead we
keep the legacy behavior of spinning until an operation can be created.

Bug: 180133780
Test: N/A
Change-Id: I802148c59338b91e751498607fa903e156e40aa6
2021-03-24 09:22:56 -07:00
Janis Danisevskis
f3064ba0b3 Keystore 2.0: Update to canonical service name.
Bug: 179907868
Test: N/A
Change-Id: I74adab04bd84f120bc547011151ea77769b6bda9
2021-03-22 14:57:28 -07:00
Janis Danisevskis
7e06904734 Keystore 2.0: Add keystore engine grant string convenience functions.
This patch adds function for and end decoding grant identfiers as
understood by the keystore boringssl engine.

Test: N/A
Change-Id: I619d8f460163e6270e41da81ca549efb71138113
2021-02-23 14:42:13 -08:00
Janis Danisevskis
377370cce8 Keystore 2.0: Revisite Authorization.java
Test: N/A
Change-Id: I4da26175741c5313aec17d30a3e534a2172d87b4
2021-02-19 15:31:15 -08:00
Janis Danisevskis
a7a9e7af3d Keystore 2.0: Add human readable strings to Keystore exceptions.
Test: N/A
Change-Id: Ic07ca2329c6ebf3dacddf687cc85935e2bfa0cdd
2021-01-19 10:10:20 -08:00
Janis Danisevskis
ebd964a086 Keystore 2.0: Shim around the basic functionality of Keystore 2.0
This patch adds a shim around the Keystore 2.0 AIDL spec. The new shim
is modularized like the AIDL spec into the base Keystore module
Keystore2, the security level specific interface KeystoreSecurityLevel,
and the operation specific interface KeystoreOperation.

Other system maintenance specific interfaces have yet to be added.

Bug: 159476414
Bug: 171305684
Test: None
Change-Id: I070f73739e4b37ce10568939ac666e40b14a52a8
2020-11-13 19:55:39 -08:00