diff options
Diffstat (limited to '')
-rw-r--r-- | crypto/ext4crypt/Android.mk | 7 | ||||
-rw-r--r-- | crypto/ext4crypt/Ext4Crypt.cpp | 6 |
2 files changed, 8 insertions, 5 deletions
diff --git a/crypto/ext4crypt/Android.mk b/crypto/ext4crypt/Android.mk index 693b67518..4aba9ef45 100644 --- a/crypto/ext4crypt/Android.mk +++ b/crypto/ext4crypt/Android.mk @@ -6,7 +6,7 @@ LOCAL_MODULE := libe4crypt LOCAL_MODULE_TAGS := eng optional LOCAL_CFLAGS := LOCAL_SRC_FILES := Decrypt.cpp Ext4Crypt.cpp ScryptParameters.cpp Utils.cpp HashPassword.cpp ext4_crypt.cpp -LOCAL_SHARED_LIBRARIES := libselinux libc libc++ libext4_utils libsoftkeymaster libbase libcrypto libcutils libkeymaster_messages libhardware libprotobuf-cpp-lite +LOCAL_SHARED_LIBRARIES := libselinux libc libc++ libext4_utils libbase libcrypto libcutils libkeymaster_messages libhardware libprotobuf-cpp-lite LOCAL_STATIC_LIBRARIES := libscrypt_static LOCAL_C_INCLUDES := system/extras/ext4_utils system/extras/ext4_utils/include/ext4_utils external/scrypt/lib/crypto system/security/keystore hardware/libhardware/include/hardware system/security/softkeymaster/include/keymaster system/keymaster/include @@ -28,10 +28,13 @@ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26; echo $$?),0) LOCAL_CFLAGS += -DHAVE_LIBKEYUTILS LOCAL_SHARED_LIBRARIES += libkeyutils endif - LOCAL_ADDITIONAL_DEPENDENCIES := keystore_auth + LOCAL_REQUIRED_MODULES := keystore_auth else LOCAL_SRC_FILES += Keymaster.cpp KeyStorage.cpp endif +ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 28; echo $$?),0) + LOCAL_SHARED_LIBRARIES += libsoftkeymaster +endif include $(BUILD_SHARED_LIBRARY) diff --git a/crypto/ext4crypt/Ext4Crypt.cpp b/crypto/ext4crypt/Ext4Crypt.cpp index ea5b1cf88..048a0bd9f 100644 --- a/crypto/ext4crypt/Ext4Crypt.cpp +++ b/crypto/ext4crypt/Ext4Crypt.cpp @@ -312,7 +312,7 @@ bool lookup_key_ref(const std::map<userid_t, std::string>& key_map, userid_t use return true; } -static bool ensure_policy(const std::string& raw_ref, const std::string& path) { +static bool ensure_policy(const std::string& raw_ref __unused, const std::string& path) { LOG(INFO) << "ensure_policy '" << path << "'\n"; return true; return access(path.c_str(), F_OK) == 0; // ensure policy will set a policy if one is not set on an empty folder - we don't want to do this in recovery @@ -438,7 +438,7 @@ static bool parse_hex(const char* hex, std::string* result) { } // TODO: rename to 'install' for consistency, and take flags to know which keys to install -bool e4crypt_unlock_user_key(userid_t user_id, int serial, const char* token_hex, +bool e4crypt_unlock_user_key(userid_t user_id, int serial __unused, const char* token_hex, const char* secret_hex) { if (e4crypt_is_native()) { if (s_ce_key_raw_refs.count(user_id) != 0) { @@ -469,7 +469,7 @@ bool e4crypt_unlock_user_key(userid_t user_id, int serial, const char* token_hex return true; } -bool e4crypt_prepare_user_storage(const char* volume_uuid, userid_t user_id, int serial, +bool e4crypt_prepare_user_storage(const char* volume_uuid, userid_t user_id, int serial __unused, int flags) { if (flags & FLAG_STORAGE_DE) { |