diff options
author | Shawn Willden <swillden@google.com> | 2015-01-22 13:42:31 -0700 |
---|---|---|
committer | Shawn Willden <swillden@google.com> | 2015-01-27 23:20:57 -0700 |
commit | 2079ae8a94f7f19e89d94c842a4f4055bb21c39a (patch) | |
tree | 5d9d72866a2613a087d32dfc4511f6e3ba90881f /Android.mk | |
parent | 7b38f4414c974ecc0972b822f1ee46c695101600 (diff) | |
download | android_system_keymaster-2079ae8a94f7f19e89d94c842a4f4055bb21c39a.tar.gz android_system_keymaster-2079ae8a94f7f19e89d94c842a4f4055bb21c39a.tar.bz2 android_system_keymaster-2079ae8a94f7f19e89d94c842a4f4055bb21c39a.zip |
Add SoftKeymasterDevice
SoftKeymasterDevice implements the keymaster HAL API by calling directly
to a GoogleKeymaster instance.
Change-Id: If530b98fecbef05815b685efff9295539614fd52
Diffstat (limited to 'Android.mk')
-rw-r--r-- | Android.mk | 46 |
1 files changed, 35 insertions, 11 deletions
@@ -17,10 +17,6 @@ LOCAL_PATH := $(call my-dir) ### # libkeymaster_messages contains just the code necessary to communicate with a # GoogleKeymaster implementation, e.g. one running in TrustZone. -# -# Note that this library is too large; it should not include ocb.c and not use -# openssl. At present it must, because the code needs refactoring to separate -# concerns a bit better. ## include $(CLEAR_VARS) # Disable clang until we find a way to suppress clang optmization in google_keymaster_utils.h. @@ -38,32 +34,60 @@ LOCAL_CFLAGS = -Wall -Werror LOCAL_MODULE_TAGS := optional LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk -include $(BUILD_STATIC_LIBRARY) +include $(BUILD_SHARED_LIBRARY) ### # libkeymaster contains almost everything needed for a keymaster implementation, # lacking only a subclass of the (abstract) GoogleKeymaster class to provide -# environment-specific services. +# environment-specific services and a wrapper to translate from the +# function-based keymaster HAL API to the message-based GoogleKeymaster API. ### include $(CLEAR_VARS) # Disable clang until we find a way to suppress clang optmization in google_keymaster_utils.h. LOCAL_CLANG := false LOCAL_MODULE:= libkeymaster LOCAL_SRC_FILES:= \ + aes_key.cpp \ + aes_operation.cpp \ + asymmetric_key.cpp \ authorization_set.cpp \ - google_keymaster_messages.cpp \ + ecdsa_key.cpp \ + ecdsa_operation.cpp \ google_keymaster.cpp \ + google_keymaster_messages.cpp \ google_keymaster_utils.cpp \ - ocb.c \ + key.cpp \ key_blob.cpp \ + ocb.c \ + rsa_key.cpp \ + rsa_operation.cpp \ serializable.cpp \ unencrypted_key_blob.cpp LOCAL_C_INCLUDES := \ - $(LOCAL_PATH)/include \ - external/openssl/include + $(LOCAL_PATH)/include LOCAL_SHARED_LIBRARIES := libcrypto LOCAL_CFLAGS = -Wall -Werror LOCAL_MODULE_TAGS := optional LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk -include $(BUILD_STATIC_LIBRARY) +include $(BUILD_SHARED_LIBRARY) + + +### +# soft_keymaster_device provides a software-based keymaster HAL implementation. +# This is used by keystore as a fallback when there is no HW keymaster +# implementation available, or it doesn't provide needed features. +### +include $(CLEAR_VARS) +LOCAL_MODULE := soft_keymaster_device +LOCAL_MODULE_RELATIVE_PATH := hw +LOCAL_SRC_FILES := \ + soft_keymaster_device.cpp \ + soft_keymaster_logger.cpp +LOCAL_C_INCLUDES := \ + system/security/keystore +LOCAL_CFLAGS = -Wall -Werror +LOCAL_SHARED_LIBRARIES := libkeymaster liblog +LOCAL_MODULE_TAGS := optional +LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk +include $(BUILD_SHARED_LIBRARY) |