150 Commits

Author SHA1 Message Date
Robin Lee
aab72f3b0a Merge "Revert "Revert "Publish DevicePolicyManager CA certificate APIs""" 2014-06-17 21:55:55 +00:00
Robin Lee
306fe08ce2 Revert "Revert "Publish DevicePolicyManager CA certificate APIs""
This reverts commit 792b270dbdc980cfe04e8d461bf00a1f45b5e936.

Change-Id: I18c7e0eca39868230cd8e4f4bbeb3c44ff9e8b78
2014-06-19 14:04:24 +00:00
Robin Lee
2b5e917026 Revert "Publish DevicePolicyManager CA certificate APIs"
This reverts commit 5260bf69946563dc47c17e7441b352adfce384c5.

Change-Id: I5e44fdac8a7375576b25171f58e31a1fa0e3c569
2014-06-17 22:12:28 +00:00
Robin Lee
6d3912e2ef Merge "Revert "Publish DevicePolicyManager CA certificate APIs"" 2014-06-17 21:55:55 +00:00
Robin Lee
b12f1778d6 Merge "Publish DevicePolicyManager CA certificate APIs" 2014-06-17 05:12:50 +00:00
Robin Lee
837304f6f6 Publish DevicePolicyManager CA certificate APIs
Exposes these methods:
 - hasCaCertInstalled
 - hasAnyCaCertsInstalled
 - installCaCert
 - uninstallCaCert

Allows device and profile owners to perform some certificate management
including querying for and enabling/disabling specific CA certificates.

Change-Id: I4aa8a1a8601b234e30acde99dfa382e04cb62495
2014-06-11 16:55:32 +01:00
Robert Ly
e37da759c5 am b1cb5aab: am 748856f2: am a7ddd029: am 80e84e2d: am f3cecfa2: am 55d525b2: am 716cc7dc: Add documentation for AndroidKeyStore
* commit 'b1cb5aabeb68815715eed423f1f9a7edb9a3e938':
  Add documentation for AndroidKeyStore
2014-06-11 19:33:51 +00:00
Robert Ly
80e84e2db9 am f3cecfa2: am 55d525b2: am 716cc7dc: Add documentation for AndroidKeyStore
* commit 'f3cecfa2185ef5622992b21da8204b8b6590ef2d':
  Add documentation for AndroidKeyStore
2014-06-10 02:39:28 +00:00
Robert Ly
f3cecfa218 am 55d525b2: am 716cc7dc: Add documentation for AndroidKeyStore
* commit '55d525b26b716351625798675afe69c6cf43cf5a':
  Add documentation for AndroidKeyStore
2014-06-10 02:36:10 +00:00
Robert Ly
716cc7dcac Add documentation for AndroidKeyStore
Add exposition about the use cases for AndroidKeyStore and links to the
API sample application for different use cases.

Bug: 8608817
Change-Id: Ic4ce9405781c92f12687895b28c671661ea5524f
2014-05-07 21:20:01 -07:00
Kenny Root
a365906e67 Use the correct package name for CHOOSER
Bug: 13013106
Change-Id: I1f715de18e7108274f5a98234376d48c2d329438
2014-03-17 16:21:56 -07:00
Kenny Root
1a88d834e8 KeyChain: add explicit package for getPrivateKey
Bug: 9964538
Change-Id: If67c1938e9506d4fa81b241bcbce2193d1b194ef
2014-02-07 09:14:32 -08:00
John Spurlock
6090995951 Remove unused imports from frameworks/base.
Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
2013-11-20 11:31:47 -05:00
Kenny Root
b91773bce1 Add argument to binder call to check key types
Before there was only one key type supported, so we didn't need to query
a key type. Now there is DSA, EC, and RSA, so there needs to be another
argument.

Bug: 10600582
Change-Id: I9fe9e46b9ec9cfb2f1246179b2c396216b2c1fdb
2013-09-05 13:27:00 -07:00
Kenny Root
c222ddd07f Unhide functions to allow ECDSA support
Bug: 10600582
Change-Id: Ic710807d7e771737521e0abd83af2f666ec1199c
2013-09-03 09:45:55 -07:00
Kenny Root
a39859889b Add support for DSA and ECDSA key types
(cherry picked from commit f64386fc26efeb245fd90fabaa47b8c8bf9b4613)

Bug: 10600582
Change-Id: I88dfcc8ca602f55fad54bd8bf043aee460c0de24
2013-09-03 00:53:04 -07:00
Maggie Benthall
da51e68e58 Add methods for managing CAs to DevicePolicyManager(Service)
Guard install/uninstall by enforcing that the caller have the new system-only permission MANAGE_CA_CERTIFICATES.
Also include API methods for asking whether there are any User CA certs
installed, or if one by a particular name is installed in the keystore.

CA certs will be installed via KeyChain into the TrustedCertificateStore.

Bug: 8232670

