[ Merge of http://go/wvgerrit/68066 ]
This got dropped as a side-effect of b/120519038 and causes only
some of the WV unit tests to be executed. Oops.
b/120519038
Test: WV unit/integration tests
Change-Id: If256af0f7e620006642a98a1bbecb5a55da7090c
(This is a merge of http://go/wvgerrit/66810)
Netflix discovered that several files were only compiling because of
transitive includes via the Metrics code. This patch adds the missing
headers they noted.
Bug: 118676365
Test: CE CDM Build
Change-Id: Ifbc4e5d4276d1c3fb9bbd677230cd431e34e5c76
(This is a merge of http://go/wvgerrit/66625)
Google C++ Style dictates that methods which override base class or
interface methods should be declared "override" but not "virtual". Since
our codebase has not had access to "override" until now, many of our
classes do not follow this rule. I've updated as many places as I could
find to follow Google C++ Style, which should hopefully help us catch
errors better in the future.
Bug: 111851141
Test: CE CDM Unit Tests
Test: Android Unit Tests
Change-Id: Ic23e2e482e967256da306791532b5fec7b81b2f2
(This is a merge of http://go/wvgerrit/66643)
The sub-license feature has been removed from the server and packager.
So that we do not have to continue maintaining the code that supports
this feature that never shipped, I am removing it from the CDM as well.
Bug: 113165466
Test: CE CDM Unit Tests
Test: Android Unit Tests
Change-Id: I5d25844b161e74aa19adf19a29c56e4881aa7304
[ Merge of http://go/wvgerrit/67583 ]
The new command formats are
$ build_and_run_all_unit_tests.sh [-j <num>] [-s <device_number>]
$ run_all_unit_tests.sh [-s <device_number>]
Bug: 120519038
Test: WV unit/integration tests with a single device and with two devices
connected (with and without specifying a target serial number)
Change-Id: I518038c3fc178a7eb658fcd4cf82dd13dfa7131f
Merged from http://go/wvgerrit/67523
This is in preparation for adding the Full Decryption Path Test
android application so it will reside under
vendor/widevine/libwvdrmengine/test/java.
Test: build and run MediaDrmAPITest.apk from the new directory
bug: 113594822
Change-Id: If4adb51ba7bb24a5e28e04956909c2d5a1af3c53
Bug: b/119276649
Merge from: http://go/wvgerrit/66367
Test: Android, CE CDM, Linux unit tests
The FileSystem interface as it exists expects an Open for a file and
then a Close when finished. However, the Close doesn't delete the file
itself and depending on the platform, the underlying impl_ as well,
leading to a memory leak. To fix this leak as well as harden against
future memory issues, this change refactors the interface to shift away
from raw pointers and towards smart pointers.
Change-Id: I7a7132ea95cd3775796a540f510b698f4f27dd24
Widevine HIDL service added new v1.2 media APIs,
update the service to support new APIs.
Merged from http://go/wvgerrit/67083
Test: Netflix and Play Movies & TV (streaming and offline playback)
Test: GTS WidevineH264PlaybackTests test
e.g. ANDROID_BUILD_TOP= ./android-gts/toolsefed run gts -m GtsMediaTestCases
--test com.google.android.media.gts.WidevineH264PlaybackTests#testL1With480P30
Test: Widevine unit tests
bug: 117570686
Change-Id: I3a2091e7c62a0d2697ef97f983fd898aedfb4519
Merge from Widevine repo of http://go/wvgerrit/66865
This CL updates the comments for the code that uses
InstallKeyboxOrCert to install a keybox or oem cert at runtime. There
is also a new unit test for the device id. There are not many unit
tests because we don't want to accidentally overwrite the production
keybox or cert on a device when running tests.
bug: 111725154
test: unit tests
Change-Id: Ide9b3d4732f3f96a723a128907babe7e59c02ffc
Merge from Widevine repo of http://go/wvgerrit/66883
The main reason this README is needed is that we want to tell partners
which branches they should be using.
test: docs only
bug: 31963611
Change-Id: Ifce968cdffc69e547c58cd8a4615b2f949bcab62
[ Merge of http://go/wvgerrit/66083 and http://go/ag/5445191 ]
Fix proposed by amlogic. Release usage session early in the CdmEngine
destructor to avoid SIGBUS.
Bug: 118646062
Test: WV unit/integration tests.
Change-Id: I8b419c57814dc32e9873173ab6c24d209bdcc3a0
[ Merge of http://go/wvgerrit/59720 ]
Enforce OEMCrypto insufficient resources error reporting in CDM tests.
In addition, when CreateNew/LoadUsageEntry fails with OEMCrypto
insufficient resources error, delete a random usage entry
and retry. The current behavior evicts low index entries
from the usage table, which was a crude attempt to emulate a LRU.
This was deficient as, on occasion, it will result in the deletion
of a recently added usage entry.
Bug: 111260263
Bug: 113828866
Test: WV unit/integration tests, GtsMediaTestCases.
Netflix and Play movies playback tests.
Change-Id: I63340f76d1e2af3c6834b98ad816e11eea18fc7f
Merge from Widevine repo of http://go/wvgerrit/66708
This adds a unit test to verify that LoadKeys still works if the message is not
word alligned.
Test: unit tests on desktop and taimen (x86 and arm)
Bug: 68783727
Change-Id: Ib081a2c21af710b294772513c2c777ef1ac0daf0
Merge from Widevine repo of http://go/wvgerrit/66711
This addresses review comments for the OEMCrypto v15 CLs, as documented in
b/119685652.
Test: unit tests
Bug: 119685652
Change-Id: I0e7ce13dd80335eb1a12240df5c1df2c34ba4298
[ Merge of http://go/wvgerrit/65442 ]
This also requires the removal of sub session related code as references
were removed from the proto.
Bug: 119077124
Test: WV unit/integration tests
Change-Id: Ida1a591afc267ec97344e5bba00bbf401887a202
Merge from master branch of Widevine repo of http://go/wvgerrit/66081
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/65962
This CL changes function names in the v14 level 3 libraries to work with
the dynamic adapter. I also excluded several OEMCrypto unit tests from
running with a v14 oemcrypto because they require error code changes
introduced in v15.
Bug: 117888897 Fix backwards compatibility
Bug: 119313532 Integration test failing
Test: unit tests on taimen. Play Movies, ExoPlayer, Netflix play on taimen.
Some unit tests do not pass because Taimen uses a v13 oemcrypto. Most pass.
Change-Id: Ib8eb8a89591fdba3055064c4bdf90523b01309a8
Merge from master branch of Widevine repo of http://go/wvgerrit/66080
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/64002
This CL updates OEMCrypto reference code and unit tests to support full decrypt
path testing.
Test: unit tests
Test: tested as part of http://go/ag/5501993
Bug: 34078913
Change-Id: Ia67374599d6619698a336f41513068ad04294e7f
Merge from master branch of Widevine repo of http://go/wvgerrit/66079
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/65662
This CL forces OEMCrypto_Initialize to be called before OEMCrypto_GetRandom is
called in the reference code.
Bug: 34847139
Test: tested as part of http://go/ag/5501993
Change-Id: Ibb94e2fdc11cdb43c2c7bd2a3379f87b0155479a
Merge from master branch of Widevine repo of http://go/wvgerrit/66078
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/64022
This CL updates OEMCrypto ref code, unit tests, and core code for
setting the sandbox id before initializing OEMCrypto.
Test: unit tests only
Test: tested as part of http://go/ag/5501993
Bug: 115834255
Change-Id: Id9831680fe4db1c69413815931cae4bc80df0c01
Merge from master branch of Widevine repo of http://go/wvgerrit/66077
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/64562
Bug: b/78357351
b/62058202 addressed issues with the Level 3 OEMCrypto in guarding
against rollback. This change does something similar for the ref, so
that OEMCrypto vendors have rollback-prevention code they can refer to.
Test: linux/ce cdm unit tests
Test: tested as part of http://go/ag/5501993
Change-Id: I76128c5def2615ecbdbe94e3af1fec4a025be8c1
Merge from master branch of Widevine repo of http://go/wvgerrit/66076
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/64743http://go/wvgerrit/64083 had some refactorings that weren't completely
accurate or slightly changed the meaning of some tests. This CL is an
addendum to that CL to fix those refactorings.
Test: tested as part of http://go/ag/5501993
Bug: 115874964
Change-Id: I37766a4c34de737eb9ca94ef781805435ee30dfd
Merge from master branch of Widevine repo of http://go/wvgerrit/66075
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/64702
Bug: 118172995
Tests OEMCrypto_LoadKeys when given a KeyObject with NULL KeyControl or
KeyControl iv.
Test: tested as part of http://go/ag/5501993
Change-Id: I1a5d26b1e2ff395fbd5ef7769af1165222c1877e
Merge from master branch of Widevine repo of http://go/wvgerrit/66074
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/65102
Currently, the string only contains the mac_key_server, which isn't an
issue currently because we just get the offset into the message for the
enc_mac_keys pointer when calling LoadKeys, and rely on OEMCrypto to
read the 64 bytes. However, v15 will need the length of the enc_mac_keys
to reflect the true size.
Test: tested as part of http://go/ag/5501993
Bug: 115874964
Change-Id: Id76e91feb176755467c0433e6b0e87d2bb221033
Merge from master branch of Widevine repo of http://go/wvgerrit/66073
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/64083
As part of the update to v15, LoadKeys, RefreshKeys, and
LoadEntitledContentKeys should all use offsets and lengths into the
message rather than a pointer for its parameters. The CDM, tests,
adapters, and OEMCrypto implementations are changed to reflect this.
Test: tested as part of http://go/ag/5501993
Bug: 115874964
Change-Id: I981fa322dec7c565066fd163ca5775dbff71fccf
Merge from master branch of Widevine repo of http://go/wvgerrit/66072
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/63764
This adds the function OEMCrypto_ResourceRatingTier to the oemcrypto referenece
code, dynamic adapter, and unit tests.
Bug: 117110800
Test: tested as part of http://go/ag/5501993
Change-Id: Idf47af405f0c69601108b75c788a97b30abdb39d
Merge from master branch of Widevine repo of http://go/wvgerrit/66071
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/63842
OEMCrypto tests log the HDCP value. This CL updates those logs to include logs
for HDCP 2.3.
Test: unit tests
Test: tested as part of http://go/ag/5501993
Bug: 78773763
Change-Id: I7a3003e081c3c848b5d595ac241a0b546dacb747
Merge from master branch of Widevine repo of http://go/wvgerrit/66070
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/63662
To make the threading model more clear, CopyBuffer is now a session function.
This means we need to pass in which session the current thread locks.
Test: unit tests.
Test: tested as part of http://go/ag/5501993
Bug: 113680369
Change-Id: I2fdd2cfcaab99f3793950b3845941463675f5e4c
Merge from master branch of Widevine repo of http://go/wvgerrit/66069
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/62420
This is the full API -- not just the delta.
Bug: 111939411
Test: docs only
Test: tested as part of http://go/ag/5501993
Change-Id: Id839bf10666e271c882fc437f9ebbd3941d23784
Merge from master branch of Widevine repo of http://go/wvgerrit/66068
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/62066
Bug: 111939411
Test: docs only
Test: tested as part of http://go/ag/5501993
Change-Id: Ic682b603cd6d90b10df433b76c071c303b4e35cc
Merge from master branch of Widevine repo of http://go/wvgerrit/66067
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/63002
The OEMCryptoCENC.h comments are now generated from the doc. This corrects
several years of drift caused by small changes to the doc that were not copied
to the header.
Test: tested as part of http://go/ag/5501993
Bug: 111939411
Change-Id: I56ab9c6cf280bc72b39f6ddafc26cf21f6074c98
Merge from master branch of Widevine repo of http://go/wvgerrit/66066
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/63628
The error code OEMCrypto_KEY_NOT_LOADED is redundant with
OEMCrypto_ERROR_NO_CONTENT_KEY and OEMCrypto_KEY_NOT_ENTITLED. The
function LoadEntitledContentKey should return KEY_NOT_ENTITLED if it
does not find the corresponding entitlement key in its key table. All
other functions that do not find a key id in the key table should
return OEMCrypto_ERROR_NO_CONTENT_KEY. This includes QueryKeyControl,
SelectKey, and RefreshKeys.
Test: unit tests
Test: tested as part of http://go/ag/5501993
Bug: 115574797
Change-Id: Ida2111f32e331b99f3f0c77fa404a42654d0870c
Merge from master branch of Widevine repo of http://go/wvgerrit/66065
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/63080
This is for the reference code, the unit tests, and the oemcrypto adapter.
Bug: 116414218
Test: unit tests
Test: tested as part of http://go/ag/5501993
Change-Id: I05a631f6cfcf1584a748b3a0c9ae48633893589f