Merge from Widevine repo of http://go/wvgerrit/26940
b/38014227
b/38016711
Test: built sdk_phone_mips
Change-Id: Ibcdbf49f96e976f51c38db25a944268a86a1671e
Merge from Widevine repo of http://go/wvgerrit/26880
and http://go/wvgerrit/26062
Deliver oem_certificate_generator
b/37996004
Testing: Tool delivery only
Change-Id: Id95bd3cdd7cf5b48d225624747ab1f8499e4f438
Merge from Widevine repo of http://go/wvgerrit/26780
and http://go/wvgerrit/26740
Previously, in oemcrypto level 3, a session's current key's duration
was not updated until the next call to SelectKey. This caused
problems with license that only used one key. This CL fixes that.
arm64/libwvlevel3.a Level3 Library 7283 May 2 2017 13:16:21
arm/libwvlevel3.a Level3 Library 4445 May 2 2017 11:49:34
x86_64/libwvlevel3.a Level3 Library 7284 May 2 2017 12:09:21
x86/libwvlevel3.a Level3 Library 4464 May 2 2017 11:53:46
Test: unit tests run on emulator.
b/37481239
b/37523523
Change-Id: Ife90a3358b6620c8fb81324ec2331d3775a38191
android.hidl.base@1.0 and android.hidlmanager@1.0 are built into libhidltransport.
Test: links
Bug: 33276472
Change-Id: Id9053e4484275e3404f31a72d2037884ff6bef5b
(cherry picked from commit 80ec937545)
Merge from Widevine repo of http://go/wvgerrit/26560
With this CL, the modifiable oemcrypto mock will only update the SRM
version number if the new number is greater than or equal to the
current one.
b/37744957
Change-Id: I10721146ca0ce24b1087657e18569a434e5d53b8
Merge from Widevine repo of http://go/wvgerrit/26522
The modifiable OEMCrypto mock did not use the correct initial SRM
version as specified in the options file. This CL fixes that.
b/37713658
Change-Id: I5ab5f5549dd7815edd4a3d69b804440faedeb657
android.hidl.base@1.0 and android.hidlmanager@1.0 are built into libhidltransport.
Test: links
Bug: 33276472
Change-Id: Id9053e4484275e3404f31a72d2037884ff6bef5b
Merge from Widevine repo of http://go/wvgerrit/26521
This CL adds some missing logging when TraceOEMCryptoCalls is set.
Several SRM functions were not properly logged.
It also changes SelectKey from the TraceOEMCryptoCalls flag to the
TraceDecryptCalls. This reduces flooding the logs when content is
actually playing.
b/37751139
Change-Id: Ie92379dc295c83d8ec9bacb2445b1ef47377e4cf
Merge from Widevine repo of http://go/wvgerrit/24730
This CL adds SRM functionality to the modable version of oemcrypto
mock. This can be used for end-to-end testing.
b/28955873
b/37353534
Change-Id: I2c6f513495ccfd42f7a3d7a3449db6f810563c04
Merge from Widevine repo of http://go/wvgerrit/24729
This CL adds a new variant of the OEMCrypto mock code that adjusts its
behaviour based on a configuration file. This is intended for
testing.
For example, a tester can set current_hdcp to 2 in the options.txt
file, push it to the device, and verify that a license is granted for
HDCP 2.0. Then the tester can edit the value of current_hdcp to 1 and
push the file to the device. Playback should stop because the license
is no longer valid.
This variant uses a real level 1 liboemcrypto.so to push data to a
secure buffer. That means we can test playback for a license that
requires secure buffers on an Android device with real secure buffers.
b/35141278
b/37353534
Change-Id: Id12f2800c6395d9da7cffebd6797aac17414b38d
Merge from Widevine repo of http://go/wvgerrit/24728
We use compiler options to set different properties in the oemcrypto
mock. With this CL, we define a base class that has default
properties. All other variants need only define the properties that
they change.
b/35141278
b/37353534
Change-Id: Id38ec5bf35dcd83cea9a066ebe201e6da7c1a2b0
Merge from Widevine repo of http://go/wvgerrit/24727
This separates out the logging of decrypt calls from all other calls.
This is useful because we sometimes want to trace all the calls in a
license request, but we don't want logging of decrypt calls which
would slow down playback.
b/37353534
b/35141278
Change-Id: I3f172c02778d86e66d0e1f90344a34c4d3b15a9e
Merge from Widevine repo of http://go/wvgerrit/26202
This is a workaround to fix a broken mips build.
Test: Built for sdk_phone_mips.
b/37523523
Change-Id: I56ce65919303113f712d422d33e335b594292d42
[ Merge of http://go/wvgerrit/26201 ]
Race conditions arose when a session was closed while data was
still queued for decryption in MediaCodec buffers. If a session
is closed while data is still queued for decryption, subsequent
decryption requests will be rejected with a CryptoException
ERROR_SESSION_NOT_OPENED.
Test: Verified by wv unit/integration test and
WvCdmExtendedDurationTest.DecryptionCloseSessionConcurrencyTest
b/36747801
Change-Id: I044d1d6b9fc886a1c353d20b9c6365319aa71e80
(This is a merge of http://go/wvgerrit/26221)
We have agreed on API 26 for O, so these comments can be removed without
making any further changes.
Bug: 34548395
Test: This is a comment-only change. But I verified it builds.
Change-Id: I490befba4f47902a84b60e562a7a5eb162a9f3be
(This is a merge of wvgerrit/25583)
Devices that use Provisioning 3.0 did not have a Provisioning-Unique ID
defined. Attempting to retrieve it would result in an error.
Devices that use SPOIDs with keyboxes would expose the keybox's real
Provisioning-Unique ID when asked. This is a security flaw.
To solve both cases, an alternative Provisioning-Unique ID is used,
consisting of the Device-Unique ID bitwise-inverted.
Bug: 36065223
Test: run_all_unit_tests.sh
Change-Id: I32512a3e11403e679939187e156904a57a9e24ef
(This is a merge of wvgerrit/25582)
Provisioning 3.0 devices that do not use SPOIDs have been returning
their full OEM Public Certificate as their device ID. While this is not
a security concern, (it is a PUBLIC cert) the cert is many times larger
than applications are likely expecting. (several kilobytes vs. just a
few bytes) This patch hashes the OEM Public Certificate to produce a
smaller value, but only when it is being provided out of the CDM to a
caller.
Bug: 34716264
Test: run_all_unit_tests.sh
Change-Id: Ib82cf7a174a8bf02ff606edd0394ada13842224c