Commit graph

1056 commits

Author SHA1 Message Date
Joel Galenson
2aab443c58 Persist database on disk.
This adds support for persisting the database on disk.  Tests do not
do this to avoid race conditions (except for one test that ensures
that persistence works).

Bug: 159370859
Test: atest keystore2_test
Change-Id: Idaf23a271e269902f34c32509dfd923db08df067
2020-08-12 17:54:22 -07:00
Joel Galenson
0891bc1563 Add create_key_entry.
Bug: 159370859
Test: atest keystore2_test
Change-Id: Ia4abebc06d7d351678b524b4be3414c7b243d04a
2020-08-12 17:54:22 -07:00
Joel Galenson
26f4d0100d Add (mostly) empty KeystoreDB struct.
The KeystoreDB struct contains the interface with sqlite.

This commit introduces the KeystoreDB object and a sqlite connection
but does not add any operations.

Bug: 159370859
Test: atest keystore2_test
Change-Id: Ie5ec091a01d25ecd520ac29be67117cc3c3fd83c
2020-08-12 17:54:20 -07:00
Janis Danisevskis
7d77a7604f Keystore 2.0 error module
This patch provides some convenience methods for error handling in
Keystore 2.0. Specifically, a way to convert errors into messages to the
client and logging errors.

Test: keystore2_test
Bug: 159378374
Change-Id: Ifa6b5745533863bfd76319bc991748a47453d31e
2020-08-05 16:13:24 -07:00
Janis Danisevskis
652f38183d Add placeholder for types generated from AIDL
Test: None
Bug: 160623310
Change-Id: Ib16003543c416010edf17ee7659033434d70c0f3
2020-08-04 23:29:51 +00:00
Janis Danisevskis
43c8971a3c Add empty keystore2 crate
Adds an empty crate with a build config for libkeystore2 and the
keystore2 test.

Also add a TEST_MAPPING file setting up keystore2_test as presubmit
test.

Bug: 160623310
Test: keystore2_test
Change-Id: I2cda9a74a43422453cf5d1d44867107c9f0292bf
2020-08-04 01:42:50 +00:00