Commit graph

130 commits

Author SHA1 Message Date
Kenny Root
1a023f8953 Merge "Fix some spots where targetUid was missed" 2013-10-16 16:00:56 +00:00
Kenny Root
fa27d5bbc3 Fix some spots where targetUid was missed
Some of the targetUid arguments weren't used where they should have
been.

Change-Id: Ief5df897440ddfb572feb57026a6057d64c7c09b
2013-10-15 11:31:51 -07:00
Kenny Root
ace0b4229a Merge "Use canonical UniquePtr.h header" 2013-09-11 21:48:59 +00:00
Kenny Root
26cfc08add Use canonical UniquePtr.h header
Change-Id: Iab1dc428c2330a07a5944a1cfbb25c8134b11950
2013-09-11 14:38:56 -07:00
Kenny Root
cabc02029f Merge changes I52418ade,Ic02102cb
* changes:
  Add argument to binder call to check key types
  Provide fallback for keymaster implementations
2013-09-10 17:58:58 +00:00
Kenny Root
70f16c1983 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.

(cherry picked from commit 1b0e393390)

Bug: 10600582
Change-Id: I52418ade881d053229dd3c1d0cf438823468b51b
2013-09-10 10:58:14 -07:00
Kenny Root
b4d2e0233f Provide fallback for keymaster implementations
Some implementations won't support ECDSA or DSA, so provide a fallback
for them by using the softkeymaster implementation. This will allow us
to universally support ECDSA and DSA on all platforms regardless of HAL
version.

(cherry picked from commit 17208e0de5)

Bug: 10600582
Change-Id: Ic02102cb2b7f66e2ad3469f4edd9d03c4ae3fdf4
2013-09-10 10:58:14 -07:00
Kenny Root
c7fe66ead0 Merge "Revert to old-style API for EC_KEY handling" 2013-09-10 17:55:47 +00:00
Kenny Root
77acaa0d42 Revert to old-style API for EC_KEY handling
Nothing using the EVP_PKEY correctly, so we should revert to the EC_KEY
and ECDSA interfaces. Unfortunately, the SSL client certificate library
uses EC_KEY directly, so just having the EVP_PKEY interface doesn't
work.

Remove the EVP_PKEY interface entirely because it just adds complexity
since the EC_KEY path will do the same thing.

(cherry picked from commit 47041552bd)

Bug: 10655329
Change-Id: Ibf8c36780fe93284b88e91b7860baf1b951b4266
2013-09-10 10:39:43 -07:00
Kenny Root
81d8ca9b15 Merge "Add support for DSA and ECDSA key types" 2013-09-03 07:11:42 +00:00
Kenny Root
6071179a37 Add support for DSA and ECDSA key types
Change-Id: Ibee8d172eeb36f1a2e2ce62f275aea55ada5bcbf
2013-08-30 17:25:20 -07:00
Kenny Root
48772e0fe9 am e2a878e9: Merge "Revert "Revert "Split up main engine from methods"""
* commit 'e2a878e9cd7db48fd9466e19e1fa207a8117319e':
  Revert "Revert "Split up main engine from methods""
2013-06-27 10:31:00 -07:00
Kenny Root
e2a878e9cd Merge "Revert "Revert "Split up main engine from methods""" 2013-06-27 17:29:49 +00:00
Kenny Root
9d422a535c Revert "Revert "Split up main engine from methods""
Added missing Android.mk change in this commit.

This reverts commit 1fcabcd327.

Change-Id: I71e7fbc8f80a35b4666af985cffb4e7a2eb5634f
2013-06-27 09:15:49 -07:00
Kenny Root
a2d5639afe am 3aca7a31: Merge "Revert "Split up main engine from methods""
* commit '3aca7a31c4e999141003fb707060e83e0881caf0':
  Revert "Split up main engine from methods"
2013-06-27 09:15:46 -07:00
Kenny Root
3aca7a31c4 Merge "Revert "Split up main engine from methods"" 2013-06-27 16:13:50 +00:00
Kenny Root
1fcabcd327 Revert "Split up main engine from methods"
This reverts commit 2715806b17.

Change-Id: I7dfaf2cd97a17913710432007a66fc7df6fcad5d
2013-06-27 16:13:34 +00:00
Kenny Root
aa695eb467 am bb621b36: Merge "Split up main engine from methods"
* commit 'bb621b36c257ee892e2f07f309cd75b9bae1b613':
  Split up main engine from methods
