Skip to content

Commit 37dfcb7

Browse files
codeworkxjumoog
authored andcommitted
ext4crypt: keymaster: add flag to force use keymaster v1
Change-Id: I79f76da61b988640798ad24cc3b7fd683aa5e253
1 parent 3814427 commit 37dfcb7

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

crypto/ext4crypt/Android.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ ifneq ($(wildcard hardware/libhardware/include/hardware/keymaster0.h),)
1414
LOCAL_CFLAGS += -DTW_CRYPTO_HAVE_KEYMASTERX
1515
LOCAL_C_INCLUDES += external/boringssl/src/include
1616
endif
17+
18+
ifneq ($(TW_CRYPTO_USE_KEYMASTER_V1), true)
1719
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26; echo $$?),0)
1820
LOCAL_CFLAGS += -DUSE_KEYSTORAGE_3 -DHAVE_GATEKEEPER1
1921
LOCAL_SRC_FILES += Keymaster3.cpp KeyStorage3.cpp
@@ -31,6 +33,9 @@ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26; echo $$?),0)
3133
else
3234
LOCAL_SRC_FILES += Keymaster.cpp KeyStorage.cpp
3335
endif
36+
else
37+
LOCAL_SRC_FILES += Keymaster.cpp KeyStorage.cpp
38+
endif # TW_CRYPTO_USE_KEYMASTER_V1
3439

3540
include $(BUILD_SHARED_LIBRARY)
3641

0 commit comments

Comments
 (0)