1# Copyright (C) 2015 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14# 15 16LOCAL_DIR := $(GET_LOCAL_DIR) 17 18MODULE := $(LOCAL_DIR) 19 20MANIFEST := $(LOCAL_DIR)/manifest.json 21 22MODULE_SRCS += \ 23 $(LOCAL_DIR)/trusty_gatekeeper.cpp \ 24 25IPC := ipc 26 27MODULE_LIBRARY_DEPS += \ 28 trusty/user/base/lib/libc-trusty \ 29 trusty/user/base/lib/libstdc++-trusty \ 30 trusty/user/base/lib/rng \ 31 trusty/user/base/lib/hwkey \ 32 trusty/user/base/lib/storage \ 33 trusty/user/base/lib/keymaster \ 34 system/gatekeeper \ 35 external/boringssl \ 36 37MODULE_INCLUDES += \ 38 $(LOCAL_DIR) \ 39 $(TRUSTY_TOP)/hardware/libhardware/include 40 41# Gatekeeper uses variable-length arrays to concatinate a salt with a password. 42# The code should be changed to either use malloc or explicitly pass each piece 43# of data to the hash function. 44# TODO(ncbray): remove the VLA and turn the warning back on. 45MODULE_COMPILEFLAGS := -Wno-vla 46 47 48# This should be set to an appropriate storage service port. 49# For example, if a device implements factory reset protection using gatekeeper, 50# it should be set to STORAGE_CLIENT_TDP_PORT or STORAGE_CLIENT_TP_PORT. 51GATEKEEPER_STORAGE_PORT ?= STORAGE_CLIENT_TD_PORT 52 53MODULE_DEFINES += \ 54 GATEKEEPER_STORAGE_PORT=$(GATEKEEPER_STORAGE_PORT) \ 55 56include $(LOCAL_DIR)/$(IPC)/rules.mk 57 58include make/trusted_app.mk 59