2013-06-27 08:48:09 -07:00
Kenny Root
bb621b36c2 Merge "Split up main engine from methods" 2013-06-27 15:45:54 +00:00
Kenny Root
2715806b17 Split up main engine from methods
We need to add more methods to the keystore engine, so split out RSA so
it doesn't become too unwieldy.

This doesn't affect the size of the symbol table since the default
visibility for this module is "hidden."

Change-Id: I806553a8d1a01ff0ffd7b67054932ddf783bb502
2013-06-26 15:49:34 -07:00
Kenny Root
0fa9b7f8ff am a65d5236: Merge "Add 1 byte for the NULL char. This bug was causing CTS failures and stack corruption for Mips."
* commit 'a65d5236d0823b5ef72554ffb3ec15ae02596047':
  Add 1 byte for the NULL char. This bug was causing CTS failures and stack corruption for Mips.
2013-06-24 12:24:32 -07:00
Kenny Root
a65d5236d0 Merge "Add 1 byte for the NULL char. This bug was causing CTS failures and stack corruption for Mips." 2013-06-24 19:17:52 +00:00
Douglas Leung
a77e809ecf Add 1 byte for the NULL char. This bug was causing CTS failures and stack corruption for Mips.
Change-Id: Ib7e8eb0e79ee55fffb8cf36371688ba544734029
Signed-off-by: Douglas Leung <douglas@mips.com>
2013-06-13 17:35:30 -07:00
Kenny Root
7a6acff57d am 76820356: Merge "keystore: fix import as other UIDs"
* commit '76820356cc3c9c399717198d7ec4943a96e0b341':
  keystore: fix import as other UIDs
2013-04-18 16:57:52 -07:00
Kenny Root
76820356cc Merge "keystore: fix import as other UIDs" 2013-04-18 23:01:57 +00:00
Kenny Root
60898896c3 keystore: fix import as other UIDs
The targetUid was not being used as the user to store the key as, so it
was ending up under the calling UID. This change matches the code for
insert and generate now.

(cherry picked from commit 360f51f7af)

Bug: 8634328
Change-Id: I6bb9f66687552af990fdf90501f183930910ba8d
2013-04-18 16:00:54 -07:00
Kenny Root
8f51d5aa3c am 360f51f7: keystore: fix import as other UIDs
* commit '360f51f7af191316cd739f229db1c5f7233be063':
  keystore: fix import as other UIDs
2013-04-17 10:37:11 -07:00
Kenny Root
360f51f7af keystore: fix import as other UIDs
The targetUid was not being used as the user to store the key as, so it
was ending up under the calling UID. This change matches the code for
insert and generate now.

Bug: 8634328
Change-Id: Iedbbdaa0ac77f3aedb32a719458b5b503a66efd5
2013-04-16 18:11:29 -07:00
Kenny Root
79be3e3d40 am 1223495e: Merge "keystore: Add flag for blobs to be unencrypted"
* commit '1223495e44acbc2b94809de2455006ec24897734':
  keystore: Add flag for blobs to be unencrypted
2013-04-15 12:28:56 -07:00
Kenny Root
912abd41b7 am b3fc31a4: Merge "keystore: fix bug in clear_uid"
* commit 'b3fc31a43c941bd6e2ac2acf7d1ffb6350588b81':
  keystore: fix bug in clear_uid
2013-04-15 12:28:56 -07:00
Kenny Root
1223495e44 Merge "keystore: Add flag for blobs to be unencrypted" 2013-04-15 18:29:53 +00:00
Kenny Root
f9119d6414 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 0c540aad59)

Bug: 8122243
Change-Id: Ie97f6df1ba141b1ed8007413ec1a834b0486cc2a
2013-04-15 11:07:52 -07:00
Kenny Root
b3fc31a43c Merge "keystore: fix bug in clear_uid" 2013-04-15 18:01:12 +00:00
Kenny Root
5f53124250 keystore: fix bug in clear_uid
(cherry picked from commit aae26fc0e5)

