Skip to content

Commit

Permalink
Remove the GenerateRkpKey service
Browse files Browse the repository at this point in the history
With the move to rkpd, we no longer need to make calls from framework
into the remote provisioner to tell it that a key was consumed.

Bug: 274823784
Test: atest KeystoreTests
Test: atest CtsKeystoreTestCases:android.keystore.cts.KeyAttestationTest
Change-Id: I510d471a980c62e5798e459729f73c231321d2a9
  • Loading branch information
sethmoo committed Apr 3, 2023
1 parent 932fe8a commit 651ffe6
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 372 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@
import android.content.Context;
import android.content.pm.FeatureInfo;
import android.content.pm.PackageManager;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.security.GenerateRkpKey;
import android.security.keymaster.KeymasterDefs;

class CredstoreIdentityCredentialStore extends IdentityCredentialStore {

Expand Down Expand Up @@ -125,18 +122,7 @@ static CredstoreIdentityCredentialStore getInstanceForType(@NonNull Context cont
@NonNull String docType) throws AlreadyPersonalizedException,
DocTypeNotSupportedException {
try {
IWritableCredential wc;
wc = mStore.createCredential(credentialName, docType);
try {
GenerateRkpKey keyGen = new GenerateRkpKey(mContext);
// We don't know what the security level is for the backing keymint, so go ahead and
// poke the provisioner for both TEE and SB.
keyGen.notifyKeyGenerated(KeymasterDefs.KM_SECURITY_LEVEL_TRUSTED_ENVIRONMENT);
keyGen.notifyKeyGenerated(KeymasterDefs.KM_SECURITY_LEVEL_STRONGBOX);
} catch (RemoteException e) {
// Not really an error state. Does not apply at all if RKP is unsupported or
// disabled on a given device.
}
IWritableCredential wc = mStore.createCredential(credentialName, docType);
return new CredstoreWritableIdentityCredential(mContext, credentialName, docType, wc);
} catch (android.os.RemoteException e) {
throw new RuntimeException("Unexpected RemoteException ", e);
Expand Down
159 changes: 0 additions & 159 deletions keystore/java/android/security/GenerateRkpKey.java

This file was deleted.

31 changes: 0 additions & 31 deletions keystore/java/android/security/GenerateRkpKeyException.java

This file was deleted.

60 changes: 0 additions & 60 deletions keystore/java/android/security/IGenerateRkpKeyService.aidl

This file was deleted.

Loading

0 comments on commit 651ffe6

Please sign in to comment.