AesCtrDecryptor::decrypt() doesn't check whether the size of "key" is
equal to 16 bytes, which may lead to an OOB read problem in the context
of mediadrmserver. The fix is in clearkey plugin. Add tests to validate
the fix.
Test: VTS test
adb shell /data/nativetest/VtsHalDrmV1_0TargetTest/VtsHalDrmV1_0TargetTest
bug: 63982768
Merged-In: Ife2da17e7f39d8031bc36b83c3b27ba5e9d83eb7
Change-Id: Ife2da17e7f39d8031bc36b83c3b27ba5e9d83eb7
DRM cannot skip all tests when vendor modules are
not present. Currently even the clearkey tests are
skipping when there is no vendor lib. This can be
replicated by just pushing the DRM VTS test binary
build from master (or DR or MR) and executing the
binary without VTS. All test cases skip (including
clearkey).
This change prevents exiting when no vendor
modules are found.
Test: Push the test binary and confirm that the
clearkey tests run.
bug:64459011
Change-Id: Ic5f554d9b223d6ca4bf26f92f072254cc18f4620
This caused b/38343526 which is a chase list issue, reverting for now.
This reverts commit 4e1fe736af.
Change-Id: Ib9ffcd11e575e3f05f54cbea17fda2f2eb3780b5
DrmHalVendorFactoryTest.EmptyPluginUUIDNotSupported
was failing on 64 bit builds. The test was using
an uninitialized hidl_array as the empty UUID which
was incorrect. This change initializes the array
contents to null values.
Test: drm hal tests pass
bug: 37172151
Change-Id: I0acb86921f0daceba30fa7879980ce819db64a74
The DrmHalVendorPluginTest.RestoreKeysClosedSession test wasn't
taking into account the policy of the asset, so both streaming
and offline assets were included in the test which is incorrect.
Test: drm vts test passes
bug:37358379
Change-Id: I41116e77a1ae306bb1a484e3714360c8553590f0
Not all drm hal implmentations will be present on every device,
but the vendor modules will be. This change allows tests to be skipped
when a drm hal implementation isn't present.
Test: drm vts tests pass with widevine on a gms
device (tests executed) and tests pass on an aosp
device (tests skipped).
Change-Id: I0b87f501a45103960193279eb5b4b2cd1c113acd
Add a positive and two negative test cases for the restoreKeys
function in DRM vendor plugin.
Test: vts-tradefed run commandAndExit vts -m VtsHalDrmV1_0Target
--primary-abi-only --skip-all-system-status-check
Bug: 34178477
Change-Id: Ia7f323dbd92e7281efa96b9b7d07b85123e819f4
A session wasn't being closed in the ListenerKeysChange
test, that was causing erratic behavior on subsequent tests.
The expected return code was incorrect in the test
AttemptDecryptWithKeysRemoved.
bug:37272108
Change-Id: I11590b85c81548622359d91ebc9af75276a7b58c
Previously only the vendor service name was used
to get the drm and crypto services, which would work
either for binderized or passthrough devices, but not
both. With this change, the vendor service name is
tried first, and failing that the default passthrough
service is used.
Change-Id: I05e9552da992e8d9dbba0f8dde485406262410a9
related-to-bug:34178477
Test: drm vts test
The drm vts event listener tests would hang if event
callouts failed to work as expected. Use the vts test
callback template instead.
Change-Id: I5234f5760d90c1e884badc25cd251da27c2c672d
related-to-bug:34178477
Files relying on transitive include of utils/Log.h (and things that it
includes) from MQDescriptor.h
Test: pass
Merged-In: Iff316b21bef556bb026378b7f89e97ded3febef4
Change-Id: Iff316b21bef556bb026378b7f89e97ded3febef4
We are ready for devices to begin migrating to a 64-bit Legacy DRM
Loader. However, not all devices are ready to make this jump yet. A
device needs to have all of its Legacy DRM Plugins ready to run as
64-bit before it can do this. This includes having 64-bit hardware
integrations.
So that devices can turn on 64-bit support as they get ready, I am
adding flags that can be set in a device's device.mk file. There are two
parts:
* ENABLE_MEDIADRM_64 enables building the Legacy DRM Plugin HAL as
64-bit.
* Setting drm.64bit.enabled=true in PRODUCT_PROPERTY_OVERRIDES switches
the Legacy DRM Plugin HAL to searching for DRM Plugins in the 64-bit
directory.
Test: Validated that turning on these flags enables a 64-bit Legacy DRM
Plugin HAL that loads 64-bit Legacy DRM Plugins from the lib64
directory.
Bug: 36076017
Change-Id: I8d21fc7e7c0357eb6755839d41caa0f37ca20aff
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: I265590c7c18f425e44863df062a56b67519a932a
Should abort program if registerPassthroughServiceImplementation returns
something other than OK.
Test: Play Movies & TV in non-binderized mode.
bug: 34640335
Change-Id: I94be98e7ae66cdb777a7d182123c8692aef915b7
MediaCodecTest.android.media.cts.MediaCodecTest.testCryptoError
was failing due to incorrect error code translation introduced
by the drm hidl hal.
bug: 35137940
Change-Id: Ibd02425a55194f3cb0acc0e53f90b156023fb1ab
Not all drm schemes require provisioning. This change
updates the documentation to explicitly support it.
bug:36007160
Change-Id: Ia4dc471314d2cce92ce8d69258bf1d16d5104302
Legacy error codes need to be converted into new Status values before
being reported. Decryption errors (that were negative) were changed to
absolute values. This caused their translation to new Status values to
fail.
b/35634335
Test: Verified with GtsExoPlayerTestCases. Some failures, but those
are unrelated to this CL and will be addressed separately.
Change-Id: I995cac33cb2725d02b0f1a3922e522ce07a9d1be
The legacy plugin listener was not set when used in
passthrough mode in Treble. This caused events (session renewal,
key expired etc) not to be propagated to the app.
b/35375500
Test: In progress
Change-Id: I7d74b3320c82e22f67d3c804ee93f9b9791080b2