Skip to content

Commit 3d31f2e

Browse files
committed
Remove the GenerateRkpKey service
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
1 parent 5c13e85 commit 3d31f2e

File tree

5 files changed

+2
-372
lines changed

5 files changed

+2
-372
lines changed

identity/java/android/security/identity/CredstoreIdentityCredentialStore.java

+1-15
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
import android.content.Context;
2222
import android.content.pm.FeatureInfo;
2323
import android.content.pm.PackageManager;
24-
import android.os.RemoteException;
2524
import android.os.ServiceManager;
26-
import android.security.GenerateRkpKey;
27-
import android.security.keymaster.KeymasterDefs;
2825

2926
class CredstoreIdentityCredentialStore extends IdentityCredentialStore {
3027

@@ -125,18 +122,7 @@ static CredstoreIdentityCredentialStore getInstanceForType(@NonNull Context cont
125122
@NonNull String docType) throws AlreadyPersonalizedException,
126123
DocTypeNotSupportedException {
127124
try {
128-
IWritableCredential wc;
129-
wc = mStore.createCredential(credentialName, docType);
130-
try {
131-
GenerateRkpKey keyGen = new GenerateRkpKey(mContext);
132-
// We don't know what the security level is for the backing keymint, so go ahead and
133-
// poke the provisioner for both TEE and SB.
134-
keyGen.notifyKeyGenerated(KeymasterDefs.KM_SECURITY_LEVEL_TRUSTED_ENVIRONMENT);
135-
keyGen.notifyKeyGenerated(KeymasterDefs.KM_SECURITY_LEVEL_STRONGBOX);
136-
} catch (RemoteException e) {
137-
// Not really an error state. Does not apply at all if RKP is unsupported or
138-
// disabled on a given device.
139-
}
125+
IWritableCredential wc = mStore.createCredential(credentialName, docType);
140126
return new CredstoreWritableIdentityCredential(mContext, credentialName, docType, wc);
141127
} catch (android.os.RemoteException e) {
142128
throw new RuntimeException("Unexpected RemoteException ", e);

keystore/java/android/security/GenerateRkpKey.java

-159
This file was deleted.

keystore/java/android/security/GenerateRkpKeyException.java

-31
This file was deleted.

keystore/java/android/security/IGenerateRkpKeyService.aidl

-60
This file was deleted.

0 commit comments

Comments
 (0)