Keystore 2.0: Don't use DB for keys with Domain::BLOB
The global DB can only be initialized after /data is mounted, so we can't
use it before /data is mounted. In particular, store_new_key() was
accessing DB unconditionally to call
SUPER_KEY.handle_super_encryption_on_key_init(), which won't work once
keystore2 starts before /data is mounted.
This patch makes store_new_key() directly handle Domain::BLOB keys to
avoid initializing DB.
Bug: 181910578
Test: Make keystore2 boot early and call generate_key from vold
before /data is mounted
Change-Id: I12877c1732cee8ced3ae53e8dce070280afd3bbb
1 file changed