Below are a set of CLs being merged from the wv cdm repo to the android repo. * Fix handling of OEM Cert public key. Author: Srujan Gaddam <srujzs@google.com> [ Merge of http://go/wvgerrit/27921 ] This is a potential fix for b/36656190. Set aside public key on first call to get the public key, and use it afterwards. This gets rid of extra calls to OEMCrypto_GetOEMPublicCertificate(), which has side-effect of staging the OEM private key. This also fixes a problem where the public cert string was not being trimmed to match the size returned by OEMCrypto_GetOEMPublicCertificate(). * Complete provisioning request/response for Provisioning 3.0 Author: Gene Morgan <gmorgan@google.com> [ Merge of http://go/wvgerrit/27780 ] Fix bug on provisioning request path where GenerateDerivedKeys() was being called when preparing to generate the signature. Add message signature verification, and call correct OEMCrypto routine to rewrap the private key (OEMCrypto_RewrapDeviceRSAKey30). * Implement Cdm::deleteAllUsageRecords() Author: Gene Morgan <gmorgan@google.com> [ Merge of http://go/wvgerrit/27780 ] Delete all usage records for current origin. Removes usage records from file system and retains the PSTs. The deletes any usage entries matching those PSTs held by OEMCrypto. BUG: 35319024 * Remove stringencoders library from third_party. Author: Jacob Trimble <modmaker@google.com> [ Merge of http://go/wvgerrit/27585 ] We have a fork of the stringencoders library that we use for base64 encoding. This reimplements base64 encoding to remove the extra dependency and to reduce the amount of code. * Add Cdm::deleteUsageRecord() based on key_set_id. Author: Gene Morgan <gmorgan@google.com> [ Merge of http://go/wvgerrit/27605 ] Delete specified usage record from file system usage info and from OEMCrypto. BUG: 35319024 * Modifiable OEMCrypto Author: Fred Gylys-Colwell <fredgc@google.com> [ Merge of http://go/wvgerrit/24729 ] This CL adds a new variant of the OEMCrypto mock code that adjusts its behavior based on a configuration file. This is intended for testing. For example, a tester can set current_hdcp to 2 in the options.txt file, push it to the device, and verify that a license is granted for HDCP 2.0. Then the tester can edit the value of current_hdcp to 1 and push the file to the device. Playback should stop because the license is no longer valid. This variant uses a real level 1 liboemcrypto.so to push data to a secure buffer. That means we can test playback for a license that requires secure buffers on an Android device with real secure buffers. BUG: 35141278 BUG: 37353534 BUG: 71650075 Test: Not currently passing. Will be addressed in a subsequent commit in the chain. Change-Id: I58443c510919e992bb455192e70373490a00e2b6
272 lines
7.1 KiB
Makefile
272 lines
7.1 KiB
Makefile
# -----------------------------------------------------------------------------
|
|
# CDM top level makefile
|
|
#
|
|
LOCAL_PATH := $(call my-dir)
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Copies move script to /system/bin.
|
|
# The mv command preserves SELinux labels(i.e. media_data_file).
|
|
# We need to run restorecon to put the correct context after the move.
|
|
# However, restorecon is not implemented for /vendor/bin, so we put
|
|
# the script in /system/bin.
|
|
#
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_SRC_FILES := move_widevine_data.sh
|
|
LOCAL_MODULE_CLASS := EXECUTABLES
|
|
LOCAL_MODULE := $(LOCAL_SRC_FILES)
|
|
LOCAL_MODULE_TAGS := optional
|
|
LOCAL_MODULE_OWNER := widevine
|
|
|
|
|
|
include $(BUILD_PREBUILT)
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Builds android.hardware.drm@1.0-service.widevine
|
|
#
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_SRC_FILES := src_hidl/service.cpp
|
|
|
|
LOCAL_C_INCLUDES := \
|
|
vendor/widevine/libwvdrmengine/include_hidl \
|
|
vendor/widevine/libwvdrmengine/mediadrm/include \
|
|
vendor/widevine/libwvdrmengine/oemcrypto/include \
|
|
|
|
LOCAL_SHARED_LIBRARIES := \
|
|
android.hardware.drm@1.0 \
|
|
libbase \
|
|
libhidltransport \
|
|
libhwbinder \
|
|
liblog \
|
|
libutils \
|
|
libwvhidl \
|
|
libbinder \
|
|
|
|
LOCAL_HEADER_LIBRARIES := \
|
|
libstagefright_foundation_headers
|
|
|
|
LOCAL_MODULE := android.hardware.drm@1.0-service.widevine
|
|
LOCAL_INIT_RC := src_hidl/android.hardware.drm@1.0-service.widevine.rc
|
|
LOCAL_REQUIRED_MODULES := move_widevine_data.sh
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/bin/hw
|
|
LOCAL_PROPRIETARY_MODULE := true
|
|
LOCAL_MODULE_OWNER := widevine
|
|
|
|
ifneq ($(TARGET_ENABLE_MEDIADRM_64), true)
|
|
LOCAL_MODULE_TARGET_ARCH := arm x86 mips
|
|
endif
|
|
|
|
include $(BUILD_EXECUTABLE)
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Builds libcdm_utils.a
|
|
#
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := libcdm_utils
|
|
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
|
|
LOCAL_PROPRIETARY_MODULE := true
|
|
|
|
LOCAL_STATIC_LIBRARIES := libcrypto
|
|
|
|
LOCAL_C_INCLUDES := \
|
|
vendor/widevine/libwvdrmengine/cdm/core/include \
|
|
vendor/widevine/libwvdrmengine/cdm/include \
|
|
vendor/widevine/libwvdrmengine/oemcrypto/include \
|
|
|
|
LOCAL_HEADER_LIBRARIES := \
|
|
libutils_headers \
|
|
|
|
LOCAL_SHARED_LIBRARIES := \
|
|
liblog
|
|
|
|
SRC_DIR := cdm/src
|
|
CORE_SRC_DIR := cdm/core/src
|
|
LOCAL_SRC_FILES := \
|
|
$(CORE_SRC_DIR)/properties.cpp \
|
|
$(CORE_SRC_DIR)/string_conversions.cpp \
|
|
$(SRC_DIR)/clock.cpp \
|
|
$(SRC_DIR)/file_store.cpp \
|
|
$(SRC_DIR)/file_utils.cpp \
|
|
$(SRC_DIR)/lock.cpp \
|
|
$(SRC_DIR)/log.cpp \
|
|
$(SRC_DIR)/properties_android.cpp \
|
|
$(SRC_DIR)/timer.cpp \
|
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Builds libcdm_protos.a
|
|
# Generates *.a, *.pb.h and *.pb.cc for *.proto files.
|
|
#
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := libcdm_protos
|
|
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
|
|
LOCAL_PROPRIETARY_MODULE := true
|
|
|
|
CORE_PROTO_SRC_FILES := $(call all-proto-files-under, cdm/core/src)
|
|
LOCAL_SRC_FILES := $(CORE_PROTO_SRC_FILES) $(METRICS_PROTO_SRC_FILES)
|
|
|
|
generated_sources_dir := $(call local-generated-sources-dir)
|
|
|
|
# $(generated_sources_dir)/proto/$(LOCAL_PATH)/cdm/core/src is used
|
|
# to locate *.pb.h by cdm source
|
|
# $(generated_sources_dir)/proto is used to locate *.pb.h included
|
|
# by *.pb.cc
|
|
# The module that depends on this library will have LOCAL_C_INCLUDES prepended
|
|
# with this path.
|
|
LOCAL_EXPORT_C_INCLUDE_DIRS := \
|
|
$(generated_sources_dir)/proto \
|
|
$(generated_sources_dir)/proto/$(LOCAL_PATH)/cdm/core/src
|
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Builds libhidl_utils.a
|
|
#
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := libhidl_utils
|
|
|
|
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
|
|
|
|
LOCAL_C_INCLUDES := \
|
|
vendor/widevine/libwvdrmengine/include_hidl
|
|
|
|
LOCAL_SRC_FILES := \
|
|
src_hidl/TypeConvert.cpp
|
|
|
|
LOCAL_SHARED_LIBRARIES := \
|
|
android.hardware.drm@1.0
|
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Builds libwvdrmengine.so
|
|
#
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_SRC_FILES := \
|
|
src/WVCDMSingleton.cpp \
|
|
src/WVCreatePluginFactories.cpp \
|
|
src/WVCryptoFactory.cpp \
|
|
src/WVDrmFactory.cpp \
|
|
src/WVUUID.cpp \
|
|
|
|
LOCAL_C_INCLUDES := \
|
|
frameworks/av/include \
|
|
frameworks/native/include \
|
|
vendor/widevine/libwvdrmengine/cdm/core/include \
|
|
vendor/widevine/libwvdrmengine/cdm/metrics/include \
|
|
vendor/widevine/libwvdrmengine/cdm/include \
|
|
vendor/widevine/libwvdrmengine/include \
|
|
vendor/widevine/libwvdrmengine/mediacrypto/include \
|
|
vendor/widevine/libwvdrmengine/mediadrm/include \
|
|
vendor/widevine/libwvdrmengine/oemcrypto/include \
|
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
|
libcdm \
|
|
libcdm_protos \
|
|
libcdm_utils \
|
|
libcrypto \
|
|
libjsmn \
|
|
libwvdrmcryptoplugin \
|
|
libwvdrmdrmplugin \
|
|
libwvlevel3 \
|
|
|
|
LOCAL_SHARED_LIBRARIES := \
|
|
libcutils \
|
|
libdl \
|
|
liblog \
|
|
libprotobuf-cpp-lite \
|
|
libstagefright_foundation \
|
|
libutils \
|
|
|
|
LOCAL_HEADER_LIBRARIES := \
|
|
libutils_headers \
|
|
libstagefright_headers
|
|
|
|
LOCAL_MODULE := libwvdrmengine
|
|
|
|
LOCAL_MODULE_RELATIVE_PATH := mediadrm
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
LOCAL_MODULE_OWNER := widevine
|
|
|
|
LOCAL_PROPRIETARY_MODULE := true
|
|
|
|
include $(BUILD_SHARED_LIBRARY)
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Builds libwvhidl.so
|
|
#
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_SRC_FILES := \
|
|
src/WVCDMSingleton.cpp \
|
|
src/WVUUID.cpp \
|
|
src_hidl/WVCreatePluginFactories.cpp \
|
|
src_hidl/WVCryptoFactory.cpp \
|
|
src_hidl/WVDrmFactory.cpp \
|
|
|
|
LOCAL_C_INCLUDES := \
|
|
frameworks/av/include \
|
|
frameworks/native/include \
|
|
vendor/widevine/libwvdrmengine/cdm/core/include \
|
|
vendor/widevine/libwvdrmengine/cdm/metrics/include \
|
|
vendor/widevine/libwvdrmengine/cdm/include \
|
|
vendor/widevine/libwvdrmengine/include_hidl \
|
|
vendor/widevine/libwvdrmengine/include \
|
|
vendor/widevine/libwvdrmengine/mediacrypto/include_hidl \
|
|
vendor/widevine/libwvdrmengine/mediacrypto/include \
|
|
vendor/widevine/libwvdrmengine/mediadrm/include_hidl \
|
|
vendor/widevine/libwvdrmengine/mediadrm/include \
|
|
vendor/widevine/libwvdrmengine/oemcrypto/include \
|
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
|
libcdm \
|
|
libcdm_protos \
|
|
libcdm_utils \
|
|
libcrypto \
|
|
libjsmn \
|
|
libwvdrmcryptoplugin_hidl \
|
|
libwvdrmdrmplugin_hidl \
|
|
libwvlevel3 \
|
|
|
|
# When the GNU linker sees a library, it discards all symbols that it doesn't
|
|
# need. libhidl_utils must come after both libwvdrmcryptoplugin and
|
|
# libwvdrmdrmplugin.
|
|
LOCAL_STATIC_LIBRARIES += libhidl_utils
|
|
|
|
LOCAL_SHARED_LIBRARIES := \
|
|
android.hardware.drm@1.0 \
|
|
android.hidl.memory@1.0 \
|
|
libcutils \
|
|
libdl \
|
|
libhidlbase \
|
|
libhidlmemory \
|
|
libhidltransport \
|
|
libhwbinder \
|
|
liblog \
|
|
libprotobuf-cpp-lite \
|
|
libutils \
|
|
|
|
LOCAL_MODULE := libwvhidl
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
LOCAL_MODULE_OWNER := widevine
|
|
|
|
LOCAL_PROPRIETARY_MODULE := true
|
|
|
|
include $(BUILD_SHARED_LIBRARY)
|
|
|
|
include vendor/widevine/libwvdrmengine/cdm/Android.mk
|
|
include vendor/widevine/libwvdrmengine/level3/Android.mk
|
|
include vendor/widevine/libwvdrmengine/mediacrypto/Android.mk
|
|
include vendor/widevine/libwvdrmengine/mediadrm/Android.mk
|
|
include vendor/widevine/libwvdrmengine/vts/vendor_module/Android.mk
|