Skip to content

Commit e29df16

Browse files
committed
Add AndroidKeyStore provider for KeyStore API
This introduces a public API for the Android keystore that is accessible via java.security.KeyStore API. This allows programs to store PrivateKeyEntry and TrustedCertificateEntry items visible only to themselves. Future work should include: * Implement KeyStore.CallbackHandlerProtection parameter to allow the caller to request that the keystore daemon unlock itself via the system password input dialog. * Implement SecretKeyEntry once that support is in keystore daemon Change-Id: I382ffdf742d3f9f7647c5f5a429244a340b6bb0a
1 parent 473c712 commit e29df16

File tree

4 files changed

+1884
-0
lines changed

4 files changed

+1884
-0
lines changed

core/java/android/app/ActivityThread.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
import android.view.WindowManager;
8282
import android.view.WindowManagerImpl;
8383
import android.renderscript.RenderScript;
84+
import android.security.AndroidKeyStoreProvider;
8485

8586
import com.android.internal.os.BinderInternal;
8687
import com.android.internal.os.RuntimeInit;
@@ -95,6 +96,7 @@
9596
import java.io.PrintWriter;
9697
import java.lang.ref.WeakReference;
9798
import java.net.InetAddress;
99+
import java.security.Security;
98100
import java.util.ArrayList;
99101
import java.util.HashMap;
100102
import java.util.Iterator;
@@ -4799,6 +4801,8 @@ public static void main(String[] args) {
47994801
// StrictMode) on debug builds, but using DropBox, not logs.
48004802
CloseGuard.setEnabled(false);
48014803

4804+
Security.addProvider(new AndroidKeyStoreProvider());
4805+
48024806
Process.setArgV0("<pre-initialized>");
48034807

48044808
Looper.prepareMainLooper();

0 commit comments

Comments
 (0)