Commit Graph

2671 Commits

Author SHA1 Message Date
android-build-team Robot
43cdf34128 Snap for 4728508 from 5c71603e8c to pi-release
am: 4b26955a76

Change-Id: Ied36c32fbf5b3ed0fd9dae1e35eb672cacc9ffcb
2018-04-18 00:44:05 -07:00
android-build-team Robot
4b26955a76 Snap for 4728508 from 5c71603e8c to pi-release
Change-Id: I5d7fc92a841f71013980a217ec58cb598edfc0f8
2018-04-18 07:24:56 +00:00
Adam Stone
5c71603e8c Create unique cdm engines per WVDrmPlugin instance
This change creates a unique id in the cdm identifier in order to force
a one-to-one mapping between WVDrmPlugin instances and CDM Engines. This
change simplifies some assumptions. This includes ensuring that the
metrics for a given MediaDrm instance map to a given CdmEngine instance.

This change contains the original change go/ag/3819203 and a fix to the
deadlock that was seen on Marlin and Taimen.

Bug: 73724453
Test: Updated unit tests. GTS test pass. Shaka Player, Netflix and Google Play test.
Change-Id: Ib208204a1b794df9f306fa11d13a8bb6cd6889f7
2018-04-17 20:11:02 +00:00
Fred Gylys-Colwell
1a25cbdad6 Update Copyright
Merge from Widevine repo of http://go/wvgerrit/47860

This CL updates the copyright notice to indicate that files
shared with partners are shared under the Widevine Master
License Agreement.

bug: 77926774
test: comment change only
Change-Id: I0423668111578b80fb39a932d763df2827e2dfc3
2018-04-16 16:38:05 -07:00
android-build-team Robot
adf6bb8920 Snap for 4722539 from d102f8a4d2 to pi-release
am: 0efd53d09a

