Commit Graph

13 Commits

Author SHA1 Message Date
Jiyong Park
853773dd93 Build widevine tests with BOARD_VNDK_VERSION set
The tests are using vendor only libs such as libcdm and libwvlevel3,
thus marked as LOCAL_PROPRIETARY_MODULE to use the libs. In addition,
the dependency to libmedia is changed to libmedia_omx since libmedia is
not available to vendor modules. UniquePtr is replaced with
std::unique_ptr since UniquePtr.h in /libnativehelper is not available
to vendors (and will not be completely removed in a near future).

Bug: 37342627
Test: BOARD_VNDK_VERSION=current m -j tests

Change-Id: I4e9d3267b20c1d52f57664b89f15330e2ebd953d
2017-08-07 16:28:28 +09:00
Aaron Vaage
edb9f00df7 Widevine Metrics System
This change is the complete Widevine metrics system. It will
measure and record runtime information about what is happening
in the CDM - such as errors and throughput.

Bug: 33745339
Bug: 26027857
Change-Id: Ic9a82074f1e2b72c72d751b235f8ae361232787d
2017-01-27 16:59:17 -08:00
Fred Gylys-Colwell
626a416e5f Extract Session class from oemcrypto_test.
This allows the OEMCrypto session state to be accessed by
tests in other modules.  For example, keys can be added for testing
encryption and decryption operations in CDM-level tests.

Merge from Widevine repo of http://go/wvgerrit/18127,
http://go/wvgerrit/18591, http://go/wvgerrit/18581 and
http://go/wvgerrit/20802.

Change-Id: Ie0d071a2da610c0856ae6356a0abf054013a1b87
2016-09-07 17:10:09 -07:00
Dan Albert
7ef26a32b3 Stop hard coding gtest things.
The headers are exported.

Change-Id: If095898ca8d9dfd2a807dcc35bc197e76963fff4
Test: mma
2016-08-17 12:30:17 -07:00
Rahul Frias
072cf7e711 Add level 3 libs and address build warnings
* Fix strict aliasing error in gcc

  [ Merge of http://go/wvgerrit/15856 ]

  This also ensures the alignment of 64-bit memory access in a portable
  way, without using compiler-specific mechanisms like attributes or
  platform-specific mechanisms like memalign.

  (The aliasing error does not show up in clang.)

* Return kNotSupported for non-Widevine init data

  [ Merge of http://go/wvgerrit/15853 ]

  This also improves logging for the init data parser by including a
  verbose message for non-Widevine PSSHs and by using a new IsEOF()
  method to avoid misleading "Unable to read atom size" logs.

* Cast RSA_size() to int

  [ Merge of http://go/wvgerrit/15880 ]

  It has been suggested that this may be unsigned on some versions of
  OpenSSL or BoringSSL.

* Be strict about warnings for CE CDM

  [ Merge of http://go/wvgerrit/15831 ]

  * Enable all warnings and treat warnings as errors in the CE build.
  * Fix all existing warnings (mostly unused variables, consts, and
  functions, and one signed/unsigned comparison).
  * Exclude protobuf warnings rather than maintain a divergent copy.

* Fix release build errors

  [ Merge of http://go/wvgerrit/15855 ]

* Level 3 Build With Android Emulator

  [ Merge of http://go/wvgerrit/15778 ]

  This CL rebuilds the level 3 libraries with the android emulator
  sdk_phone_*.  This seems to avoid problems with the x86 build using
  incorrect compiler flags.

  These libraries work for arm, x86, mips, arm64, and x86_64.  The level
  3 library is disabled for mips64.

  Versions:
  level3/mips/libwvlevel3.a  Level3 Library Sep 30 2015 18:29:50
  level3/arm/libwvlevel3.a  Level3 Library Sep 28 2015 13:18:25
  level3/x86/libwvlevel3.a  Level3 Library Sep 28 2015 13:08:28

Change-Id: I1e50aa78bdc84ecb905f2e55297d4f48b140341c
2015-10-15 22:50:29 +00:00
John "Juce" Bruce
123c469d3e Do Not Use GNU-Style Hashing on MIPS
(This is a merge of http://go/wvgerrit/14801)

The MIPS compiler does not support GNU hashing, which means this
compiler option needs to be excluded.

Bug: 19482469
Change-Id: I913f666a39eb535a33ebfbc49e5e7531115db5d4
2015-06-19 16:33:11 -07:00
Fred Gylys-Colwell
f75fddcdf1 Update unit test make files to use BoringSSL
Merge from widevine of go://wvgerrit/14173

This CL updates the android makefiles to use the libcrypto_static.

Change-Id: I74567ff880ebdce366766a9ab44c92cc9540b8db
2015-04-22 07:47:51 -07:00
Kyle Alexander
7cb708b8ad Merge "Fix compatibility for tests to execute on older OS versions" 2015-04-10 17:14:06 +00:00
Kyle Alexander
1e87ad760f Fix compatibility for tests to execute on older OS versions
Change-Id: I7b2554d097901cd5880b6cd3ddbe66c9b127dcfd
2015-04-10 09:15:23 -07:00
Fred Gylys-Colwell
6d5be4fddf Enable OEMCrypto Unit Tests
This is a merge from the widevine repository of
http://go/wvgerrit/13923 Switch openssl to use the EVP interface for aes-ctr-128
http://go/wvgerrit/13979 Add Test Certificate to OEMCrypto Mock
http://go/wvgerrit/13978 Add Test Keybox to Level 3 OEMCrypto
http://go/wvgerrit/13873 Enable OEMCrypto Unit Tests

This CL adds a main program to oemcrypto_test.cpp, which filters out
tests that are not supported on the specified platform. It also adds
LoadTestKeybox to the mock. This allows oemcrypto unit tests to be run
on devices that have production keybox.  It also allows the same set
of unit tests to work on Android and on non-Android platforms.

b/18962381 Use test certificate (partial fix)
b/19867990 Separate cast receiver tests

Change-Id: If89c31530103ed85aa37d7379bd5b4dc2a927f38
2015-04-07 15:24:10 -07:00
Fred Gylys-Colwell
10cc0a5ddb Require Features for Android OEMCrypto
Merge from Widevine repo if http://go/wvgerrit/13781

This CL adds several unit tests that are specifically designed to test
features that are required for Android CDM but not other platforms.

Once this CL has been merged, future CLs will modify the main
oemcrypto test file so that some tests are skipped if their features
are not implemented.

Change-Id: I55b8cbb9c13d2db88bd4f56bba31a4aab3306067
2015-03-30 11:27:01 -07:00
Dan Albert
723d67c88f Remove Widevine CDM Dependency on STLPort
* Replace an stlport static assert with a C++11 static_assert.
 * Move some libraries that were being built with the NDK but
   statically included into platform code off the NDK.
 * Rebuild the obfuscated binaries to use the new STL.
 * Remove MIPS support temporarily due to an inability to generate
   obfuscated binaries for it. (To be fixed in b/19482469.)

Bug: 15193147
Change-Id: Icc166583b0c6af68550baf17ab8c33076a1179d3
2015-02-25 15:53:36 -08:00
Kyle Alexander
8e31c7f445 Makefile to support building XtsOEMCryptoTestCases module
This makefile will be linked to from the vendor/xts project,
and defines how to build the oemcrypto_unittest executable into
an xts compatible native test.

Bug: 18952052
Change-Id: I8158cad703b558b88070cc46dafcf109699ecc77
2015-02-20 14:48:34 -08:00