Commit Graph

2804 Commits

Author SHA1 Message Date
Rahul Frias
816f00e533 Allow a service certificate to be specified for provisioning
[ Merge of http://go/wvgerrit/48400 ]

Client identification information has recently been enabled in
provisioning messages. For privacy concerns this information
is being encrypted with a default service certificate.
Apps need to be able to override the default one to allow
for provisioning with third party provisioning services.

Bug: 78420508
Test: WV unit, integration tests
      New WvCdmRequestLicenseTest.ProvisioningTestWithServiceCertificate test
      GTS MediaDrmTestCases

Change-Id: Iee61ad47d33ce011efbea4eb90f7e4b1f032d15f
2018-04-24 11:14:35 -07:00
John Bruce
4ac9a39f45 Merge "Update OS Version in Version Canary" into pi-dev am: e3e437a6eb
am: e2235aee09

Change-Id: I1f4e84eaf88bd954989c6207326d0a11d3e1212c
2018-04-23 18:33:35 -07:00
John Bruce
e2235aee09 Merge "Update OS Version in Version Canary" into pi-dev
am: e3e437a6eb

Change-Id: I5049b33a464b19f39aac68d23c5d39866b8f5c07
2018-04-23 18:11:49 -07:00
John Bruce
e3e437a6eb Merge "Update OS Version in Version Canary" into pi-dev 2018-04-24 01:02:59 +00:00
Srujan Gaddam
73c3007c24 Address offline playback with rollbacked time
Merge from http://go/wvgerrit/47640

Test: unit/integration tests

Bug: b/62058202

The usage table keeps track of license duration by using the current
system time. However, if a user were to rollback the time, they can
effectively continue offline playback indefinitely. This changes the way
we compute time by computing offsets by which the user rollbacked the
time and adding it to the current time. This change also includes a test
to verify protection against rollback for usage entries that is only run
when the user is root.

Change-Id: I97c430e1443747b0f9759ae5390b8f5d06bdebf1
2018-04-23 15:44:26 -07:00
Rahul Frias
8184c43b72 Merge "Enable encryption of client ID for provisioning" into pi-dev am: d873f40d80
am: e51a3fa402

Change-Id: I20fe0ad5d1fe54c2e0468810bd35436bdfa596d4
2018-04-23 15:16:58 -07:00
Rahul Frias
e51a3fa402 Merge "Enable encryption of client ID for provisioning" into pi-dev
am: d873f40d80

Change-Id: I4f2e613570b16e97141b9e4b8843f78e6123d92c
2018-04-23 15:08:35 -07:00
Rahul Frias
d873f40d80 Merge "Enable encryption of client ID for provisioning" into pi-dev 2018-04-23 22:03:53 +00:00
Rahul Frias
a8d236cb88 Prevent race conditions between decrypt and close session am: 07bb4de042
am: 909650a0b3

Change-Id: I9effccd42b5e083363a2c213ff289f667cc4a71e
2018-04-23 07:10:39 -07:00
Rahul Frias
909650a0b3 Prevent race conditions between decrypt and close session
am: 07bb4de042

Change-Id: I3f52a62587b90aab7d4e22a6257edbefc059721c
2018-04-23 07:02:38 -07:00
Rahul Frias
c171d024d9 Enable encryption of client ID for provisioning
[ Merge of http://go/wvgerrit/46760 ]

This enables encryption of client ID for provisioning requests for
devices with keyboxes as root of trust. Client ID will not be
provided for those devices with OEM device certificates as root of
trust. That will be addressed in b/78303730.

Bug: 77607585
Test: WV unit/integration tests. Tests with L3 using OEM certs
Change-Id: Id9bd697aa049bd5659ab80714e141dbc50408f6a
2018-04-22 10:52:51 -07:00
Rahul Frias
07bb4de042 Prevent race conditions between decrypt and close session
[ Merge of http://go/wvgerrit/47520 ]

Bug: 73781703
Test: WV unit/integration tests, GTS GtsMediaTestCases tests and AUPT tests.
Change-Id: I618ed8ca38855aecdb31e829a7f4041cbd505a02
2018-04-19 23:41:27 -07:00
John W. Bruce
a6aab24d91 Update OS Version in Version Canary
(This is a merge of http://go/wvgerrit/47990)

This is a test-only change.

Bug: 78117686
Test: VersionNumberTest.*
Change-Id: I4f53358fd6eacd498ddd1df7324084d0d4ae67fe
2018-04-17 18:29:57 -07:00
Adam Stone
27e3938ad3 Create unique cdm engines per WVDrmPlugin instance am: 5c71603e8c
am: 4329170a35

Change-Id: Ib156dce5163b2e438c0378729ff64bd56b612268
2018-04-17 14:54:43 -07:00
Adam Stone
4329170a35 Create unique cdm engines per WVDrmPlugin instance
am: 5c71603e8c

Change-Id: Id3d55a81f81c72470d8fa521f5685a6ae5c3d750
2018-04-17 14:41:03 -07:00
Fred Gylys-Colwell
0f962f50e2 Update Copyright am: 1a25cbdad6
am: 2495ce5512

Change-Id: I956ff0d29d26fc104df032c3477b1b08d238dba4
2018-04-17 14:30:55 -07:00
Fred Gylys-Colwell
2495ce5512 Update Copyright
am: 1a25cbdad6

Change-Id: I9570da5bf8aaf14326c0a44b151acece97494f20
2018-04-17 13:47:34 -07: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
Adam Stone
c432720637 Remove a spammy log message from metrics collections.
Removes an unneccessary and noisy log message.

Bug: 77975999

Test: Re-ran unit tests. Tested with Google Play.
Change-Id: Ibec69a4e72231a87b2bb3c9c341e5ea0af352715
2018-04-16 16:24:58 -07:00
Rahul Frias
52e91a2ffb Correct exception returned after RemoveKeys is called. am: d102f8a4d2
am: 50568ca0d2

Change-Id: Iafefa9a2da7fb962f99c9be5f49f361a1acf5e86
2018-04-12 18:04:35 -07:00
Rahul Frias
50568ca0d2 Correct exception returned after RemoveKeys is called.
am: d102f8a4d2

Change-Id: Ib6c3dd31bdce16af3ef7bc2aeebdc07bd7e26f09
2018-04-12 17:00:01 -07: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
Rahul Frias
b37e219f46 Address failures when provisioning methods differ am: f0cd22d4f4
am: 89f6b215e9

Change-Id: Ic9e300c25404127746cb1995449fe33efd076399
2018-04-09 16:53:22 -07:00
John W. Bruce
834c15e4e7 Add widevine.com Default Provisioning Service Certificate am: 9d384305b7
am: 312ac7da54

Change-Id: I14406150134667549b48dc9d2f37ad13895c1b64
2018-04-09 16:53:16 -07:00
Rahul Frias
89f6b215e9 Address failures when provisioning methods differ
am: f0cd22d4f4

Change-Id: Ibd1a8b34e24dbcdc17d68747341cc634109a5f57
2018-04-09 16:21:08 -07:00
John W. Bruce
312ac7da54 Add widevine.com Default Provisioning Service Certificate
am: 9d384305b7

Change-Id: I2e45890cacd816abc9bfbf39dc16a5c75342624d
2018-04-09 16:20:52 -07: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
Jeff Tinker
0b09804158 Merge "Revert "Create unique cdm engines per WVDrmPlugin instance"" into pi-dev am: c3bce4d845
am: b911a8f8f7

Change-Id: I53710d0f23826be3580ac17de0f5b35b0f0a4bb7
2018-04-05 13:23:20 -07:00
Jeff Tinker
b911a8f8f7 Merge "Revert "Create unique cdm engines per WVDrmPlugin instance"" into pi-dev
am: c3bce4d845

Change-Id: I1c7ef15eee82bbde0c44e9e2b6c4e380f93c4690
2018-04-05 13:15:49 -07: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
Adam Stone
1f63e00ca3 Merge "Create unique cdm engines per WVDrmPlugin instance" into pi-dev am: 6cd7ed1688
am: ffd21f49bd

Change-Id: Ib80cb08b303a454d46ac21b7f4f420c0f6ae4322
2018-04-04 16:53:21 -07:00
Adam Stone
ffd21f49bd Merge "Create unique cdm engines per WVDrmPlugin instance" into pi-dev
am: 6cd7ed1688

Change-Id: Ice4bb3e1e5839b6d1e3513e95f9888b0732b2103
2018-04-04 16:28:25 -07: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
Rahul Frias
52f3a439b2 Merge changes Ie4a63ac2,I8523ef28 into pi-dev am: 92e6a1bb66
am: 6f0e0d0257

Change-Id: I84420e6a690184534530337836c9d161b9c8cd42
2018-04-03 14:58:52 -07:00
Rahul Frias
6f0e0d0257 Merge changes Ie4a63ac2,I8523ef28 into pi-dev
am: 92e6a1bb66

Change-Id: I9baed687ac21b9a72b0a625f0112935fb1b6d53f
2018-04-03 14:43:24 -07:00
Rahul Frias
9dc19a36af Correct unit test compile error am: 142e80f750
am: 70a5cd2a17

Change-Id: I94e609b656025147e459823fe6c2714bab1f7a0d
2018-04-03 14:07:42 -07:00
Rahul Frias
70a5cd2a17 Correct unit test compile error
am: 142e80f750

Change-Id: I208dba1a91485cf6bf5826d8c5a76f592de84c89
2018-04-03 13:50:27 -07: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
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
Adam Stone
ec60fdfd82 Merge changes If99c1873,I3a3aa4fb into pi-dev am: 084c370db6
am: 1103c83a6c

Change-Id: Ic39ca1a0bb4c8572b5391085b4078fdbe3c1ee3d
2018-03-31 07:48:16 +00:00
Edwin Wong
3169e7318c Merge "Upgrade widevine HIDL service to v1.1." into pi-dev am: 07bf196fc0
am: 348ecdb8f2

Change-Id: If8f67fd7badf18bf511693f777b5cf84c7330b16
2018-03-31 05:03:25 +00:00
Srujan Gaddam
898c894944 Fixed loading mac keys in mock and Level3 am: f217742582
am: bc18460165

Change-Id: I442cb641ee576ed7f5a4e1b237c14c7cebfeb0d8
2018-03-31 05:02:41 +00:00
Srujan Gaddam
35b6266f19 Remove call to DeriveKeys for release am: 5064731d02
am: 6f074ca35c

Change-Id: Ic76a26a11642aa41ef78ef2bd1ad053e714ae6fc
2018-03-31 05:02:29 +00:00
Adam Stone
1103c83a6c Merge changes If99c1873,I3a3aa4fb into pi-dev
am: 084c370db6

Change-Id: Ia9685e25dc8a43f39f2f0c3f18cc1c190b4a6877
2018-03-31 02:27:49 +00:00