- 23 Jun, 2015 2 commits
-
-
Alex Klyubin authored
keystore service's begin operation may sometimes encounter a situation where the underlying device's begin operation fails because of too many operations in progress. In that case, keystore attempts to prune the oldest pruneable operation by invoking the underlying device's abort operation. Regardless of whether the abort operation fails, keystore then removes the operation from the list of in-progress prunable operations. The issue is that when the underlying device's abort operation fails, keystore fails the begin operation that caused all this prunining. This is despite the fact that keystore has managed to make space for one more operation. The fix is to fail the begin operation only if the pruning attempt did not make space for a a new operation. Bug: 22040842 Change-Id: Id98b2c6690de3cfb2a7b1d3bdd10742cc59ecbfa
-
Alex Klyubin authored
This fixes the issue where, on 32-bit platforms, keys expiring after about 2^31 - 1 seconds since epoch (Jan 19 2038) might be treated as already expired. The issue was caused by using time_t (signed 32-bit on 32-bit platforms) as current time and downcasting uint64 activation and expiration time instants to time_t to compare them to current time. This downcasting could make future time instants appear to be in the past on 32-bit platforms. Bug: 22015107 Change-Id: Iae12019c3c019beb92d791fda80b622fa5c4ac4e
-
- 20 Jun, 2015 1 commit
-
-
Shawn Willden authored
Bug: 19511945 Change-Id: I76c04e8d3253ba490cedac53bbc75943ec68df1d
-
- 18 Jun, 2015 2 commits
-
-
Chad Brubaker authored
-
Chad Brubaker authored
exist requires the keystore exist permission which callers of sign/verify may not have. Instead log key not found if begin returns ::KEY_NOT_FOUND. Bug: 21658885 Change-Id: I8c42f3a636a248e3fb1f0344bf32667fce57f667
-
- 17 Jun, 2015 1 commit
-
-
Shawn Willden authored
Bug: 21877150 Change-Id: I43dafb66fc3246f4d8e3bf4743fbdcbe072468d1
-
- 08 Jun, 2015 1 commit
-
-
Chad Brubaker authored
Rewrite generate, import, get_pubkey, sign and verify using the new keymaster 1.0 methods (generateKey, exportKey, and begin/update/finish). This also removed DSA support from generate and import. Change-Id: I6c6baec4aa86325a2b9c171b9883ba5a0b47236e
-
- 04 Jun, 2015 3 commits
-
-
Chad Brubaker authored
Keymaster 0.3 keys are all valid keymaster 1.0 keys, so allow get to return a keymaster 0.3 when looking for a 1.0 key to allow new methods to work on old keys. Change-Id: I20a32e39769a548224bcca7a42ef967285431c5d
-
Chad Brubaker authored
-
Chad Brubaker authored
If provided the extra entropy will be added to the device before calling finish. If entropy is provided and the device does not support supplying additional entropy then finish will fail with KM_ERROR_UNIMPLEMENTED. (cherry-picked from commit 8cfb8ac6) Change-Id: If26be118bf382604f6f8e96e833b76e6f9e94d58
-
- 03 Jun, 2015 3 commits
-
-
Chad Brubaker authored
-
Chad Brubaker authored
-
Chad Brubaker authored
The operation map caches the hw_auth_token used to start the operation but it was storing the pointer returned by the auth token table and not the token itself leading to a potential use-after-free if the token was removed from the table between the operation starting and completeting. The operation table now stores the auth token itself instead of the pointer provided by the auth table. Change-Id: I80fd49655ed98e7879d2caa7f1ae077ff50e0e54
-
- 02 Jun, 2015 1 commit
-
-
Chad Brubaker authored
Change-Id: If0b274118a2d238b18c0a06ee3fe7f0798a44a1c
-
- 01 Jun, 2015 1 commit
-
-
Chad Brubaker authored
The keymaster adapter wraps the hardware module to allow keystore to call the new keymaster methods on it and continue using old keys created by that device with the new methods. Change-Id: Ica08d81c3707023d378ad5fe6562dc642f58ca90
-
- 28 May, 2015 1 commit
-
-
Shawn Willden authored
Change-Id: Ib7f4996d2e2002db4892d5585761a053f6698495 (cherry picked from commit e1faa9fe)
-
- 23 May, 2015 1 commit
-
-
Shawn Willden authored
-
- 19 May, 2015 1 commit
-
-
Shawn Willden authored
Also, remove unneeded inclusion of key_blob.h. Change-Id: I05de61353fc806b90232fab7c1d1cf76aefa35fc
-
- 18 May, 2015 1 commit
-
-
Chad Brubaker authored
Remove old methods that were replaced by onUser* methods, rename methods with unclear names, and add userId parameters to all operations that operate with per user state. (cherry-picked from commit 94436163) Change-Id: I846fbb0a5ad17b4ee4c0c759fd1fd23f58b88d78
-
- 13 May, 2015 2 commits
-
-
Chad Brubaker authored
These will handle the logic of Android users being added/removed from the device instead of the system calling the various reset/sync methods. (cherry-picked from commit fd777e71) Change-Id: Ic6be0de63cc1b0579a46e7101dcfeb1a9ffa4738
-
Chad Brubaker authored
UserState related methods previously took uid's while the state was based on userId, with the new keystore methods taking userIds start moving everything in that direction. (cherry-picked from commit 4efce0dc) Change-Id: I075e973e2403575ba67e8e7a8c331a6c6f7e88e4
-
- 07 May, 2015 1 commit
-
-
Chad Brubaker authored
Replace password with notifyUserPasswordChanged for password changes, unlock should now be used to unlock keystore instead of calling password with the current password. When the user removes their password now only keystore entries that were created with FLAG_ENCRYPTED will be deleted. Unencrypted entries will remain. This makes it more concrete that the keystore could be non-empty while in STATE_UNINITIALIZED, though this was previously possible due to the state only being checked if FLAG_ENCRYPTED was set. Change-Id: I324914c00195d762cbaa8c63084e41fa796b7df8
-
- 01 May, 2015 1 commit
-
-
Chad Brubaker authored
System should be able to call these methods with any targetUid. (cherry picked from commit 01771ae9) Bug: 20752184 Change-Id: Ieaeb2fa44b979970640abbd91c1d8a84f7c62b1f
-
- 30 Apr, 2015 3 commits
-
-
Shawn Willden authored
Bug: 20717652 Change-Id: I2397e5cd906d45515a0b2a5591705f458c1aceb0 (cherry picked from commit 2764f867)
-
Shawn Willden authored
Also document that SoftKeymasterDevice should not be freed. Change-Id: I027f137b0ffd474bb4b429691fe87eef6338b723 (cherry picked from commit 47a79ffa)
-
Chad Brubaker authored
(cherry picked from commit 6b541163) Bug: 20702036 Change-Id: I4caa9f7a6e6e2b05f63b12180a5af65d3a5c0bac
-
- 28 Apr, 2015 1 commit
-
-
Chad Brubaker authored
Auth tokens will now be checked on begin and then used for all subsequent calls for that operation, this means that things like auth timeouts will only be checked on begin, and operation that starts at timeout - .00001 will now be able to be used to completion. One exception to this is keys that use per operation authorization. Begin for these operations must succeed so that the application gets a handle to authorize. For those keys if the application calls update before authorizing the operation the call will fail. For these keys begin will return OP_AUTH_NEEDED so let the caller know more work is needed before using the operation. (cherry picked from commit aebbfc2b) Change-Id: I3da4f93a076c0ed2d8630ca8cd1608e9bad2c2ff
-
- 18 Apr, 2015 5 commits
-
-
Kenny Root authored
* commit 'a680a0ca': keystore-engine: comment out unused args
-
Kenny Root authored
* commit '57a72ec8': keystore-engine: comment out unused args
-
Kenny Root authored
* commit '3ad91aa7': keystore-engine: comment out unused args
-
Kenny Root authored
-
Kenny Root authored
This fixes the build when -Werror -Wunused-parameter is enabled in the compiler options. Change-Id: I4581492c23885de8d31d2e66483ee281c0045c58
-
- 17 Apr, 2015 3 commits
-
-
Shawn Willden authored
* commit '8e6b64cb': Add test for AuthTokenTable.Clear.
-
Shawn Willden authored
* commit 'ef76546c': Add test for AuthTokenTable.Clear.
-
Shawn Willden authored
* commit '28befb5e': Add test for AuthTokenTable.Clear.
-
- 16 Apr, 2015 5 commits
-
-
Shawn Willden authored
-
Shawn Willden authored
Also fix tests broken by the change from 32 to 64-bit timestamps. Change-Id: I5a80c6795880fe7231b1d311db7f3e0869913947
-
Chad Brubaker authored
* commit 'c598fab3': Flush the auth token table on resetUid
-
Chad Brubaker authored
* commit 'd914f657': Flush the auth token table on resetUid
-
Chad Brubaker authored
* commit '7a4dd551': Flush the auth token table on resetUid
-