Need to add missing unit tests to the test package so that
they will be available to the tradefed-based ATP test platform.
Test: lunch sailfish-userdebug, make
check out/.../tests.zip package for missing files.
Bug: 74028858
Change-Id: I009751ea8fe7aed48bcdd92ac9bcc050e48ce666
Merge from Widevine repo of http://go/wvgerrit/44505
This CL changes the certificate provisioning code to verify the
provisioning message using a cert from license.widevine.com instead of
the staging certificate.
It also adjusts the certificates in config_test_env.cpp because the
license and provisioning servers are different and may probably have
different certs.
bug: 73031756
test: unit tests with mock oemcrypto, and read oemcrypto on sailfish
Change-Id: I4b457a369a49ef07bda9e5632ab59e5f621ec966
Merge of http://go/wvgerrit/44508
b/73893009
Test: Unit/integration tests
One of the tools in Caligo (fix_constants) led to segfaults in the x86
build when creating usage table headers and in OEMCrypto_Terminate.
This file removes that level of obfuscation temporarily until the
problem is fixed.
Merge from Widevine repo of http://go/wvgerrit/44502
OEMCrypto v14 is no longer required for Pi, so this CL disables the
unit test verifying that version. The test will be re-enabled for
MR1.
test: unit tests
bug: 74003607
Change-Id: I76f9b66e1652ffb1f8a5bfc7be572e3c7a4cff83
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.
Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.
Test: make relevant packages
Bug: 73535841
Change-Id: I1c0366e78fb44f06bc07329866440097275f5b51
Merged from http://go/wvgerrit/44312
The move script is only needed for existing devices that
are running Widevine DRM and are upgrading to Pi or later
Android releases. New devices release with Pi and future
Android releases do not need to run this script.
To run this script, vendor must add the dependency to the
corresponding device makefile and build from ANDROID_ROOT.
For example:
PRODUCT_PACKAGES += \
android.hardware.drm@1.0-impl \
android.hardware.drm@1.0-service \
android.hardware.drm@1.0-service.widevine \
move_widevine_data.sh
In addition, vendor needs to update device SELinux policy.
Test: Upgrade from O-MR1 to Pi, Netflix & Play Movies
can play back offline content downloaded in O-MR1
Test: adb shell to verify script is in /system/bin
Test: adb shell to verify widevine data is moved to
/data/vendor/mediadrm
Test: use audit2allow to verify no avc:denied for widevine drm service
bug: 73656300
Change-Id: I7ad0dfcc0e490f4c018b6a17df6313fade89937f
The following change descriptions were generated automatically and so
may be a little repetitive. They are provided to give the reviewer
enough information to check the comments match what has actually been
changed and check the reasoning behind the changes.
* libwvdrmengine/test/castv2/AndroidManifest.xml
Add uses-library for org.apache.http.legacy because CastSignAPITest
depends on org.apache.http.legacy library at build time so
presumably needs it to be provided at runtime. Unfortunately,
CastSignAPITest targets P and from P onwards the
org.apache.http.legacy library is only provided when explicitly
requested through the manifest.
* libwvdrmengine/test/java/AndroidManifest.xml
Add uses-library for org.apache.http.legacy because MediaDrmAPITest
depends on org.apache.http.legacy library at build time so
presumably needs it to be provided at runtime. Unfortunately,
MediaDrmAPITest targets P and from P onwards the
org.apache.http.legacy library is only provided when explicitly
requested through the manifest.
Bug: 72375096
Bug: 18027885
Test: make checkbuild
Change-Id: I3a761a693918fd506ace26fd7c3502a2a42c031d
Merge from Widevine repo of http://go/wvgerrit/43720
This CL changes the cdm engine test's Provision method so that it
keeps OEMCrypto alive during the provisioning. This is only needed
when testing with the oemcrypto mock and the nonce flood rate has been
throttled to 1. In that case, if OEMCrypto is allowed to terminate
between each request, all nonce requests will be an error.
Keeping OEMCrypto alive does not modify the desired test results when
oemcrypto is not throttled.
This CL changes test code only.
bug: 73607610
test: unit tests
Change-Id: I71b27b1bb8200188a0a821afc977d7a9cc7fd968
Merge from Widevine repo of http://go/wvgerrit/43721
This CL allows the tester to change the nonce flood rate from the
default of 20. A tester would want this value to be larger to make
tests run more quickly.
Setting the rate to 1 makes every other nonce request a flood error.
A tester wants to do this in order to verify cdm code responds to
nonce flood correctly. Several failing oemcrypto tests have also been
corrected.
This CL changes test code only.
bug: 73607610
test: unit tests
Change-Id: I3f52ff7ea9bcc1db7bc0e010da0b64a12d3b4dd3
Merge of http://go/wvgerrit/43541
Test: Unit/Integration tests
b/73500155
This change uses the same clear data as the kCenc30Cbc1Key33Sample to
verify decryption, since it shares the same key as opposed to the
32Sample.
Merge from Widevine repo of http://go/wvgerrit/43440
This CL changes several tests so that they abort after multiple
failures. This prevents a network error from putting one of the usage
table tests into an infinite loop.
bug: 73397596
test: unit tests
Change-Id: Iaaec9eb2b39a6a2b2cfc90ee1c28bae0486aa851
Merge from Widevine repo of http://go/wvgerrit/43420
Remove or mark unused variables. Fix unsigned/signed comparisons.
bug: 73390805
test: unit tests
Change-Id: Ic523400a5decf82fae733042b260e0c39a087cd3
Merge from Widevine repo of http://go/wvgerrit/43401
This turns off a bunch of unused typedef warning messages
test: unit tests
bug: 70894426
Change-Id: I8c0f02b98a2e89c4623c942a0981f01f3fe47da6
[ Merge of http://go/wvgerrit/43281 ]
Bug: 73164325
Test: WV unit/integration test, playback tests using Netflix and
Play Movies.
Change-Id: Ifc3dd8863da1616eb4a7df35ad010f53b6d5e3d2
[ Merge of http://go/wvgerrit/43240 ]
HDCP related changes were made in http://go/wvgerrit/42602. This
also changed the string values returned in the HDCP query command.
This CL reverts changes to the string values as were specified in
the Widevine Modular DRM Plugin vendor extensions document. Changing
them at this point will impact applications.
Bug: 70278160
Test: WV unit/integration tests, GtsMediaTestCases, playback using
Play Movies and Netflix.
Change-Id: I20171a8272aeeff5007cf90c9939b2ce1ce0fb13
Merge from Widevine repo of http://go/wvgerrit/42942
This CL changes test code only.
Bug: 73132054
test: unit tests
Change-Id: Ic9ca1879a942b0cad8ea15a98ed263a5fd170b4c
[ Merged of http://go/wvgerrit/39766 ]
The security level (software/hardware, decryption/decode)
in the policy that specified how the key was to be used was
not being respected for L3. Playback would either continue or
a vendor specific error would be thrown.
If the device cannot use the key as permitted by the policy
CryptoException#ERROR_INSUFFICIENT_OUTPUT_PROTECTION will be thrown.
Bug: 31913737
Bug: 31913439
Test: WV unit/integration tests
Test: Playback using playmovies and netflix. Cast playback using
playmovies.
Change-Id: If25735ab0f789108431115623cb236687c5ef818
Merge from Widevine repo of http://go/wvgerrit/42403
This CL changes the names of some unit tests so that they don't run
when testing an older version of oemcrypto.
bug: 68275290
test: ran unit tests against v8-v14 oemcrypto.
Change-Id: I773350adf4df3f3b310478400cd4d4e85789fc37
Merge from Widevine repo of http://go/wvgerrit/42402
This changes the AES key size back to 128 for keys that are not
entitlment keys.
bug: 72904259
test: unit tests
Change-Id: I07cc56050cafb82c65b67c56df3f18d375047eb8
[ Merge of http://go/wvgerrit/42444 ]
This covers cenc, cens, cbc1 and cbcs. This also covers
HLS v2 format.
b/70684636
Test: Verified using WV unit/integration tests
Change-Id: I3e85b496d29b91c514f0bb806712cdf0cee12903
[ Merge of http://go/wvgerrit/42103 ]
* While deprecating keyboxes as identification, some code to
restore a license was mistakenly removed in http:://go/wvgerrit/36740,
http://ag/3442777
* Corrections to keep track of cipher mode, call SelectKeys when cipher
mode changes and to use the backward compatible LoadKeys call in case
OEMCrypto is v13.
Bug: 70160032
Test: Ran WV unit/integration tests. Request license test failures
have been addressed.
Change-Id: Id03c50874085af6d9985d10c19a74a02efb7a1f5
Merge from Widevine repo of http://go/wvgerrit/42281
This cleans up some of the oemcrypto mock code. This code is only
used for testing.
bug: 72831885
bug: 69271232
Change-Id: I8add162839d6febe56a89df84e8ae0cf0b97a2d9
Merge from Widevine repo of http://go/wvgerrit/42102
The unit test should use the real system id if it is using a real
oemcrypto.
test: ran unit tests on sailfish.
bug: 72718962
Change-Id: Ib58a47976f85b840c6f34d379b1c020e7e85d59a
Merge from Widevine repo of http://go/wvgerrit/42064
This adds a unit test to verify that OEMCrypto can load a certificate
with an RSA private key generated using the Carmichael Totient.
bug: 67309725
test: No new failures. This code is part of unit tests only.
Change-Id: I492cf6bcff0ac2d1a838e7aa334c4b2b580ac5c7
Merge from Widevine repo of http://go/wvgerrit/42063
The dynamic adapter could not load old LoadKeys functions because the
spelling was wrong.
bug: 72646612
Change-Id: Ia6d917a17a95c48925496c5959ddb2bdff771241
* changes:
Fix some unit tests
Add basic handling for entitlement keys in a license.
Refactor key sessions to move them out of crypto session.
Fix entitlement keys encryption and content key loading.
Merge from Widevine repo of http://go/wvgerrit/42020
This CL fixes the OEMCrypto unit tests for refresh license.
Test: ran unit tests
bug: 64851667
bug: 72497813
Change-Id: Ice1661fd832793358b725be9016d85465f6b8d14
Merge from Widevine repo of http://go/wvgerrit/41834
Key rotation is not yet supported.
The key statuses are updated from a license. The
mechanism expects content keys tro come in a license.
For entitlement licenses, the content keys come in the
init_data.
This code does not yet support the key rotation event.
(A new pssh with wrapped keys is a passed to the cdm)
The policy engine/key status mechanism needs to be
updated to handle updated from the init_data.
For now, the cdm builds a license with a key container
with the content keys and used that to call
PolicyEngine::SetLicense to setup the policy engine
and key statuses.
Bug: 64003606
Bug: 70334840
Test: In child CL
Change-Id: Ibf46a18f5321cab4ff6f1778ba30527942c8021f