[ Merge of http://go/wvgerrit/25987 ]
Test: Added Cdm/WvCdmSessionSharingNoKeyTest to request_license_test.
Verified by wv unit and integration tests.
b/28182987
Change-Id: I9039bc1fca83e2c1044c3af2f47f31dc4fb5c910
[ Merge of http://go/wvgerrit/25983 ]
Earlier versions of android returned CryptoException with
error code ERROR_NO_KEY, when a decrypt call was received before keys were
loaded. Changes to O resulted in ERROR_SESSION_NOT_OPENED being returned
instead. This CL reverts the behaviour.
Also a change to correct CDM error code numbering in comments.
Test: Verified by unit and integration tests
b/37219830
Change-Id: I43758cd29cf9d1945f878ac352a5f26538b48cdb
[ Merge of http://go/wvgerrit/25643 ]
The MediaDrm#provideKeyResponse API states that an empty byte array is
returned when the license type is streaming or release but a non-empty
value was being returned in some cases.
The KeySetId is now returned when the license type is offline or when
the license is streaming and has a secure stop associated with it.
Test: Verified by request_license_test integration tests. Tests have been
modified to validate the returned Key Set Id values.
b/36093612
Change-Id: I82dba537c77ddd1d1876cbce58729f3db901ee51
To test restoreKeys, a content configuration with a
license policy allowing offline playaback was needed.
Test: drm vts test
bug:34178477
Change-Id: Ib90d7a878c0f310569abb09f21138c7a6ac9daae
The drm hidl hal specifies that operations on sessions that
are not opened return ERROR_DRM_SESSION_NOT_OPENED. This
change adds that translation, previously they were mapped
to unknown error.
Test: drm vts test
bug:34178477
Change-Id: I3777dd90eea7061f3fa5413a5732d7d58b85b49b
[ Merge of http://go/wvgerrit/25781 ]
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.
Test: Verified by WV unit+integration tests.
Verified by WidevineDashPolicyTests
Verified by WidevineDashPolicyTests#testL3SoftwareSecureDecoderRequired,
testL3HardwareSecureCryptoRequired, testL3HardwareSecureDecodeRequired,
testL3SecureVideoPathRequired.
b/31913737
b/31913439
Change-Id: Ibfc7f3dd6fc7264e8cf9b0d33f6f8d619eed6c00
Add a check for invalid session size in restoreKeys
and correct the return code when attempting to create a
plugin with an invalid uuid. Also correct the return code
when attempting to decrypt after keys have been removed.
bug:37172151
Change-Id: I7e832ffe04081471a0cdb3a9329808f47f12cfc3
[ Merge of http://go/wvgerrit/25721 ]
Return CryptoException with errorCode ERROR_NO_KEY when an attempt is made
to make use of a license whose start time is in the future.
Test: Verified by WidevineDashPolicyTests#testL1LicenseStart2030
b/31914841
Change-Id: I2a157c227550a2391b6536365f34f1dfec3dea0c
Merge from Widevine repo of http://go/wvgerrit/25662
OEMCrypto v13 is required for OC MR1, and is not needed for OC. This
CL disables the unit tests MinVersionNumber13 for OC. This CL should
not be merged to master.
b/36866361
Test: all unit tests pass on sailfish.
Change-Id: I04d7b468ac9479257c25519acb6ac13204acabd5
(This is a merge of wvgerrit/25422)
OEMCrypto_ERROR_KEY_EXPIRED was not always being reported to the higher
layers as a NEED_KEY error, which could cause inconsistent error
handling.
Bug: 28294273
Test: Unit tests
Change-Id: Idf5642ea0f0ba915bc1f53025a1f14691d142aed
Part of VTS test suite validation for
the binderized Widevine service
Test: Drm VTS test
bug:32815560
Change-Id: I0913c0e72487b5fdbf579b9ea3409c13264888fd
Update the vts vendor module to
return the service name instead of the
default passthrough service name to
support binderized mode.
Part of VTS test suite validation for
the binderized Widevine service
Test: drm vts test
Change-Id: I04c9fa6f66af43db6c405ecc8d714b712d87a45a
related-to-bug:34178477
hidl_string no longer will provide an implicit cast to const char* as it
interfers with other expected behaviors of the class. It now emulated
std::string in requiring a call to .c_str() to get the same behavior.
Bug: 36532780
Test: Build the tree
Change-Id: I2ce4354619a99d7c5ae8b39762d5506891ccd1ed
Replace AString, KeyedVector, List, String8 and Vector
with stl containers. Remove corresponding frameworks
libraries.
Test: Play Movies & TV (streaming and pinning)
Test: Netflix
Test: unit tests
bug: 34677927
Change-Id: I125f45054987d69bbca59c1ffdcbe8add38c3c13
Build libvtswidevine module relative to the directory
drm-vts-test-libs.
Test: make vts; libvtswidevine.so is in correct place.
Bug: 36889176
Bug: 36817233
Change-Id: Iadb5bd6e71a1a7c99a69feff2ecb7bded90af24d
This commit changes the unit tests and HAL Service to run as 64-bit on
devices that have enabled 64-bit DRM Plugins.
Bug: 36076017
Test: Turned on the flag for a device and used the file command to
verify that all binaries were built as 64-bit.
Test: Turned the flag back off and verified that all binaries were built
as 32-bit. This should affect no current devices.
Change-Id: Ieb7218f15b9359f2038a6f60b8c994b16d2b5b53
This module is used with the drm VTS tests as part of HIDL/HAL
testing. For background reference:
hardware/interfaces/drm/1.0/vts/doc/Drm_Vendor_Modules_v1.pdf
Change-Id: I38eb13696343e08fa2a1758219350d25698bfb7d
related-to-bug: 32815560
(This is a merge of wvgerrit/24922)
This contains several fixes and improvements to the
build_and_run_all_unit_tests.sh and run_all_unit_tests.sh scripts:
* All tests are now identified as vendor binaries and thus are stored in
the /vendor/bin/ directory instead of /system/bin/. Previously, some
tests had moved to /vendor/bin/ but the scripts had not been updated,
causing these tests to fail to run.
* The -j parameter can now be passed to build_and_run_all_unit_tests.sh,
for those who want to speed up their build by using multiple cores.
* The 64-bit library directories are now added to the library search
path, in anticipation of devices with 64-bit DRM Plugins.
* Checking for Verity protection is now done in
build_and_run_all_unit_tests.sh (which is the script that actually
modifies the file system) instead of just in run_all_unit_tests.sh.
* The library search path is no longer set unnecessarily for
libwvdrmengine_hidl_test.
* The Treble-only tests and non-Treble-only tests now only run on
devices that meet their respective criteria.
Bug: 36071236
Test: Ran build_and_run_all_unit_tests.sh
Change-Id: Iea236880c4445858111c801dfa278a528bca0f6c
Merge from go/wvgerrit/24882:
The result of crypto_session.GetApiVersion is misinterpreted.
Test: ANDROID_BUILD_TOP= -gts/tools/gts-tradefed run gts
-m GtsMediaTestCases --test com.google.android.media.gts.
MediaDrmTest#testOemCryptoVersion
Test: ANDROID_BUILD_TOP= -gts/tools/gts-tradefed run gts
-m GtsMediaTestCases --test com.google.android.media.gts.
MediaDrmTest
bug: 36728950
Change-Id: I72a05608f778fa81689013d3b231010b71329ea1
Widevine HAL is not part of framework/system image and thus it is not
permitted to use Binder. Binder-like mechanisms which are permitted are
HwBinder or VendorBinder (for communications only with vendor image
components).
Remove references to MediaAnalyticsItems used by ami_adapter.*.
Test: Play Movies & TV (streaming and pinned content)
Test: Netflix
Test: Widevine unit tests
bug: 36576915
Change-Id: I786f206c01d7c5ebfce719f3f51f5f7927f0359e
Merge from Widevine repo of http://go/wvgerrit/24863
The oemcrypto unit tests GenericKeyDecryptSameBuffer and
GenericKeyDecryptSameBuffer require features in oemcrypto v12, so they
should not be run on devices that report oemcrypto v11 or earlier.
b/36071236
Test: Unit tests run on Ryu and Bullhead.
Change-Id: Ia6645559ed98cae8d9807a14d6f0e514c5c4c615
(This is a merge of http://go/wvgerrit/24738)
The change to enable 64-bit as a possible target for Widevine Android
made all the unit tests build as 64-bit on compatible platforms. Since
none of these devices support 64-bit properly yet, this is a mistake.
This patch restores unit test builds to being 32-bit only for now.
In the future, when the switch for 64-bit-supporting devices is added,
it will also switch the unit tests to 64-bit mode.
Bug: 36071236
Test: Verified unit test format with "file" command.
Change-Id: Ib4d3678181f3221b85fe6409f1d842dd15af3daa