d3ed3a207990fa2a1cd2902a07afc9bd3d1f5777 |
|
28-Mar-2017 |
Shawn Willden <swillden@google.com> |
Revert "Delegate auth token parsing to HAL." This reverts commit 76f21b2676092911ab030c3dde1489902c00ab71. Reason for revert: b/36637075 Bug: 36637075 Change-Id: Ica737cf96d14086aae7918f8bf2f86a36555d03b
/system/security/keystore/legacy_keymaster_device_wrapper.cpp
|
76f21b2676092911ab030c3dde1489902c00ab71 |
|
17-Feb-2017 |
Shawn Willden <swillden@google.com> |
Delegate auth token parsing to HAL. Auth tokens have an unfortunate dual character. To most of the system they are opaque blobs that are intended only to be obtained from one HAL (e.g. gatekeeper or fingerprint) and passed to another HAL (keymaster), but keystore actually needs to extract some bits of information from them in order to determine which of the available blobs should be provided for a given keymaster key operation. This CL adds a method that resolves this dual nature by moving the responsibility of parsing blobs to the HAL so that no component of the framework has to make any assumptions about their content and all can treat them as fully opaque. This still means that the various HAL implementers have to agree on content, but they also have to agree on an HMAC key which much be securely distributed to all at every boot, so asking them to agree on an auth token format is perfectly acceptable. But now the Android system doesn't have to care about the format. Bug: 32962548 Test: CTS tests pass, plus manual testing. Change-Id: I2ab4b4fbea1425fc08aa754fc10f8e386899af25
/system/security/keystore/legacy_keymaster_device_wrapper.cpp
|
b8550a0929286bd8b91135c2beea1f61c01a441f |
|
23-Feb-2017 |
Shawn Willden <swillden@google.com> |
Add digest support and implementation name to getHardwareFeatures Test: Manual Change-Id: Iee20528e8d4f3931164aa988e11bfe71be4f56dc
/system/security/keystore/legacy_keymaster_device_wrapper.cpp
|
634a1aac20ab5970e731c41010520260e7a66c3c |
|
20-Mar-2017 |
Bartosz Fabianowski <bartfab@google.com> |
Add manufacturer and model to device ID attestation Discussions have shown that in addition to brand, device and product, we should also allow devices to attest their manufacturer and model. Bug: 36433192 Test: GTS com.google.android.gts.security.DeviceIdAttestationHostTest Change-Id: I28ee51d9f95c3e4efb8932f3c9b899082eb62e55
/system/security/keystore/legacy_keymaster_device_wrapper.cpp
|
a9452d92ca705108dcb61545024348f3c24a62aa |
|
23-Jan-2017 |
Bartosz Fabianowski <bartfab@google.com> |
Add device id attestation This adds device id attestation to KeyStoreService. The service validates that the user holds the required permissions before allowing attestation to proceed. Bug: 34597337 Test: CTS CtsKeystoreTestCases and GTS DeviceIdAttestationHostTest Change-Id: I6ff6146fad4656b8e1367650de922124b3d7f7b2
/system/security/keystore/legacy_keymaster_device_wrapper.cpp
|
c7a9fa29c185a8c1889486d4acf00fd59c513870 |
|
13-Oct-2016 |
Janis Danisevskis <jdanis@google.com> |
Port to binderized keymaster HAL This patch ports keystore to the HIDL based binderized keymaster HAL. Keystore has no more dependencies on legacy keymaster headers, and therefore data structures, constant declarations, or enums. All keymaster related data structures and enums used by keystore are the once defined by the HIDL based keymaster HAL definition. In the process of porting, keystore underwent some changes: * Keystore got a new implementation of AuthorizationSet that is fully based on the new HIDL data structures. Key parameters are now either organised as AuthorizationSets or hidl_vec<KeyParameter>. (Formerly, this was a mixture of keymaster's AuthorizationSet, std::vec<keymaster_key_param_t>, and keymaster_key_param_set_t.) The former is used for memory management and provides algorithms for assembling, joining, and subtracting sets of parameters. The latter is used as wire format for the HAL IPC; it can wrap the memory owned by an AuthorizationSet for this purpose. The AuthorizationSet is accompanied by a new implementation of type safe functions for creating and accessing tagged key parameters, Authorizations (keystore/keymaster_tags.h). * A new type (KSSReturnCode) was introduced that wraps keystore service response codes. Keystore has two sets of error codes. ErrorCode errors are less than 0 and use 0 as success value. ResponseCode errors are greater than zero and use 1 as success value. This patch changes ResponseCode to be an enum class so that is no longer assignable to int without a cast. The new return type can only be initialized by ResponseCode or ErrorCode and when accessed as int32_t, which happens on serialization when the response is send to a client, the success values are coalesced onto 1 as expected by the clients. KSSreturnCode is also comparable to ResponseCode and ErrorCode, and the predicate isOk() returns true if it was initialized with either ErrorCode::OK (0) or ReponseCode::NO_ERROR (1). * A bug was fixed, that caused the keystore verify function to return success, regardless of the input, internal errors, or lack of permissions. * The marshalling code in IKeystoreService.cpp was rewritten. For data structures that are known to keymaster, the client facing side of keystore uses HIDL based data structures as (target) source for (un)marshaling to avoid further conversion. hidl_vecs are used to wrap parcel memory without copying and taking ownership where possible. * Explicit use of malloc is reduced (malloc was required by the C nature of the old HAL). The new implementations avoid explicit use of malloc/new and waive the use of pointers for return values. Instead, functions return by value objects that take ownership of secondary memory allocations where required. Test: runtest --path=cts/tests/tests/keystore/src/android/keystore/cts Bug: 32020919 Change-Id: I59d3a0f4a6bdf6bb3bbf791ad8827c463effa286
/system/security/keystore/legacy_keymaster_device_wrapper.cpp
|