Make Settings aware of legacy user keys with secret key prefix

Secret keys are not longer identifiable by their alias prefix.
So now we call getKeyCharacteristics and check the algorithm of the
key.

Bug: 63931634
Test: Manually installed a key and checked that it is still dispayed
      correctly.
Change-Id: I55a4e46434618cb52ceb9456f184e004165872fd
This commit is contained in:
Janis Danisevskis
2017-04-19 16:23:02 -07:00
parent caf5358e40
commit b705e1a691
2 changed files with 53 additions and 27 deletions

View File

@@ -40,7 +40,7 @@ public class UserCredentialsTest extends InstrumentationTestCase {
Credential c = new Credential(alias, Process.SYSTEM_UID);
c.storedTypes.add(Credential.Type.CA_CERTIFICATE);
c.storedTypes.add(Credential.Type.USER_SECRET_KEY);
c.storedTypes.add(Credential.Type.USER_KEY);
Parcel p = Parcel.obtain();
c.writeToParcel(p, /* flags */ 0);