(This is a merge of http://go/wvgerrit/14630)
To create a better flow when an application sets a service certificate
manually, we will now validate the certificate when it is given to us,
and if it is invalid, we will not allow the property to be set.
Bug: 21307186
Change-Id: If980ad075604223fc962a859fae93e98d86a7f4f
(This is a merge of http://go/wvgerrit/14531)
As an optimization, the Media Server now unloads our library when not
in use. This has exposed a bug by which we were never deleting the CDM
singleton. Fix is to make WvContentDecryptionModule an Android smart
pointer ref base and then make sure all the plugins store a strong
pointer to it. The singleton is a weak pointer, so when the last
plugin is cleaned up, the CDM will be as well. And on the off chance
that the library isn't immediately unloaded, the singleton code will
generate a new CDM next time one is needed.
Bug: 21153732
Change-Id: Ifaf02fa9afe0a70a8b53e8b92ee0a3d1359ca001
The drm resource manager expects openSession to fail
with ERROR_DRM_RESOURCE_BUSY, but in some cases the
WV DRM plugin is returning a vendor-specific code
kErrorTooManySessions instead. This change updates
the error code mapping to match what the resource
manager expects.
Merge of http://go/wvgerrit/14564 from widevine repo
bug: 21640598
Change-Id: I0b296ff5eeef8a6b94cfe0fd450b15f15cf03eab
(This is a merge of http://go/wvgerrit/14390)
Expands usage of the ToVector() helper that kqyang@ wrote across the
entire DRM Plugin.
Bug: 20037441
Change-Id: I55112245af6fdf21ea3d3db87b1564af2f54929d
[ Merge of http://go/wvgerrit/14404 ]
Closing a non-existant (already closed) session results in an exception
being thrown though mediaDrm. The mediaDrm plugin will now ignore
errors when called though MediaDrm.closeSession.
b/21122725
Change-Id: Ib1c48ade4bdb131195ee56ce2af32bf0cd2166da
The external/gmock project does not include the patches needed for
widevine, so renaming the internal copy allows both to coexist in the
build system.
Change-Id: I77c956db30921afffe31d11e1cd2d99541925f35
[ Merge from go/wvgerrit/14286 ]
CDM now reports status information associated with the specified security level.
Earlier information would be reported from the default security level.
b/18709693
Change-Id: I7a01e8ea9773b56951c207437ce85e567fd32b09
(This is a merge of http://go/wvgerrit/14242)
To try to fix b/17761616, I added a lock to the DRM Plugin. However,
the API guarantees that any single DrmPlugin will never be called into
from multiple threads at the same time, rendering this unnecessary.
Previously, b/18194977 meant that this was not always true, but now
that that bug is fixed, this lock is not needed and can be removed.
Bug: 18194977
Change-Id: I25ee5fa44f35706f863b036997453441eac29c95
(This is a merge of http://go/wvgerrit/14156)
This was Google-cased, not Android-cased like the rest of the file
it's in.
Change-Id: I79ecf490212428de9a668d49d6feca678379f3ae
Merge from widevine of go://wvgerrit/14173
This CL updates the android makefiles to use the libcrypto_static.
Change-Id: I74567ff880ebdce366766a9ab44c92cc9540b8db
(This is a merge of http://go/wvgerrit/14051)
Adds support for passing a special provisioning response ("delete")
to the provisioning API in order to unprovision the current origin.
Note that the origin MUST be set or else this will fail.
The existing, system-only unprovisionDevice() method is unaffected.
Bug: 12247651
Change-Id: I16d296397d8e9e73c8f43e36c86838873318a398
This is a merge of several Widevine-side commits that, cumulatively,
allow callers to specify an origin to be used to isolate data storage
as specified in the W3C Encrypted Media Extension specification.
Separate origins have separate certificates, and consequently cannot
share device identifiers with each other.
The changes included in this are:
Add Ability to Check for Existing Certificates
http://go/wvgerrit/13974
Add Ability to Remove the Certificate
http://go/wvgerrit/13975
Make CDM Origin-Aware
http://go/wvgerrit/13977
Add Per-Origin Storage to Widevine CDM on Android
http://go/wvgerrit/14026
Remove Automatic Origin Generation
http://go/wvgerrit/14031
Bug: 19771858
Change-Id: I6a01c705d9b6b4887a9c7e6ff4399a125f781569
(This is a merge of http://go/wvgerrit/13973)
The app ID was write-only because no getter was ever written.
Change-Id: Ie5e383ee3a2dcf2843a6671becb6ff1f88e97d24
Also removes OnSessionExpiration which is no longer needed with
OnSessionKeysChange.
Bug: 19771612
Bug: 19771431
Merged from Widevine CDM repo:
https://widevine-internal-review.googlesource.com/#/c/13951/
Change-Id: I0603e808e8d50ff7bb1fb1d5e44fabd8d268ee8a
Also pass session_id and event_listener to PolicyEngine to make it easier
to dispatch events from PolicyEngine.
Bug: 19771437
Merged from Widevine CDM repo:
https://widevine-internal-review.googlesource.com/#/c/13816/
Change-Id: I5723cb371cb3c43c945051af3402b09069ba5859
This CL allows the framework CLs to compile. The stubs need to
be implemented properly in the DRM plugin and CDM.
bug: 19771299
Change-Id: I9e4b107370a4d73851ee28bcb9ab6087fdffeb13
This is a cherry pick of http://go/wvgerrit/13665
Added a few static casts and removed some unused parameters.
Change-Id: I4f2d1c26580a188de429defc8d1d22757f4c6917
(This contains a merge of http://go/wvgerrit/13382 from the Widevine
repository.)
This undoes the previous change to silence harmless C++11 narrowing
warnings and instead changes the code to no longer trigger them. The
fix was to delcare the type of our PSSH prefix constant to be uint8_t*
and then convert it to char* at usage-time rather than defining the
not-technically-char* data as a char* to start.
Change-Id: I68ff8c3ed0859096863b49c61cd60ae8461b5b29
(This is a merge of http://go/wvgerrit/10674 from the Widevine CDM
repository.)
Now that the CE CDM has CloseSession to handle closing sessions, we
can rename CancelKeyRequest on the CDM Engine & CDM Session to better
resemble its purpose and the name it is known by on Android.
Change-Id: I68d55b3be733579e5875ab33d8e94a62fe1f651d
* Replace an stlport static assert with a C++11 static_assert.
* Move some libraries that were being built with the NDK but
statically included into platform code off the NDK.
* Rebuild the obfuscated binaries to use the new STL.
* Remove MIPS support temporarily due to an inability to generate
obfuscated binaries for it. (To be fixed in b/19482469.)
Bug: 15193147
Change-Id: Icc166583b0c6af68550baf17ab8c33076a1179d3
This project is still using stlport (without telling the build system
about it), which was causing (broken) stlport headers to override
libc++ headers, leading to a broken copy of std::enable_if, which in
turn caused <atomic> to fail to compile. Since this project has
prebuilts that will need to be updated before this project can
actually move away from stlport, tell the build system that it is
still using stlport for now.
Bug: 18433002
Change-Id: I38b356428977ed2184eb28a07bd5e7424a4ace8d
(This is a merge of
https://widevine-internal-review.googlesource.com/#/c/11405
from the Widevine CDM Repo.)
AUPT is revealing a crash when destructing WVDrmPlugin due to
multi-threaded contention over the session map. As a fix, we are now
protecting access to the map via a mutex.
Bug: 17761616
Change-Id: Iddeca657effd3c7f3ff35ce334d7979291667cef
When falling back to L3, release requests were failing. Information
requesting falling back to L3 is passed along when the session is opened.
Licenses however are released using the key set ID and information
requesting fallback to L3(CdmClientPropertySet) at that point is
unavailable. The release was actually attempting to release a license
at the default security level which is incorrect.
In addition, the mac keys were not being setup correctly and the release
message was signed with keys derived from the license request and not the
response. Both these issues have been addressed and unit tests added
to track release of offline licenses and usage reporting scenarios.
[ Merge of https://widevine-internal-review.googlesource.com/#/c/11062
from wv cdm repo ]
b/17073910
Change-Id: I5cd95a7dfe58ebae7ae27ece6c92e67755c1d665