Change-Id: I17b47a452e72eb4fe556dc6db823a46c6e854be8
2013-08-20 14:30:36 -04:00
Elliott Hughes
a920f25fe5 resolved conflicts for merge of fca0f92e to stage-aosp-master
Change-Id: I4791f0ffa324a313b8390fbde6d8f82f716ecf74
2013-06-28 16:41:19 -07:00
Elliott Hughes
d396a448b2 Switch frameworks/base over from @hidden Charsets to public StandardCharsets.
Bug: 3484927
Change-Id: I5d136d2ee629588538602766a182ae14ce5fc63c
2013-06-28 16:24:48 -07:00
Kenny Root
5f851a89b6 am cd1de394: Merge "Track change in NativeCrypto"
* commit 'cd1de3940d9c389b6e69a7040c67d3abb8458ad2':
  Track change in NativeCrypto
2013-05-06 15:13:58 -07:00
Kenny Root
4b30e3391b Track change in NativeCrypto
Change-Id: Ic04d4ac5218795fc226f1751b6ae4db1ae73a930
2013-05-06 15:00:58 -07:00
Kenny Root
e9ae6822a8 resolved conflicts for merge of 1f6e789b to jb-mr2-dev-plus-aosp
Change-Id: I06c05d637613215b6d83df3e29cd495f6a5a0176
2013-04-29 23:09:03 -07:00
Kenny Root
12e752225a Track change to JSSE provider
Change-Id: I35e824e47ad758ab6408e91e2ba5dcda053a82f5
2013-04-29 15:15:27 -07:00
Kenny Root
1c219f6192 Rename API AndroidKey* -> Key*
Bug: 8657552
Change-Id: Id9102b7c2c2f6d27fba7645f0629750cfe1eb510
2013-04-18 18:34:58 -07:00
Kenny Root
bf2147669e AndroidKeyStore: Add encrypted flag
Add the encrypted flag for the KeyPairGenerator and the KeyStore so that
applications can choose to allow entries when there is no lockscreen.

(partial cherry pick from commit 2eeda7286f3c7cb79f7eb71ae6464cad213d12a3)

Bug: 8122243
Change-Id: I5ecd9251ec79ec53a3b68c0fff8dfba10873e36e
2013-04-15 19:33:15 +00:00
Kenny Root
4622351159 keystore: Add flag for blobs to be unencrypted
In order to let apps use keystore more productively, make the blob
encryption optional. As more hardware-assisted keystores (i.e., hardware
that has a Keymaster HAL) come around, encrypting blobs start to make
less sense since the thing it's encrypting is usually a token and not
any raw key material.

(cherry picked from commit a3788b00bb221e20abdd42f747d2af419e0a088c)

Bug: 8122243
Change-Id: Ifc1c64743651b23a4eace208ade0176af47ea989
2013-04-15 11:09:29 -07:00
Kenny Root
e7cf8c2302 keystore: remove old APIs
Remove the APIs that don't specify the flags so callers know what
they're getting.

Bug: 8122243
Change-Id: Ifaef6fb1d16010237c01f9d11f2053bb6b3980c0
2013-04-12 18:09:04 -07:00
Kenny Root
b2c0ff64d8 Remove old KeyStore call sites
Remove the call sites that don't have the flags specified. This is to
ensure that callers know what flags they're setting.

Bug: 8122243
Change-Id: Ifbd178fddbf8dbd8f7b821ea739a20d056ef9fa7
2013-04-12 18:09:04 -07:00
Kenny Root
2eeda7286f AndroidKeyStore: Add encrypted flag
Add the encrypted flag for the KeyPairGenerator and the KeyStore so that
applications can choose to allow entries when there is no lockscreen.

Bug: 8122243
Change-Id: Ia802afe965f2377ad3f282dab8c512388c705850
2013-04-12 15:19:48 -07:00
Kenny Root
a3788b00bb keystore: Add flag for blobs to be unencrypted
In order to let apps use keystore more productively, make the blob
encryption optional. As more hardware-assisted keystores (i.e., hardware
that has a Keymaster HAL) come around, encrypting blobs start to make
less sense since the thing it's encrypting is usually a token and not
any raw key material.

Bug: 8122243
Change-Id: If9af0d992d68edec006e630c687df3d03a7c9608
2013-04-10 23:36:13 -07:00
Kenny Root
8b51475c97 Revert "Remove AndroidKeyStore from API"
This reverts commit ce24985ad636c38b6ee01ec9cdecfb038bfeaeb6.

Change-Id: I02d6492c8db869619694c7209bb37522a7ec5a29
2013-04-06 10:05:31 -07:00
Kenny Root
d72317abd7 Remove keystore entries when package removed
Add a hook into PackageManagerService so that when app IDs are
completely removed, we erase all entries from keystore for those UIDs
that have gone away.

(cherry picked from commit 95e3ee3971915b323e5c13dcfe3b12a4180850cd)

Bug: 3020069
Change-Id: I374258ccc103f8cb3e238f2bf0d1afda0659db94
2013-04-03 11:32:52 -07:00
Kenny Root
95e3ee3971 Remove keystore entries when package removed
Add a hook into PackageManagerService so that when app IDs are
completely removed, we erase all entries from keystore for those UIDs
that have gone away.

