diff options
author | Shawn Willden <swillden@google.com> | 2015-02-02 08:05:25 -0700 |
---|---|---|
committer | Shawn Willden <swillden@google.com> | 2015-02-02 08:05:25 -0700 |
commit | 5b53c999edcd819ab2e5318bfd4589bc969fcbcc (patch) | |
tree | 5d9d72866a2613a087d32dfc4511f6e3ba90881f /Android.mk | |
parent | ecf2ae9fc5fd66a0f12d9adce8aa9010f66ae863 (diff) | |
download | android_system_keymaster-5b53c999edcd819ab2e5318bfd4589bc969fcbcc.tar.gz android_system_keymaster-5b53c999edcd819ab2e5318bfd4589bc969fcbcc.tar.bz2 android_system_keymaster-5b53c999edcd819ab2e5318bfd4589bc969fcbcc.zip |
Revert "Revert "Add SoftKeymasterDevice""
This reverts commit ecf2ae9fc5fd66a0f12d9adce8aa9010f66ae863.
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) |