Merge from Widevine repo of http://go/wvgerrit/81265
Types of cleanup:
- Removed function / class prefixes from the logs.
- Fixed log string format options to match the types passed
- Added static_cast conversion on enumerations
- _Tried_ to make the log format more consistent (open to feedback)
- Corrected small spelling mistakes
This set of changes is very large, splitting change across several
submissions. This change:
- core/src/buffer_reader.cpp
- core/src/cdm_engine.cpp
- core/src/cdm_session.cpp
Test: WV linux unittests
Bug: 134460638
Change-Id: I16c3297b8e94a99c2b8650b129d0f9e8d96b177f
Merge from Widevine repo of http://go/wvgerrit/79243
Modify failures for LoadKeyWithSuspiciousIV and SelectKeyNotThereAPI15
This turns on some unit tests that were disabled for Q release.
Merge from Widevine repo of http://go/wvgerrit/77948
Mod Mock: Dump entitlement keys - this allows some logging when
running in a test environment.
Merge from Widevine repo of http://go/wvgerrit/75763
Refactor OEMCrypto Decrypt Tests
This CL refactors the oemcyrpto decryption tests. A bunch of boiler
plate code was moved to a common test setup. Also, buffer handling
was streamlined so that it will be easier to use these test with
secure output buffers.
Bug: 131281966
Bug: 129432708
Test: unit tests
Change-Id: Iebf62611a16e0a4def9c4daed1c6cdf12686ba74
[ Merge of http://go/wvgerrit/79884 ]
WvCdmDecryptionModule needs to be refcounted since it inherits
from RefBase. The test code instantiates it as a member variable.
Bug: 133188706
Test: WV unit/integration tests
Change-Id: I8ae3d92ae148677ea9a8290a6c0553c1a43e3454
[ Merge of http://go/wvgerrit/80805 ]
This change was used only where `typedef` was used for type aliasing,
and not for defining a new type (such as enums, structs, or function
pointer types).
Clang-format was used on the changed files.
Test: WV unit tests
Bug: 134437705
Change-Id: I730b9709a5ac773b3036daa79024caab665b3daa
Bug: b/133641240
Tests: ProvisioningInterspersedRetryTest L3 & modmock
Merge of http://go/wvgerrit/80164
The ProvisioningInterspersedRetryTest tests that the response tied to
the provisioning request before the latest fails to be handled. This is
only true for provisioning 2.0 where we use derived keys. In
provisioning 3.0, the number of requests allowed to be handled is tied
to the number of nonces, which from OEMCrypto v15.2 onwards, is exactly
4. This CL modifies the test to handle that behavior.
Change-Id: I9f4e555acab145487d6e409779afe7b9b63fd4af
Bug: b/133855570
Tests: Android tests/CE CDM tests/Linux tests
Merge of http://go/wvgerrit/80163
Adds a query option to QueryStatus to get the provisioning model of the
OEMCrypto.
Change-Id: I1896984be6294a5ada9a97b63e6d9080297e92b0
[ Merge of http://go/wvgerrit/80484 ]
Clang-format has been run on files in core/src. clang-format has been turned
off for some blocks but otherwise no other changes have been made.
Bug: 134365840
Test: WV unit/integration tests
Change-Id: I6e509f25136f84d37de3d920084302f0f2c23dc4
[ Merge of http://go/wvgerrit/80483 ]
Clang-format has been run on files in core/include
Bug: 134365840
Test: WV unit/integration tests
Change-Id: I890127f23f30f0e63f826d3638521b4cc12fb995
(This is a merge of http://go/wvgerrit/77803)
In OEMCrypto 15.2, OEMCrypto_GenerateNonce() is a Session Initialization
Function, which means the global OEMCrypto lock must be held before
calling it. There's no harm updating our code to behave this way now,
even before OEMCrypto 15.2 implementations are ready, since it's a
stricter guarantee than the current behavior.
Bug: 131327826
Test: CE CDM Unit Tests
Test: Android Unit Tests
Change-Id: Icb6a86dea7298c99596fa9e3d90cec721ebcb8a6
[ Merge of http://go/wvgerrit/79883 ]
This corrects test code and undoes CE CDM changes in b/113167010 which
will be resolved in a future release.
The tests failures addressed are
* ProvisioningTestWithServiceCertificate
* ReleaseRetryOfflineKeyTest
* ReleaseRetryL3OfflineKeyTest
* ReleaseRetryL3OfflineKeySessionUsageDisable
ProvisioningInterspersedRetryTest has been disabled and will be
addressed in a post 15.2 OEMCrypto release in 133641240
Bug: 119428680
Test: WV unit/integration tests
Change-Id: I7961b4556a0ac749e4f38d43f1bea8f520d67f20
[ Merge of http://go/wvgerrit/80084 ]
Corrected the key type being returned after entitled keys from
init data are loaded. Made test changes to validate.
Bug: 133903028
Test: WV unit/integration tests
Change-Id: Icb44587f5c3aba3b0facae6d83dc9344d6b60833
Bug: b/133427576
Test: Unit tests on Taimen and Crosshatch
Merge of http://go/wvgerrit/79804
Currently, the run_all_unit_tests.sh script fails to load in the Level 1
OEMCrypto for some devices that don't have a 64-bit liboemcrypto.so. This
is because the liboemcrypto.so tries to load in libQSEEComAPI.so, which
some devices contain both a 32-bit and 64-bit version of. Since we set
the LD_LIBRARY_PATH to use /vendor/lib64 first, and since we only have a
32-bit liboemcrypto.so, the 32-bit liboemcrypto.so will try to load in the
libQSEEComAPI.so in the lib64 path first. Since the liboemcrypto.so is
32-bit, it will fail to open the 64-bit library. The solution to this is
to conditionally set the LD_LIBRARY_PATH based on if a 64-bit
liboemcrypto.so exists or not.
Change-Id: I80a9e778f31f089f66df0544cb022d810e9d3de3
Without this statement, compilation failed with new googletest.
Test: build
Bug: 129498355
Change-Id: I9eb7b7a2634f20ef80a23b75c06fc84a2fa52dc3
(cherry picked from commit 9055e93a70)
[ Merge of ag/7620084 ]
Without this statement, compilation failed with new googletest.
Test: build
Bug: 129498355
Change-Id: I5e3f5310617e00821f70079fc700bc3f87c3d0ab
(cherry picked from commit 5764d3f801)
[ Merge of http://go/wvgerrit/78803 ]
WvCdmDecryptionModule needs to be refcounted since it inherits
from RefBase. The test code instantiates it as a member variable.
Bug: 133188706
Test: WV unit/integration tests
Change-Id: Ib41f3477a55923fb4cc26472e42d3e18eb2b84d4
Bug: b/130252305
Test: nyc-mr2-release -> pi-dev, oc-mr1-release -> pi-dev
nyc-mr2-release -> oc-mr1-release -> pi-dev upgrades with offline
licenses
Merge of http://go/ag/7323341
In N, the L3 files were stored in /data/mediadrm/IDM[uid]/. In O, they
were moved to /data/mediadrm/IDM[uid]/L3/. In P, we moved the contents
of mediadrm to /data/vendor/mediadrm/. For an O->P upgrade, the L3 files
can be read in /data/vendor/mediadrm/IDM[uid]/L3/, but when we upgrade
N->P, the L3 files sit in /data/vendor/mediadrm/IDM[uid]/, unable to be
read. This CL addresses this issue by changing the script to move any L3
files if they exist under this directory to the L3 subdirectory after we
do the bulk move from /data/mediadrm/ to /data/vendor/mediadrm/.
Change-Id: I319c323879766df063d25478046367878023a7cf
(cherry picked from commit 1a6ca36976)
Merge of http://go/wvgerrit/78683
There were some review comments in http://go/wvgerrit/78683 that came
in after the code was merged to the qt-dev branch. This CL addresses
them on the master branch.
Test: unit tests.
Bug: 129070445
Merge from Widevine repo of http://go/wvgerrit/78949
LoadKeyWithSuspiciousIV is a new test for OEMCrypto v15.2. It is
being disabled since we do not require 15.2 for the Q release.
SelectKeyNotThereAPI15 was failing because the error code is
delayed. This is acceptable.
Bug: 132720732
Test: unit tests on taimen
Change-Id: Iea3fabfb3afd800065119ce812fb454be1e82644