Bug: 3020069
Change-Id: Id4b1d51a5fa4c418865055635a84bebcf5b65ec8
2013-04-02 11:50:16 -07:00
Kenny Root
5b7e90ac93 Add API to query KeyChain algorithm support, pt. 2
Late-breaking comments on API name. Revised.

Bug: 7095660
Change-Id: I7224d9c8a4f84a272360ede78a18bfb72d8aeb77
2013-04-02 11:23:41 -07:00
Kenny Root
bf556ac636 Add API to query KeyChain algorithm support
Bug: 7095660
Change-Id: Ia87caaa33bc01b032130811833f0a3c4f75b62d4
2013-04-02 10:34:24 -07:00
Kenny Root
5cb5cec6a4 KeyStore: add API to query storage type
Add an API to keystore daemon to query what kind of storage is currently
in use.

(cherry picked from commit a738e2a1aee26e0be3944c11820724aeca313f83)

Change-Id: I52c84449a27b1cefc49372a6406b7132c2bbddee
2013-03-29 14:21:10 -07:00
Kenny Root
a738e2a1ae KeyStore: add API to query storage type
Add an API to keystore daemon to query what kind of storage is currently
in use.

Change-Id: I5a83ae92250ca63b691dcf1beb8b3e1703797745
2013-03-29 11:16:43 -07:00
Kenny Root
acb0b5b220 AndroidKeyStore: add Builder for param spec
Change-Id: I13403197e1ac7ac607efa10979eb73bde0135a2a
2013-03-28 16:05:46 -07:00
Kenny Root
3e7be43e25 Add ability to install credentials as other UID
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
2013-03-28 11:30:11 -07:00
Kenny Root
5f1d965f7d KeyStore: change migrate to duplicate
After discussion, it was determined that duplicate would be less
disruptive and it still fit in the current HAL model.

Change-Id: I2f9cae48d38ec7146511e876450fa39fc92cda55
2013-03-21 14:24:19 -07:00
Kenny Root
bd79419ef8 KeyStore: add "migrate" command
To support the WiFi service, we need to support migration from the
system UID to the wifi UID. This adds a command to achieve the
migration.

Bug: 8122243
Change-Id: I65f7a91504c1d2a2aac22b9c3051adffd28d66c1
2013-03-20 11:57:46 -07:00
Kenny Root
78ad849163 KeyStore: add API to uid versions
In previous commits, we added the ability to specify which UID we want to
target on certain operations. This commit adds the ability to reach those
binder calls from the KeyStore class.

Also fix a problem where saw() was not reading all the values returned via
the Binder call. This changes the semantics to return a null instead of
failing silently when it's not possible to search.

Change-Id: I32098dc0eb42e09ace89f6b7455766842a72e9f4
2013-03-20 16:50:06 +00:00
Kenny Root
b9594ce9eb KeyStore: stop using state()
Change-Id: I721974fd95f8d1ab06a3fd1bbb4c9b4d9d1d7752
2013-02-14 12:06:51 -08:00
Kenny Root
b0f4b8a7d2 Merge "Track keystore binder changes" 2013-02-13 23:43:57 +00:00
Kenny Root
0150e48200 KeyChain: return null instead of throw
The API documentation says it will return null if the key isn't found.
We get null back from the keystore daemon when it can't retrieve the
data, so just return null back to the API caller.

Change-Id: I42248bd50cbc5f76864bd762aae3faab1c50529d
2013-02-13 15:24:06 -08:00
Kenny Root
e151f281d5 Track keystore binder changes
Change-Id: Id6133be059a8a0901d16355a9152e40e4a255454
2013-02-13 15:22:25 -08:00
Kenny Root
887c523646 am 74637db2: Merge "AndroidKeyStore: return error code on error"
# Via Gerrit Code Review (1) and Kenny Root (1)
* commit '74637db21eb0b3c0167378e2b5c866fdc02e51f2':
  AndroidKeyStore: return error code on error
2013-02-04 17:35:35 -08:00
Kenny Root
e66769ad51 AndroidKeyStore: return error code on error
Instead of blindly multiplying return value by 1000 to convert to
milliseconds, check to see if it's an error condition first.

Change-Id: I8eab1e7a86d78c13458fcbbc79d590e452fc9791
2013-02-04 15:50:58 -08:00
Kenny Root
c4a768c87e am 5a720bb9: Merge "AndroidKeyStore: add key wrapping test"
# Via Gerrit Code Review (1) and Kenny Root (1)
* commit '5a720bb9b031d44e593d2054bda586ccc3752aa4':
  AndroidKeyStore: add key wrapping test
2013-02-04 15:10:26 -08:00
Kenny Root
516fab2404 am 133c5f5e: Merge "AndroidKeyStore: fix tests"
# Via Gerrit Code Review (1) and Kenny Root (1)
* commit '133c5f5e91e72cff1a9a3a4903a0efc96b39165b':
  AndroidKeyStore: fix tests
2013-02-04 15:10:22 -08:00