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
Merge from widevine repo of http://go/wvgerrit/14550
This CL adds several tests with different sized key ids to
oemcrypto_test.
bug: 21643096
Change-Id: I62a89c557f3f746f09ee5a2fe5bdd3ca821448e4
Merge from widevine repo of http://go/wvgerrit/14502
If any OEMCrypto session call is made after Terminate is called, then
there was a null pointer access. This is protected by the oemcrypto
adapter, but could still be a problem in unit tests which by-pass the
adapter.
bug: 21642892
Level 3 versions:
level3/arm/libwvlevel3.a Level3 Library May 29 2015 14:03:11
level3/x86/libwvlevel3.a Level3 Library May 29 2015 14:03:12
Change-Id: I84fd098c2faea71a79bc21658485593e22a8e994
(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 from widevine side of http://go/wvgerrit/14462
This cleans up some tests in oemcrypto_test.cpp so that they use
vectors instead of arrays. The two reasons this is needed are that
arrays are more likely to use up stack space, and that arrays on the
stack are not initialized.
The lack of initialization caused some negative tests to fail because
buffers that were reused from unencrypted data still contained values
that the test expected not to be there.
Change-Id: Ic1705b6bc581084a9fe3cd573adf34d8219a1a45
Merge from widevine repo of http://go/wvgerrit/14321
It is expected that OEMCrypto will only be given subsamples with a
block offset when there are multiple subsamples, so that the entire
sample may be decrypted after all calls are made. This CL modifies
the existing tests so that the result of DecryptCTR is only checked
after all subsamples have been decrypted.
Also, the QueryKeyControl test has been modified so that failure does
not require a specific error code.
bug: 20757848
bug: 21063276
Change-Id: Ie2b12b287b0c9c661cd14111b2ae9eab004cd8b8
[ Merge of http://go/wvgerrit/14480 ]
Server upgrades have been completed and allow these tests to run successfully
against UAT. They were earlier tested against staging.
b/21479112
Change-Id: Ifc5e5780fa5305c6ddfd662ada204db599cb5c6e
Also handle ResourceBusyException
merge of http://go/wvgerrit/14470 from widevine repo
bug: 21172957
Change-Id: I6815786eb7a678725cf2632f1009c7f566ba7499
[ Merge of http://go/wvgerrit/14410 ]
When specifying a service certificate though mediaDrm, the CDM earlier expected
serialized service certificates rather than signed ones.
b/21334970
Change-Id: I39af2aa25e8dc2a651cbdce84eb32f266b5b3382
Also fix a missing change for
"playback duration should override license duration".
Merged from Widevine CDM repo:
https://widevine-internal-review.googlesource.com/#/c/14435/
Bug: 21393975
Change-Id: Ibfcf3ae4c13db8944ea285bcc79b6312ea621e1b
[ 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
Merge from widevine repo of http://go/wvgerrit/14370
In order to run on android, we need the mock to compile with
BoringSSL, which uses a different function call for
RSA_padding_add_PKCS1_PSS.
Change-Id: I9cad4e7d5c1d4a3117fe7c0fc1e27590809a7ac3
Merge from widevine of http://go/wvgerrit/14361
In oemcrypto_test, we look at some control duration and control
bits. These are stored in network byte order. However, it is easier
to read error messages if they are converted to host byte order before
printing them.
Change-Id: I116b5f43957351b0e40e05331c282c248128903c
[ Merge of go/wvgerrit/14360 ]
If within playback window, do not expire license on expiry of rental or
license duration. In this case playback duration will extend the license.
b/17791094
Change-Id: I26d255aa8f0287bd583ebdeec991c613d49d8f22
[ 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
[ Merge of go/wvgerrit/14240 ]
Client information is reported in release and renewal messages based on
flag in the license. License proto has been updated to match server updates.
There are two caveats
* Client IDs will be reported unencrypted when usage reports are requested.
* Release requests that enable privacy mode (encrypted client IDs) but do not
specify a service certificate are not supported.
b/19247020
Change-Id: I95e709922122370f310936fbad3d312262128e49
Merge from widevine of http://go/wvgerrit/14263
The unit test PreventNonceFlood3 opens 8 sessions and floods the nonce
table. It then opens one more session after a pause to verify that it
can still request nonces. However, there is no requirement that we
can open more than 8 sessions. This CL reuses one of the already open
sessions to verify that we can continue generating nonces.
Change-Id: If35f146477bd21e381ec5375dde7ec7fdbe8f366
This is a merge from the widevine repo of http://go/wvgerrit/14262
This CL replaces AES with a psuedorandom number generator to encrypt
the needles in the oemcyrpto level 3 haystack. This speeds up the
overhead significantly, and reduces decrypt times by as much as 75%
for small buffers (1-3 kb). This makes the obfuscation slightly less
secure but is worth the overall performance boost.
Level 3 library versions:
level3/arm/libwvlevel3.a Level3 Library May 1 2015 15:45:12
level3/x86/libwvlevel3.a Level3 Library May 1 2015 15:45:55
b/19582757 L3 Widevine extremely choppy on Nexus 6 (480p)
Change-Id: I3077c04047a7f2da6f64869d7a9af5ddcc62671f
Merge from widevine repo of http://wvgerrit/14219
This updates the integration guide to include a definition of the
keybox. Previously, there was a broken link in the description of
IsKeyboxValid.
This CL also updates the android supplement to describe how to request
a keybox. I just copied the information from the legacy integration
guide.
Change-Id: I486a3ccad9889a732a9c1374c40b793deb249459
(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
Merge from widevine repo of http://go/wvgerrit/14218
If GTEST_FILTER was not set, it defaults to "" which matches no
tests. This CL changes it to "*" if it was "".
Also, quotes are added around the environment variable and command so
that it multiple variables can be set.
Change-Id: Icad9a1fbca2d1b436f6e37a2a080a70a384f0a1d
(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
Merge from widevine of http://go/wvgerrit/14134
This CL adjusts the nonce flood test so that the timing is more
explicit. Also, if the test fails, the error message should tell us
exactly how many nonces were generated and the duration of the test.
Thus we'll be able to tell if the test almost passed.
b/19081206
Change-Id: I2c59755466b017910b86f6b02f2883a771d0ccb7
Merge from widevine repo of http://go/wvgerrit/14125
This copies code from http://go/wvgerrit/13847 to the oemcrypto unit
tests. It puts the test name in the log file.
I also commented out some unused function parameters to avoid compiler
warnings.
Change-Id: I3ba259de2f408ec60e90db7f0ea1524d5aa8f8a4
The errors in the range ERROR_DRM_VENDOR_MIN to ERROR_DRM_VENDOR_MAX are
reflected in the message that is reported to the app, which is
MediaDrmStateException.getDiagnosticInfo().
Many errors map to kErrorCDMGeneric, especially KEY_ERROR is used as a
generic error in CDM. This fix defines more specific error codes in the
CDM for places where KEY_ERROR is returned.
Merge from http://go/wvgerrit/14071
bug: 19244061
Change-Id: I688bf32828f997000fea041dd29567dde18ac677
[Merge of https://widevine-internal-review.googlesource.com/#/c/14110/ from
widevine cdm repo]
Backward compatibility handling was causing L3 usage and clock information
to be moved. This caused nonce and other failures when attempting to restore
offline keys.
b/20025990
Change-Id: I6e0fa1030bcce1a5bdd811a9064989d3b6ce2f04
Implements the optional setMediaDrmSession() method. To enble this,
support was added to the core to report if a session ID is valid.
As a consequence of this, in the tests for the CryptoPlugin,
construction of the plugin must be deferred until all gMock
expectations are set, as construction now calls into the CDM core.
This is a merge of two changes from the Widevine CDM repo:
http://go/wvgerrit/14083
Allow Setting of Session ID
http://go/wvgerrit/14085
Check If Session ID Is Valid When Changing CryptoPlugin IDs
Bug: 19570317
Change-Id: I7dbd777ce6efebd71fdb5e602663a0e35a48a9c4
(This is a merge of http://go/wvgerrit/14082)
Previously, the CryptoFactory had special behavior to defer creation
to Widevine Classic if no session ID was provided. This functionality
has been deprecated, as MediaCodec Mode is no longer supported.
This is necessary as part of supporting the new API for session ID
changes because the expectation is that it is now legal to initialize
a modular CryptoPlugin without a session ID.
Bug: 19570317
Change-Id: Iad0cd01b6a8d2e66c94c5f53a8a60f5787bc02f8