Change-Id: Id418c5321bcb5ec46597b016e4190416f897e9fa
2018-04-15 00:57:33 -07:00
android-build-team Robot
0efd53d09a Snap for 4722539 from d102f8a4d2 to pi-release
Change-Id: I9f11d2224f5469e6eee667045911e8168ca58d95
2018-04-15 07:21:00 +00:00
Rahul Frias
d102f8a4d2 Correct exception returned after RemoveKeys is called.
[ Merge of http://go/wvgerrit/47065 ]

RemoveKeys now resets associated crypto and policy resources,
rather than just closing the crypto session. This results in a
MediaCodec.CryptoException with error code ERROR_NO_KEY
rather than ERROR_SESSION_NOT_OPENED, if decrypt is called
afterwards.

Error SESSION_NOT_FOUND_FOR_DECRYPT is made unique. Error codes
were also synchonized between various branches in the widevine repo.

Bug: 77304819
Test: WV unit/integration tests, VtsHalDrmV1_0Target tests
Change-Id: I6cba2a3e1ce466d58c7727cde2d8f81d9503d655
2018-04-11 00:11:11 -07:00
android-build-team Robot
cfe1583212 Snap for 4710485 from f0cd22d4f4 to pi-release
am: d5b930eb86

Change-Id: I4d7a89705733d2f6deb712685c8dafc93a553c5f
2018-04-10 00:40:12 -07:00
android-build-team Robot
d5b930eb86 Snap for 4710485 from f0cd22d4f4 to pi-release
Change-Id: I7b08096443321d177090fb21b1f05be41f7fb278
2018-04-10 07:25:48 +00:00
Rahul Frias
f0cd22d4f4 Address failures when provisioning methods differ
[ Merge of http://go/wvgerrit/46907 ]

The WV client supports root of trusts as keyboxes or OEM certificates.
Devices with keyboxes use provisioning 2.0 protocol to provision
while those with OEM certificates use 3.0. L3 provisioning failures
occur if the L1 and L3 root of trusts differ.

The provisioning method is now retrieved and cached when the
security level is known, when the session is opened.
Earlier it was retrieved and cached at initialization time and
always set to the value of L1 OEMCrypto (if present). This led
to provisioning failures.

A case of acquiring a lock while one was held in GetProvisioningId()
has also fixed.

Bug: 77606913
Test: WV unit/integration tests
Change-Id: I2d66ee2cf64f846cec4a37fbccb554447c8a0e1d
2018-04-09 13:47:29 -07:00
John W. Bruce
9d384305b7 Add widevine.com Default Provisioning Service Certificate
(This is a merge from http://go/wvgerrit/46447)

The Production Provisioning Service is moving to the "widevine.com"
certificate from the "license.widevine.com" certificate it was using.
This replaces the two places this certificate appears in the source
code. This is expected to be the last such update.

Also, the Staging Provisioning Service was already using this
certificate, but our code had it listed as using the old certificate. It
has also been updated.

Bug: 77244492
Test: CE CDM Unit Tests
Test: Android Unit Tests
Change-Id: I2ce14ea8e672c453ce0f74fbd3345f7e40f2f297
2018-04-09 13:47:15 -07:00
android-build-team Robot
d3937b62d4 Snap for 4706961 from c3bce4d845 to pi-release
am: 49f5f264e7

Change-Id: Icb60776fa506de558b116763e9c3965714a2e6c2
2018-04-08 00:56:34 -07:00
android-build-team Robot
49f5f264e7 Snap for 4706961 from c3bce4d845 to pi-release
Change-Id: I5528486d03c263851378ecddba848686466d82ca
2018-04-08 07:26:26 +00:00
android-build-team Robot
6f57966a00 Merge cherrypicks of [3851088, 3851089, 3851268, 3850366] into pi-release
am: 370994ea9e

Change-Id: I0d82a83911cce2dc61faff4542ecc22fed49caf1
2018-04-05 13:46:26 -07:00
android-build-team Robot
370994ea9e Merge cherrypicks of [3851088, 3851089, 3851268, 3850366] into pi-release
Change-Id: Ibcbe439eecf9ca163195126770592a816e8cabc2
2018-04-05 20:35:32 +00:00
Jeff Tinker
629e179f7c Revert "Create unique cdm engines per WVDrmPlugin instance"
This change introduced b/77618383, need to revert.

This reverts commit 58234a69f2.

Change-Id: Ie7d515bcd94f2dcee6fa9b885cd0441845c82c22

Bug: 77618383
(cherry picked from commit 90441e24df)

Change-Id: I114cb3cf5b69e2698d407ba4cf15cefcad2aaf3d
2018-04-05 20:35:29 +00:00
TreeHugger Robot
c3bce4d845 Merge "Revert "Create unique cdm engines per WVDrmPlugin instance"" into pi-dev 2018-04-05 20:03:26 +00:00
Jeff Tinker
90441e24df Revert "Create unique cdm engines per WVDrmPlugin instance"
This change introduced b/77618383, need to revert.

This reverts commit 58234a69f2.

Change-Id: Ie7d515bcd94f2dcee6fa9b885cd0441845c82c22

Bug: 77618383
2018-04-05 20:03:15 +00:00
android-build-team Robot
14faa3f5cb Snap for 4701683 from 6cd7ed1688 to pi-release
am: 94157fbfeb

Change-Id: I699621cf88e7ef20d96383ee9c4600b3ea9bf0fe
2018-04-05 00:40:55 -07:00
android-build-team Robot
94157fbfeb Snap for 4701683 from 6cd7ed1688 to pi-release
Change-Id: I42f42231da48fbeac7f3ae7039b794bbb22a4c17
2018-04-05 07:27:17 +00:00
Adam Stone
6cd7ed1688 Merge "Create unique cdm engines per WVDrmPlugin instance" into pi-dev 2018-04-04 23:09:43 +00:00
Adam Stone
58234a69f2 Create unique cdm engines per WVDrmPlugin instance
This change creates a unique id in the cdm identifier in order to force
a one-to-one mapping between WVDrmPlugin instances and CDM Engines. This
change simplifies some assumptions. This includes ensuring that the
metrics for a given MediaDrm instance map to a given CdmEngine instance.

Bug: 73724453
Test: Updated unit tests. GTS test pass. Shaka Player, Netflix and Google Play test.
Change-Id: I7e041b6cdf3e272d067da49d25a297b4a4663f1f
2018-04-04 12:28:57 -07:00
android-build-team Robot
31f6ae3dd3 Snap for 4698807 from 92e6a1bb66 to pi-release
am: 853d3a2388

Change-Id: I22758b3fecd6052f876d385caad62ebeaa4b72a8
2018-04-04 00:41:39 -07:00
android-build-team Robot
853d3a2388 Snap for 4698807 from 92e6a1bb66 to pi-release
Change-Id: I4a45337601d521d2866bcfb86c2a458b8a6994fc
2018-04-04 07:22:31 +00:00
Rahul Frias
92e6a1bb66 Merge changes Ie4a63ac2,I8523ef28 into pi-dev
* changes:
  Recovery from usage info corruption
  Correct segfault in WvCdmRequestLicenseTest.UsageRemoveSecureStopTest
2018-04-03 18:12:34 +00:00
Rahul Frias
d7d8940174 Recovery from usage info corruption
[ Merge of http://go/wvgerrit/46623 ]

If corruption of the usage information file is detected while saving a
streaming license with a PST, usage information file is deleted, so that
a subsequent load keys may succeed.

Also when calling the MediaDrm API releaseAllSecureStops(), an error would
be returned if usage info file was corrupted. Since this file is
deleted successfully, errors have been replaced with warnings.

Bug: 73447733
Test: wv unit/integration tests
Change-Id: Ie4a63ac202fd6009609105f38ffa8a3b23ed334e
2018-04-02 19:04:09 -07:00
Rahul Frias
4e201c2700 Correct segfault in WvCdmRequestLicenseTest.UsageRemoveSecureStopTest
[ Merge of http://go/wvgerrit/46622 ]

Secure stop API related changes introduced in b/69674645 caused
segfaults on taimen/walleye but not other devices due to a difference
in OEMCrypto version.

Bug: 77294890
Test: WV unit/integration tests on sailfish and walleye
Change-Id: I8523ef283334d7d32d180e902072fe1dd6e665c1
2018-04-02 19:03:26 -07:00
android-build-team Robot
d0be6e1387 Snap for 4693621 from 084c370db6 to pi-release
am: 2dc2be684c

Change-Id: I2b1a1d39b1704d3d5e0412fbd7a9977eda17443a
2018-04-02 18:10:54 +00:00
Rahul Frias
142e80f750 Correct unit test compile error
[ Merge of http://go/wvgerrit/46640 ]

Bug: 72994956
Test: WV unit/integration tests on walleye, sailfish and linux.
Change-Id: I7319a4b79ab9a02e0ca9a50fb48c6107f8c3a762
2018-04-02 11:02:31 -07:00
android-build-team Robot
2dc2be684c Snap for 4693621 from 084c370db6 to pi-release
Change-Id: I22d430e0f99ba32c1005158d463ad16b8a1ab98f
2018-04-01 07:22:24 +00:00
Adam Stone
084c370db6 Merge changes If99c1873,I3a3aa4fb into pi-dev
* changes:
  Creates a new license request latency metric
  Fixes missing or broken metrics in Widevine CDM
2018-03-31 00:50:34 +00:00
Edwin Wong
07bf196fc0 Merge "Upgrade widevine HIDL service to v1.1." into pi-dev 2018-03-31 00:43:02 +00:00
Edwin Wong
bc66aebfe2 Upgrade widevine HIDL service to v1.1.
Merged from http://go/wvgerrit/44803.

Upgrade HIDL service to v1.1 and implements new 1.1 media API.

Test: Netflix and Play Movies & TV
  streaming and offline playback

Test: GTS WidevineH264PlaybackTests test
  e.g. ANDROID_BUILD_TOP= ./android-gts/tools/gts-tradefed run gts -m GtsMediaTestCases
  --test com.google.android.media.gts.WidevineH264PlaybackTests#testL1With480P30

Test: GTS MediaDrmTest tests
  e.g. ANDROID_BUILD_TOP= ./android-gts/tools/gts-tradefed run gts -m GtsMediaTestCases
  --test com.google.android.media.gts.MediaDrmTest#testWidevineApi28

Test: unit tests

bug: 69674645
Change-Id: I91e7e43f9178b61a531e846beffb5f5c17050a3c
2018-03-30 14:57:16 -07:00
Adam Stone
09c45c4440 Creates a new license request latency metric
Previously, we did not have a license request latency metric. This is a
notable limitation in our metrics. This adds a metric that captures the
timing between a GenerateKeyRequest and an AddKey operation.

Bug: 72994956
Test: New unit tests. Google Play
Change-Id: If99c187399c02f9b5d4c355732af7588bbbefb11
2018-03-30 21:43:48 +00:00
Adam Stone
e1fe90372f Fixes missing or broken metrics in Widevine CDM
A few metrics were missing or not properly collected in the CDM metrics.
This CL addresses them.

Bug: 64570194
Bug: 72866232

Test: Unit tests and Google Play manual test.
Change-Id: I3a3aa4fb3eb8422c9c8c398016f02409307beb33
2018-03-30 14:07:04 -07:00
Srujan Gaddam
f217742582 Fixed loading mac keys in mock and Level3
Merge of http://go/wvgerrit/45521/

Bug: b/73818548

Test: request_license_tests and GTS tests on sailfish and taimen

This change loads the mac keys into the session to be used in
GenerateSignature from the last call to one of: DeriveKeysFromSessionKey,
GenerateDerivedKeys, LoadKeys, and LoadUsageEntry. OEMCrypto tests are
changed to reflect this as well (specifically the order in which we call
the above methods).
2018-03-29 10:39:21 -07:00
Srujan Gaddam
5064731d02 Remove call to DeriveKeys for release
Merge of http://go/wvgerrit/45520/

Bug: b/70650789

Test: request_license_tests and GTS tests on sailfish and taimen

This is related to b/70650789. An extra call to DeriveKeysFromSessionKey
in the case where there is a provider session token results in the
OEMCrypto mock incorrectly using the derived mac keys to sign the release
message, since a future call to LoadKeys is never called.
2018-03-29 10:37:09 -07:00
android-build-team Robot
5837cd6fbf Snap for 4686875 from db0911df54 to pi-release
am: 7963e8425a

Change-Id: I6f06341ebaf5e41bd97915d29e2eda67d8fb2868
2018-03-29 07:41:59 +00:00
android-build-team Robot
7963e8425a Snap for 4686875 from db0911df54 to pi-release
Change-Id: I7a32241a67c7cf3b97db41b61c5d35c2889b3674
2018-03-29 07:25:56 +00:00
John W. Bruce
db0911df54 Load Certificate to Confirm Provisioning
(This is a merge of http://go/wvgerrit/46203)

Previously, IsProvisioned() only confirmed the existence of a
certificate file, not whether the contents of that file were actually
valid. This patch changes its behavior so that it actually validates the
loadability of the file before returning.

This is sufficient to resolve Netflix's use case in b/65835227, but it
is only part of the solution for Android's use case in b/72353451. A
second patch will be required to cover cases where the certificate can
be loaded but cannot be used with the current OEMCrypto or with the
server.

Bug: 65835227
Bug: 72353451
Test: Android and CE CDM unit tests
Change-Id: Id3987a6f3c4097d7d356dfa631b023287354439a
2018-03-28 03:33:02 -07:00
android-build-team Robot
61b248c5de Snap for 4680594 from b19f0d106f to pi-release
am: 41e73c4dfc

Change-Id: I7754fdbb6fc219cc04e25afef9b0508b4b9fdfb1
2018-03-27 07:59:00 +00:00
android-build-team Robot
41e73c4dfc Snap for 4680594 from b19f0d106f to pi-release
Change-Id: Ide483e263f6469cc71dead22bc11077a80a8c64a
2018-03-27 07:25:12 +00:00
Adam Stone
b19f0d106f Fixes widevine metrics proto serialization
Changes to a much more efficient and more reusable protobuf format for
metrics.

Test: Widevine tests, Google Play and MediaDrm CTS test.
Bug: 73724218

Change-Id: I3299051d7a16bcd7758c8f272415ca40e10c1313
2018-03-22 16:36:18 -07:00
android-build-team Robot
2a6db5c6a2 Snap for 4662252 from efc008c5a1 to pi-release
am: 340885c879

Change-Id: Iafd7c208f825b79d8e51970ad5cbe1c46276fd32
2018-03-18 08:11:45 +00:00
android-build-team Robot
340885c879 Snap for 4662252 from efc008c5a1 to pi-release
Change-Id: Ida0b940acc2341125d0bf5d2cbb1df781c4aba44
2018-03-18 07:23:12 +00:00
Rahul Frias
efc008c5a1 Merge changes I04ac8224,Iee6e60b9 into pi-dev
* changes:
  Secure stop API related changes
  Rename ReleaseAllUsageInfo to RemoveAllUsageInfo
2018-03-16 22:52:06 +00:00
TreeHugger Robot
d24ff56def Merge "Sync Android CDM Version with OEMCrypto" into pi-dev 2018-03-16 19:37:51 +00:00
Rahul Frias
a6e8a38c20 Disable UsageOverflowTest
[ Merge of http://go/wvgerrit/45661 ]

This test was written to verify that the last 50 entries were maintained
by the usage table (OEMCrypto v9-11). With OEMCrypto v13+, that limit has
been removed and this is no longer an appropriate test. I have
disabled the test for now and will replace/rewrite with one
appropriate for big usage tables.

Bug: 30022298
Test: Ran cdm_extended_duration_tests
Change-Id: I23d54bb57c92b391f80817945626898fd590078f
2018-03-16 00:36:37 -07:00
John W. Bruce
376b96512f Sync Android CDM Version with OEMCrypto
(This is a cherry-pick of http://go/ag/3684977 that got left behind when
pi-dev was branched.)

The various Shared Source CDM groups have agreed on a more unified
version numbering scheme. Henceforth, the pattern for the version number
will be:

<max-oemcrypto-version-supported>.<minor-version>.<patch-version>

Where "minor-version" and "patch-version" are incremented independently
at the discretion of each CDM product.

This patch updates the version number for the Android CDM to match the
new scheme and updates the relevant tests.

Bug: 73090259
Test: request_license_test --gtest_filter=VersionNumberTest.*
Merged-In: Idcead5d92565dd549aa35565da632f01abb9e513
Change-Id: Idcead5d92565dd549aa35565da632f01abb9e513
2018-03-15 13:21:13 -07:00
android-build-team Robot
1f3016a29f Snap for 4656203 from 6a4abc15fe to pi-release
am: aa93f47143

Change-Id: I0a6f11e68b8685bb52011bc981fb05bb4f5273ff
2018-03-15 07:51:45 +00:00