(This is a merge of http://go/wvgerrit/16496 )
run_all_unit_tests.sh now aborts and alerts the user if they have
Verity on, as opposed to its current behavior of failing later when
the tests don't copy over successfully.
Bug: 23420350
Change-Id: Ib01d32caaac462974b051f5d019888f7c47bc745
* Add Apple MD5 support in DeviceFiles
[ Merge of http://go/wvgerrit/15544 ]
Patch courtesy of Spotify.
* Changing vague BufferReader log message
[ Merge of http://go/wvgerrit/15515 ]
Amending the buffer reader log message for null parameters in the
read function to say the type of parameter to help tell the
difference between Read2, Read2s, Read4, Read4s, Read8, and
Read8s.
Bug: 23619044
* Fix HTTP socket tests
[ Merge of http://go/wvgerrit/15521 ]
This fixes the build on Jenkins. I missed these when I updated HTTP
socket because they are not part of the CE CDM test suite.
* Update HttpSocket for IPv6
[ Merge of http://go/wvgerrit/15517 ]
Previously, HttpSocket made assumptions about IPv4.
This CL updates this utility to be agnostic to IPv4 vs IPv6.
If our servers start resolving to IPv6 addresses in future,
our tests can now handle this transparently.
* Removed low level warnings from PSSH
[ Merge of http://go/wvgerrit/15489 ]
Unneeded warnings in parsing PSSH and in buffer reader
were appearing in the logs. LOGW commands were replaced
with LOGV.
Bug: 23419359
* BufferReader unit tests and hardening.
[ Merge of http://go/wvgerrit/15449 ]
Added unit tests for public-facing functions.
Added protection against null or negative parameters.
Bug: 23419008
Change-Id: Ia44100a2d1bafe68986ae9a0793214885b21e61e
Merge from widevine repo of http://go/wvgerrit/14708
This CL adds a test to verify that oemcrypto is a level 1 device. It
is part of oemcrypto_test_android.cpp, so it only applies to android
devices and to the widevine buildbot which also runs the android tests.
bug: 21814204
Change-Id: Icbcdd3496fb8a656891bd7c873c60cba23c9666a
Merge from widevine repo of http://go/wvgerrit/14218
If GTEST_FILTER was not set, it defaults to "" which matches no
tests. This CL changes it to "*" if it was "".
Also, quotes are added around the environment variable and command so
that it multiple variables can be set.
Change-Id: Icad9a1fbca2d1b436f6e37a2a080a70a384f0a1d
This is a merge from the Widevine repository of
http://go/wvgerrit/14024
Add Level 3 Oemcrypto Unit Tests To Run All Tests Script
This CL adds the ability to restrict the oemcrypto unit tests to only
use the fall back level 3. This restriction is per-process, and is
only used while running the unit tests. This allows us to automate
running the unit tests on an android device as both level 1 and level
3 without modifying files in /system/lib. To turn on the restriction,
set the environment variable: FORCE_LEVEL3_OEMCRYPTO=yes.
New level 3 library versions are:
level3/arm/libwvlevel3.a Level3 Library Apr 8 2015 13:09:05
level3/x86/libwvlevel3.a Level3 Library Apr 8 2015 13:15:42
http://go/wvgerrit/14055
Remove Redundant Tests
This CL modifies the UsageTableTests in oemcrypto_test.cpp so that
they are not all parameterized by new_mac_keys_. This parameter is
used when testing signatures. In particular, we do not need to verify
timing twice.
Also, I modified the run_all_unit_tests.sh script so that the
environment variable GTEST_FILTER is passed down to the android
process. This allows us to use the script to run a limited list of
tests while debugging.
http://go/wvgerrit/14054
Filter Out API Version 10 Tests
This CL updates the OEMCrypto tests so that all but one test will pass
for a device that implements the version 9 API.
Android LMP devices should pass tests with
GTEST_FILTER="*-*MNC*:*CanLoadTestKeys*"
http://go/wvgerrit/13886
Update Documentation about Optional Features
The intergration guide has been updated to include reference to
OEMCrypto_LoadTestRSAKey. It also now discusses optional features.
The Delta 10 document now mentions OEMCrypto_LoadTestRSAKey.
The android supplement warns that most optional features are required.
This also adds clarification about which functions should save the
usage table, in answer to:
b/16799904 OEMCrypto v9 ambiguous about saving usage table information
Change-Id: Ifb517d58952c9b332b2958ca99af64bc293b985f
(This is a merge of http://go/wvgerrit/14052)
Adds a hard return at the end of the output of run_all_unit_tests.sh
if tests failed, which was previously missing.
Change-Id: Ie888168fb965e1f116c2cd7d586b46736abc9c80
(This is a merge of http://go/wvgerrit/12700 from the Widevine CDM
repository.)
Adds unit tests which cover several cases, including five which are
fixed in this patch:
* Find a Widevine PSSH after a PSSH with non-zero flags.
(We have no control over another provider's abuse of the flags field,
so we should not give up if such a PSSH appears before ours.)
* Find a Widevine PSSH after a v1 PSSH.
(CENC now specifies a general v1 format. We don't have to support it
directly in the CDM, but we do have to skip it gracefully.)
* Find a Widevine PSSH after a non-PSSH box.
(This would be unusual input, but we can easily recover from it.)
* Parse a PSSH box with a size field of 0, which means "the rest of the
buffer."
(This would be unusual input, too, but is technically allowed for any
MP4 box.)
* Parse a v1 Widevine PSSH box, ignoring the new fields we don't need.
Bug: 19288007
Change-Id: I355df9e34ba4d53cc02e8501de965a0d193ee554
A bug prevented regenerating license release requests. This has
been corrected. A crash due to a formatting error has been addressed.
Clean up of logging and additional logging for open session failures
have been included.
b/16197822
Merge of https://widevine-internal-review.googlesource.com/#/c/10806
from the widevine cdm repo.
Change-Id: I854ead388f311d00b1cd700dfa1b2f58322c2dd4
GPlay offline tests were failing due to additional query parameters that were
introduced with b12789275. Additional changes caused offline failures,
as the content pointed to by the test vectors was HD only and did not
allow for offline playback.
This addresses the problem by switching request license tests to point to UAT.
UAT is now the default license server destination for request license tests.
Test vectors for GPlay will be added back as a secondary option when they
are available.
b/13909635
Merge of https://widevine-internal-review.googlesource.com/#/c/10261/
from the widevine cdm repo.
Change-Id: I5e5a2b477b6d591747123e8eeb3cd00b7f762090
OEMCrypto now returns OEMCrypto_ERROR_KEY_EXPIRED rather than
OEMCrypto_UNKNOWN_ERROR when the key has expired. This CL adds
a test to verify that CDM is handling this correctly.
[Merge of https://widevine-internal-review.googlesource.com/#/c/9730
from the Widevine cdm repo]
b/9205119
Change-Id: I6b13b43d71f7fa51531c309ffd3f93d3648f9b89
Make the build_and_run_all_unit_tests script push individual tests
instead of doing a full sync, makes it easier to run unit tests
against release builds.
Merge of https://widevine-internal-review.googlesource.com/#/c/8405/
from the widevine cdm repo.
Change-Id: I8efda77be9ab863f616fab88c4782b7c9edb8858
This merges the following changes from the Widevine CDM repository:
da001b6 Add Privacy mode and service certificate
This adds support to the CDM for privacy mode and service certificates.
92bf200 Add support for using Youtube Content Protection server for testing
Enables testing with Youtube Content Protection server. Google Play license
server is still the default. Select YTCP server by using the flag -icp
e.g. adb shell '/system/bin/request_license_test -icp'
85dcd60 Fixes to enable privacy mode
These includes changes to use PKCS7 padding, corrected root CA formatting
and changes to integration test. Also refactored service certificate
handling.
989971c Correction to request license test
Corrected PropertySetTest to provision when needed. Also added disabled
privacy tests to run against YTCP staging server until GooglePlay
integration is complete.
Bug: 10109249
Change-Id: If81d68c65d743d77a485406f48d1be41a74de0af
Because we do not want to accidentally install a test keybox on a
production device, most of the oemcrypto unit tests are being disabled
by default.
If you wish to run these tests, you can override this choice, by
running:
adb shell /system/bin/oemcrypto_test --gtest_also_run_disabled_tests
This change prompts for and requires positive confirmation before
running the disabled tests on a device that has a non-test keybox
already installed.
Bug: 8907626
Merge of https://widevine-internal-review.googlesource.com/#/c/5531/
from the Widevine CDM repository
Change-Id: Ib8e3605129ebf0861b4af15d04676f7a06cc5b78
The android timer class was not generating timer events correctly. This caused
renewal and expiration events not to be sent. A strong pointer to the
timer thread was not held and this caused the android util timer
thread to exit after firing once. This is now addressed.
Bug: 8736545
Merge of https://widevine-internal-review.googlesource.com/#/c/5353/
from the Widevine CDM repository.
Change-Id: I2d904e55d4d10eacc1a51f1c6b5c1a267c92c8d8