Bug: 8566369
Change-Id: Ic1b604f6cc0c3a950e7ce1b98604a9fd7419f720
2013-04-15 10:46:03 -07:00
Kenny Root
ee89f108ad am 5d884972: Merge "keystore: Add flag for blobs to be unencrypted" into jb-mr2-dev
* commit '5d884972cac7c20b6b1c9ad9148872b07c974e69':
  keystore: Add flag for blobs to be unencrypted
2013-04-12 17:09:58 -07:00
Kenny Root
5d884972ca Merge "keystore: Add flag for blobs to be unencrypted" into jb-mr2-dev 2013-04-13 00:04:35 +00:00
Kenny Root
570e1f790b am aae26fc0: keystore: fix bug in clear_uid
* commit 'aae26fc0e58c99ac8e0df69b913523e81fa15d66':
  keystore: fix bug in clear_uid
2013-04-12 11:42:15 -07:00
Kenny Root
aae26fc0e5 keystore: fix bug in clear_uid
Bug: 8566369
Change-Id: I92a37bb709bc491a305cf5b6a5e68b6ac1a8aa24
2013-04-12 18:32:57 +00:00
Kenny Root
0c540aad59 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: I7d70122beb32b59f06a923ade93234393b75a2cd
2013-04-11 14:38:29 -07:00
Ying Wang
019f42fb8d am a6fe6209: Add liblog
* commit 'a6fe620941f04b55ecefb8f82d866a264cac9b9e':
  Add liblog
2013-04-09 22:13:27 -07:00
Ying Wang
a6fe620941 Add liblog
Bug: 8580410
Change-Id: I0d9b208021c35ad37fdbc4518aa6e76d65184c25
2013-04-09 22:05:12 -07:00
Kenny Root
01420e0725 am 92af9812: Merge "keystore: Add multi-user support"
* commit '92af98123a65629a5f13e96567a898aa2cdba6b9':
  keystore: Add multi-user support
2013-04-06 10:34:19 -07:00
Kenny Root
d4b124e197 am 68b46319: keystore: Add multi-user support
* commit '68b4631982761f3fdad8886fb7bb81defad79363':
  keystore: Add multi-user support
2013-04-06 10:13:22 -07:00
Kenny Root
68b4631982 keystore: Add multi-user support
Split the directories out per-user. Each Android user ID gets its own
directory and master key. This gives each user its own locked/unlocked
state.

Add migration code that converts existing keystores to this scheme. This
even migrates keys that used the non-public API, but only for the
primary user. The secondary users may have a different lock screen
pattern that would no longer work to unlock the master key.

(cherry picked from commit 655b958eb2)

Bug: 7249554
Change-Id: Icfc117d9bc68bd88997ab03673fb77b581acf3f7
2013-04-06 09:45:47 -07:00
Kenny Root
92af98123a Merge "keystore: Add multi-user support" 2013-04-06 16:44:22 +00:00
Kenny Root
655b958eb2 keystore: Add multi-user support
Split the directories out per-user. Each Android user ID gets its own
directory and master key. This gives each user its own locked/unlocked
state.

Add migration code that converts existing keystores to this scheme. This
even migrates keys that used the non-public API, but only for the
primary user. The secondary users may have a different lock screen
pattern that would no longer work to unlock the master key.

Bug: 7249554
Change-Id: Ie135235ab1eb88ddb2d89a6cb4ffd8fb6736c573
2013-04-06 09:43:31 -07:00
Kenny Root
5f555bf509 am 56995079: Merge "keystore: fix inverted hardware keystore check"
* commit '56995079413e918d3676a97d70a1700379ba5321':
  keystore: fix inverted hardware keystore check
2013-04-04 23:50:28 -07:00
Kenny Root
724932b68c am 77c4e48e: Merge "Fix CL split and build"
* commit '77c4e48e80b989cb80599a40fbbad9a16745d89f':
  Fix CL split and build
2013-04-04 23:41:59 -07:00
Kenny Root
c9ca1b5042 Merge "resolved conflicts for merge of a2f747d4 to jb-mr2-dev-plus-aosp" into jb-mr2-dev-plus-aosp 2013-04-05 06:40:17 +00:00
Kenny Root
14e2690970 resolved conflicts for merge of a2f747d4 to jb-mr2-dev-plus-aosp
Change-Id: If79ba99ef01c8216b1cce5daffc98a989255ac84
2013-04-04 23:39:33 -07:00