OSDN Git Service

Add ability to install credentials as other UID
authorKenny Root <kroot@google.com>
Thu, 28 Mar 2013 16:25:51 +0000 (09:25 -0700)
committerKenny Root <kroot@google.com>
Thu, 28 Mar 2013 18:30:11 +0000 (11:30 -0700)
We need the ability to install from the system UID to wifi UID
to explicitly bind WiFi credentials to the WiFi profile. This adds the
ability for Wifi Settings to invoke installation of a PKCS12 file for
the wifi UID.

Bug: 8183258
Change-Id: I652b7e6fa93deda6d6d310be33f224e5a356c787

keystore/java/android/security/Credentials.java

index d8109ce..166849d 100644 (file)
@@ -49,6 +49,8 @@ public class Credentials {
 
     public static final String INSTALL_ACTION = "android.credentials.INSTALL";
 
+    public static final String INSTALL_AS_USER_ACTION = "android.credentials.INSTALL_AS_USER";
+
     public static final String UNLOCK_ACTION = "com.android.credentials.UNLOCK";
 
     /** Key prefix for CA certificates. */
@@ -83,6 +85,12 @@ public class Credentials {
     public static final String EXTENSION_PFX = ".pfx";
 
     /**
+     * Intent extra: install the certificate bundle as this UID instead of
+     * system.
+     */
+    public static final String EXTRA_INSTALL_AS_UID = "install_as_uid";
+
+    /**
      * Intent extra: name for the user's private key.
      */
     public static final String EXTRA_USER_PRIVATE_KEY_NAME = "user_private_key_name";