A change was introduced between jb-mr2 and klp-dev that closed
the CDM session when the removeKeys mediaDrm APIs was called.
This was introduced because there is no way of unloading keys from
an OEMCrypto session.
This caused problems for Netflix, as an exception occurred when they
tried to close a session after calling removeKeys.
Reverting to jb-mr2 behaviour for now. b/11188818 has been opened to
track a longer term resolution.
b/11185042
Change-Id: I03bc736d2bc5bdabc86cfb7b75ae8bcbc03ffc7c
Decryption calls though multiple threads may result in race conditions
between the setting of the key and the actual call to decryption.
This results in OEMCrypto errors when the buffer type used in
decryption did not match the key selected. This is addressed by
having the the two calls be in the same critical section.
b/11009857
Change-Id: I74f1a0689ca17114f3cdd029022013b05c415acd
Merge of change https://widevine-internal-review.googlesource.com/7950.
In the OEMCrypto library, it is valid to call LoadKeys with an empty
mac key. The library should not update the mac and enc keys and
should not throw an error.
Since we have seen this behavior in several implementations, a unit
test should be added that verifies the correct behavior.
bug: 11032674
Change-Id: I011ba39c8abc47547226a722143e92dac3f63dc5
This updates the Widevine Classic libraries to version 4.5.0.10107.
This version backports the bugfix for the IPv6 issue from JB-MR2.
Also, the Widevine build system has been updated to support all six
flavors. (2 security levels x 3 instruction sets)
This change adds x86 L1 binaries and MIPS L3 binaries, as these have
been validated by partners.
Bug: 10246711
Change-Id: Ic0cf32ffd82fc8dacced84cecdee059afa1049ca
Molly reports OEMCrypto errors when Device RSA private key is
loaded a second time in the same session. This occurs in privacy
mode when a service certificate is request and later a key request is
generated.
bug: 10815492
Merge of https://widevine-internal-review.googlesource.com/#/c/7823/
from Widevine cdm repo
Change-Id: I98999fb0e77597109b68c379eaaa4838d3f6dde4
Swallows the error NEED_KEY if it comes back from AddKey(), as this
is expected behavior. (It means privacy mode is on and the key that
was just added was the privacy certificate, ergo the real decryption
key is still absent.) Note that this carefully does not squelch the
notification that comes from NEED_KEY, which is still necessary in
order for the app to make a second key request.
Also streamlines a test case that I noticed was overcomplicated for
what it did while poaching code from it for new test cases.
Also removes a .gyp file that was erroneously being copied to the
Android tree. Android does not use GYP.
Bug: 10495563
Change-Id: Ife3ff0270a0d09dac1b0eb0d84bddffd811e1eef
A staging Root CA public key was used in earlier releases to verify
service certificates. These were in turn used to encrypt the
client identification. This met our needs for an end-to-end verification.
Now that the production Root CA and service certs are available
this change replaces staging certs with production ones.
Merge of https://widevine-internal-review.googlesource.com/#/c/7560/ from
the widevine CDM repo
b/10329328
Change-Id: Id02649201d9a8ba4d08acc4166503341a5bbdd23
In order to run all disabled OEMCrypto unit tests with one gtest
filter, one of them needs to be renamed so it matches the others.
These tests are disabled by default because they install a test
keybox, which would be dangerous on a production device.
Merged from CDM change
https://widevine-internal-review.googlesource.com/7440
bug: 10508973
Change-Id: I9508b133c6500ec28ce8890a4af89f016344b842
1. add missing checks to set the overall result when some tests fail
(to verify b/10528466)
2. Fix test result on L1 devices where we can't hash the decrypt result
due to inaccessible memory buffers.
3. Configure the codec with a surface to avoid codec errors on L1 devices
b/10528466
Merge of https://widevine-internal-review.googlesource.com/#/c/7510/
from the widevine CDM repo
Change-Id: I5c7ef5ce802cc4ff63f62524ef2120fb671920f4
This CL turns off the verbose logging if LOG_NDEBUG is 1, or if NDEBUG
is defined. You can set the environment variable LOG_NDEBUG to 0 to
turn on verbose debugging for the CDM library on android.
Also, as in b/9672657, some applications call SelectKey when switching
between video and audio, which is much too verbose and affects
playback. I have removed the log statements for SelectKey.
bug: 9672657
Change-Id: I635b997118996871356f7126852b4744fb05e810
This updates the Widevine Classic libraries to version 4.5.0.10107.
This version has identical functionality to the previous version,
however the version number has changed because the Widevine build
system has been updated to support all six flavors. (2 security
levels x 3 instruction sets)
This change adds x86 L1 binaries and MIPS L3 binaries, as these have
been validated by partners.
Bug: 10246711
Change-Id: Ie14e48aec33b0cc5d63752e24ba88284c6e37aa9
Certificates and offline licenses are stored in security level
specific directories in klp. When devices transition from jb-mr2,
their persistent information has to be ported to these directories.
bug:10366036
Merge of https://widevine-internal-review.googlesource.com/#/c/7310/
from the widevine CDM repo
Change-Id: I70b4a79dc5b69bda7fc3a4b92fdcde7ef8b41836
Adds support and tests for the new isContentTypeSupported API to the
Widevine DrmEngine.
Bug: 10244066
Merge of https://widevine-internal-review.googlesource.com/#/c/7321/
from the Widevine CDM repo.
Change-Id: I4f606de7897a49da745ff76faceeb358f8ac9073
This merges the following changes from the Widevine CDM repository:
da001b6 Add Privacy mode and service certificate
This adds support to the CDM for privacy mode and service certificates.
92bf200 Add support for using Youtube Content Protection server for testing
Enables testing with Youtube Content Protection server. Google Play license
server is still the default. Select YTCP server by using the flag -icp
e.g. adb shell '/system/bin/request_license_test -icp'
85dcd60 Fixes to enable privacy mode
These includes changes to use PKCS7 padding, corrected root CA formatting
and changes to integration test. Also refactored service certificate
handling.
989971c Correction to request license test
Corrected PropertySetTest to provision when needed. Also added disabled
privacy tests to run against YTCP staging server until GooglePlay
integration is complete.
Bug: 10109249
Change-Id: If81d68c65d743d77a485406f48d1be41a74de0af
This merges the following changes from the Widevine CDM repository:
564f4cc Add CdmClientPropertySet to CDM
Adds an interface to the CDM that allows it to query its client for
certain properties. In this case, this includes the ability to
specify what security level is desired, as well as support for
service ceritifcate privacy mode.
9cfbd3e Force Level 3 fallback
Adds support for voluntarily invoking L3 crypto to the OEMCrypto
wrapper.
95d12c1 Add pointer to CdmClientPropertySet class to OpenSession.
Adds support for storing the property set on a session-by-session
basis and choosing the appropriate crypto level.
17de442 Add Settable Properties for Clank to Android
Adds support for setting the aforementioned properties to the
DrmEngine
bbe704d Fixes to force fallback to level three security
Corrections to invoke provisioning, OEMCrypto API with configured
security level rather than the default. Unit tests were also revised.
Note that some parts of this are also support for the ability to use
a service certificate-based privacy mode. The remaining code for
supporting this mode is still forthcoming.
Bug: 10109249
Change-Id: I2755e4dea1de3e8a56cff237360298f7b7f1bddc
Merges change 267713c (Remove stale licenses on reprovisioning) from
the Widevine CDM repository. This change removes licenses belonging
to the previous provisioning when provisioning changes.
Bug: 9761923
Change-Id: I473816dd11dd950f4fb009b5b004630bd2d2b579
This merges change 43c7fda (Do Not Obscure wvcdm::NEED_KEY) from the
Widevine repository. After this change, decrypt calls will return
ERROR_DRM_NO_LICENSE if the CDM returns NEED_KEY.
Bug: 10157154
Change-Id: I97b3a3990abeebb620ee4925fabf5c4261d968c4
This merges the following changes from the Widevine CDM repository:
bef58bc Add new error codes
Adds new error codes to OEMCryptoCENC.h and rearranges it to more
closely match the documentation.
5fcfbca Handle OEMCrypto_ERROR_INSUFFICIENT_RESOURCES on Decrypt
Changes the CDM to support the new errors from the previous change.
d59c09d Report Insufficient Crypto Resources
Changes the DrmEngine to support the new errors from the previous
change.
1085a21 Respond to Too Many Keys or Sessions Errors
Allows errors around having too many keys or sessions to result in
a unique error in the CDM.
Bug: 9695816
Change-Id: I826bc655109fa57e4f75de7158d7f392053666b1
This merges the following changes from the Widevine CDM repository:
1a72a7e Combine utility code into single library on Android
Combines several previously-separate files into a static library,
libcdm_utils, so that it can easily be used by both CDM and
OEMCrypto.
8c4d04d Install Keybox
If the keybox has not been installed, install it from
/factory/wv.keys.
Bug: 9972451
Change-Id: I8688ecd0adcf321e0c7d0faf55dd10f3910c12ec
Android development of the widevine CDM has been done
on the jb-mr2 branch of the cdm code base. This CL
contains a merge of that jb-mr2 work to CDM master, and
also reflects the evolution of the common Modular DRM
code base since jb-mr2 branched.
Change-Id: I1d7e1a12d092c00044a4298261146cb97808d4ef
Make getBufferPercentage() and getPosition() work when the
media is reset.
Change-Id: I7d696fd9b5c62b42aa0d29348e73f1f5755eb075
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 9516405
When stopping media, getBufferPercentage() and getPosition() may
still be called by MediaController, unless we disable it.
Change-Id: I947fbfb2de724bdcb3121ca9fb204c8bea2a84b2
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 9516405