Add DecryptCTR to OEMCrypto Mock

This is a software only implementation of the OEMCrypto library for
testing the rest of the DRM code.  It currently implements the
OEMCrypto_DecrtyptCTR function using a clear key.

I've included the license request code so the rest of the group can
play with it, but I have only tested part of it.

This patch also has some makefiles and an integration testing.  You
should be able to generate the shared library libclearkeydrmengine.so with
cd vendor/widevine/libclearkeydrmengine; mm
You can create some unit test and integration test programs from the
directories:
vendor/widevine/libwvdrmengine/oemcrypto/test
vendor/widevine/libclearkeydrmengine/test
vendor/widevine/libclearkeydrmengine/inttest
vendor/widevine/libclearkeydrmengine/crypto/test

This change also addresses some comments about comments in OEMCryptoDASH.h
which were made in https://googleplex-android-review.googlesource.com/257323

Change-Id: Id6899b9f8d2f09e09be2ea493baa83a6b929073b
This commit is contained in:
Fred Gylys-Colwell
2012-12-14 19:03:25 -08:00
committed by Jeff Tinker
parent 04bfbb0198
commit fede3bffdd
26 changed files with 1561 additions and 1492 deletions

View File

@@ -1,9 +1,5 @@
LOCAL_PATH := $(call my-dir)
# We depend on the static libraries from our subdirectories to build this
# shared library
include $(call all-subdir-makefiles)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
@@ -15,18 +11,24 @@ LOCAL_C_INCLUDES := \
frameworks/av/include \
vendor/widevine/libclearkeydrmengine/include \
vendor/widevine/libclearkeydrmengine/crypto/include \
vendor/widevine/libclearkeydrmengine/oemcrypto/include \
vendor/widevine/libwvdrmengine/oemcrypto/include \
LOCAL_STATIC_LIBRARIES := \
libwvclearkeycryptoplugin \
libmockoemcrypto \
LOCAL_SHARED_LIBRARIES := \
liblog \
libutils \
libdl \
libcrypto \
LOCAL_MODULE := libclearkeydrmengine
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)
# Sublibraries Needed:
include vendor/widevine/libclearkeydrmengine/crypto/Android.mk
include vendor/widevine/libwvdrmengine/oemcrypto/mock/Android.mk