Commit Graph

4715 Commits

Author SHA1 Message Date
Rahul Frias
1381746ecb Merge changes I9a4977fd,I8ae5a10c,I0f9e6445
* changes:
  Update Widevine Copyright header
  Update Widevine Copyright header for core CDM
  Update Widevine Copyright header for android
2020-10-22 10:24:45 +00:00
TreeHugger Robot
fc374516b1 Merge "Merge recent doc changes for OEMCrypto" am: a53fb38be1
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12566583

Change-Id: I138fafceca64b76a712b17caf2a960d7c579683f
2020-10-22 00:12:20 +00:00
TreeHugger Robot
a53fb38be1 Merge "Merge recent doc changes for OEMCrypto" 2020-10-21 23:15:27 +00:00
Rahul Frias
53019f0459 Update Widevine Copyright header
[ Merge of http://go/wvgerrit/108103 ]

The Widevine License Agreement has been renamed to use inclusive
language. This covers files in the cdm, linux, platform, util directory
in addition to some other files.

Bug: 168562298
Test: verified compilation (comment only change)
Change-Id: I9a4977fd4c2ad951769b6be84263f81bd0f22678
2020-10-21 12:54:20 -07:00
Rahul Frias
6a1f050ffc Update Widevine Copyright header for core CDM
[ Merge of http://go/wvgerrit/108064 ]

The Widevine License Agreement has been renamed to use inclusive
language. This covers files in the core directory.

Bug: 168562298
Test: verified compilation (comment only change)
Change-Id: I8ae5a10cbfdf7faae6a2735e57b33729763f10b8
2020-10-21 12:05:05 -07:00
Rahul Frias
ec8bed38f4 Update Widevine Copyright header for android
[ Merge of http://go/wvgerrit/108084 ]

The Widevine License Agreement has been renamed to use inclusive
language. This covers files in the android directory.

Bug: 168562298
Test: verified compilation (comment only change)
Change-Id: I0f9e6445e0168ebe85425baeb81371e182e5a39c
2020-10-21 02:49:05 -07:00
Alex Dale
8dec2e38d8 Merge "Query analog output capabilities." am: 471e8c900d
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12850663

Change-Id: Ifff6d5613417954dc4b3541e6d97049b220d5ace
2020-10-19 23:28:08 +00:00
Alex Dale
471e8c900d Merge "Query analog output capabilities." 2020-10-19 23:01:32 +00:00
John Bruce
7ee2c28ab7 Merge changes I9432dd26,Id52b8c38 am: cc715b479d
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12776079

Change-Id: Ic2b17ebd656e832dcf5775de49a1200bac4fcedf
2020-10-19 19:51:22 +00:00
John Bruce
cc715b479d Merge changes I9432dd26,Id52b8c38
* changes:
  Allow 1 or 2 GetOEMPublicCertificate Calls in Metrics Tests
  Fix TimeRollbackPrevention Test
2020-10-19 19:35:40 +00:00
Alex Dale
fb847c4704 Query analog output capabilities.
[ Merge of http://go/wvgerrit/107763 ]

This CL enables the ability to query the CDM for the analog output
capabilites of the device.  Due to the number of possibilities that
OEMCrypto can report, two queries are exposed:
- Output capabilities: None, Supported, CGMS-C, Unknown
- Can disable: True, False, Unknown

Bug: 168322023
Test: Android integration test
Change-Id: I8036a89237d698f170d2c1901c41d1d6b708c917
2020-10-15 17:46:13 -07:00
Ian Baker
a9228a2be6 Merge "Update GtsExoPlayerTestCases class name in WV script" am: be0218e48f
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12717348

Change-Id: If28baa470493585cc1948d3089b4c1034f3796e2
2020-10-15 11:37:51 +00:00
Ian Baker
be0218e48f Merge "Update GtsExoPlayerTestCases class name in WV script" 2020-10-15 11:14:48 +00:00
Rahul Frias
5bd5e1d749 Merge "Avoid passing device ID when unused" am: bab666ecdc
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12545178

Change-Id: I29890a006c552897ccce70118c24b251c0674119
2020-10-11 23:47:34 +00:00
Rahul Frias
bab666ecdc Merge "Avoid passing device ID when unused" 2020-10-11 23:34:17 +00:00
John W. Bruce
25489dfa5b Allow 1 or 2 GetOEMPublicCertificate Calls in Metrics Tests
(This is a merge of http://go/wvgerrit/107263.)

The CryptoSessionMetricsTest suite assumed that GetOEMPublicCertificate
would only be called once, but in practice, it may be called twice,
since the first call can return OEMCrypto_ERROR_SHORT_BUFFER. This patch
updates the tests to accept 1 or 2 calls.

This patch also updates a few EXPECTs on vector lengths that should have
been ASSERTs, to avoid problems when later accessing the vector.

Bug: 169111969
Test: jenkins/ce_cdm_tests
Test: build_and_run_all_unit_tests.sh
Change-Id: I9432dd2694c7181ab57ed55f66ff6c8be0c867f9
2020-10-06 14:42:54 -07:00
John W. Bruce
48122e2c11 Fix TimeRollbackPrevention Test
(This is a merge of http://go/wvgerrit/107243.)

This code is based on a bug report and patch from Sony.

The TimeRollbackPrevention test was failing when run with CE CDM and the
OEC Ref, although it passed in some other configurations. The cause was
twofold:

1) The test sleep code was not accounting for rollback when calculating
   the clock drift, causing incorrect time values to elapse.
2) Fixing the previous exposed a bug in the CE CDM test host where it
   did not handle negative time passing correctly.

This patch expands Sony's fix with additional comments and some code
cleanup to try to make the code clearer and more robust against future
errors, particularly in the error-prone TestHost code.

Bug: 169942369
Test: jenkins/ce_cdm_tests
Test: build_and_run_all_unit_tests.sh
Test: x86-64, all CE CDM unit tests
Change-Id: Id52b8c38255f70b04bc2735c4e309fb90992f53e
2020-10-06 14:40:18 -07:00
Alex Dale
1569b14069 Test for creating and reloading usage entries. am: 927c2f628b
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11988032

Change-Id: Iee1d1cc5fe6b597bcf3746f5f3e7df47441faf59
2020-10-02 22:36:42 +00:00
Alex Dale
927c2f628b Test for creating and reloading usage entries.
[ Merge from http://go/wvgerrit/102303 ]

This adds an OEMCrypto test that ensures that usage entries can be
loaded and reloaded without issue within the same crypto client
lifecycle.  This is in response to b/158273241 where certain entries
could not be reloaded if new entries are created and loaded in a
particular order.

Bug: 158619296
Test: OEMCrypto test on Android
Change-Id: Ib7422b2003e46a3ee27c6a591177a12d14e628bc
2020-10-02 13:20:22 -07:00
Ian Baker
f6fce167ca Update GtsExoPlayerTestCases class name in WV script
DashTest is renamed DashStreamingTest in http://ag/12675004

Test: None
Bug: b/169220487
Change-Id: I55e0abe76ecc04ffe9d896d424bbe42dcb7203fc
2020-09-28 09:15:57 +01:00
Rahul Frias
fe9ae2926d Delay license state evaluation for offline licenses am: 8543b4c903 am: 9f2363e076 am: 6d8e447696
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12646162

Change-Id: Ia844727f3d13862981a7915572b8d27e95ccb73a
2020-09-23 03:36:41 +00:00
Rahul Frias
6d8e447696 Delay license state evaluation for offline licenses am: 8543b4c903 am: 9f2363e076
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12646162

Change-Id: I0158e6b1dc2560ff28ff9379533a428f2970efeb
2020-09-23 03:03:08 +00:00
Rahul Frias
9f2363e076 Delay license state evaluation for offline licenses am: 8543b4c903
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12646162

Change-Id: I7b0f8239720e3aab7324dce8e2956e8135d0a65c
2020-09-23 02:46:20 +00:00
Rahul Frias
8543b4c903 Delay license state evaluation for offline licenses
[ Merge of http://go/wvgerrit/106325 and http://go/ag/12644840 ]

When offline licenses are restored, licenses and any renewals are processed.
License state evaluation occurs and notifications are sent to listeners.
If the license is expired, which is likely if a renewal is present,
the license state will transition to expired. Transitions out of
expired state are not allowed and the renewal has no effect.

If we work around this by allowing transitions out of expired state,
listeners will get notifications that keys have expired and then that are
usable soon after. To avoid delivering erroneous notifications we delay
evaluation of license state while the license and renewal are being processed.
Evaluation occurs at the last stage of license restoration when playback
information from the usage table is being restored.

This only need to occur for when licenses are being restored. In other
cases when a license or renewal is received, license state evaluation
and event listener notification needs to occur immediately.

Bug: 166131956

Test: WV unit/integration tests, GtsMediaTestCases tests
Change-Id: Ic8ade25316c5e20cc88de9225c43c24b28f21ac4
2020-09-22 15:36:35 -07:00
Fred Gylys-Colwell
8983b21fd5 Sign unused renewal so that offline renewal may be loaded am: 80667cbac3 am: f5896158c1 am: 5eb94cc6c6
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12629547

Change-Id: Ic451a93104a9c903fce33e56ebf565e6b2bbae96
2020-09-22 22:29:58 +00:00
Fred Gylys-Colwell
5eb94cc6c6 Sign unused renewal so that offline renewal may be loaded am: 80667cbac3 am: f5896158c1
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12629547

Change-Id: I431e1f6607dd162809098798c20e28a35f1b88f8
2020-09-22 22:00:43 +00:00
Fred Gylys-Colwell
f5896158c1 Sign unused renewal so that offline renewal may be loaded am: 80667cbac3
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12629547

Change-Id: Ic8a236e81d07bbc629cfa9a7a0e46513c2cbac1d
2020-09-22 21:31:43 +00:00
Fred Gylys-Colwell
80667cbac3 Sign unused renewal so that offline renewal may be loaded
Merge from Widevine repo of http://go/wvgerrit/105347

When reloading an offline license that has an offline renewal, we sign
a unused renewal so that the ODK library can update its clock values.

Test: WV unit/integration tests, GtsMediaTestCases tests
Bug: 166131956
Change-Id: Ib1445fd85222489f21221e00729d4989cb49a331
2020-09-22 02:44:05 +00:00
Rahul Frias
0761dd8920 Avoid passing device ID when unused
[ Merge of http://go/wvgerrit/105743 ]

Device ID is no longer reported directly in provisioning/license
request or used by ClientIdentification. It does not need to be passed
in during initialization.

Bug: 168085721
Test: WV unit/integration tests
Change-Id: I483eac963c3f40784e42e1a2b917fcc96aa76a05
2020-09-17 23:35:15 -07:00
Fred Gylys-Colwell
20bb84ffee Merge recent doc changes for OEMCrypto
This is a cherry pick of recent changes to OEMCrypto and ODK. Most of
these are part of the document migration to doxygen.

See http://go/wvgerrit/106005 and its parents for code reviews.

Bug: 144715340
Bug: 148232693
Bug: 167580674
Change-Id: I658f99c8117b974faed97322d61fac0f382283af
2020-09-15 19:10:53 -07:00
Robert Shih
f26e2ef0f2 GetDecryptHashSupport: recognize OEMCrypto_ERROR_NOT_IMPLEMENTED am: da09f4abca am: 4bf604c2d7 am: 28b13ef65e
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12036417

Change-Id: I80d00065c7fd504f5d0855351c79a84e0a6aa76e
2020-09-15 02:39:33 +00:00
Alex Dale
9a2e83613a Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev am: c628c5aca2 am: 7a65b6c2d4 am: 493bf5ec49
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11925460

Change-Id: I03cb03249f3f6a3dfdec750beb20e86dfa8333e1
2020-09-15 02:25:15 +00:00
Robert Shih
28b13ef65e GetDecryptHashSupport: recognize OEMCrypto_ERROR_NOT_IMPLEMENTED am: da09f4abca am: 4bf604c2d7
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12036417

Change-Id: Iaf89049a8a7a7828259968d534f87505c470021f
2020-09-15 02:24:37 +00:00
Rahul Frias
48c449a138 Merge "Handle SPOID calculation for L3" into rvc-dev am: 25d1646138 am: 7a43e0f14b am: d79c4f2c0b
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11736137

Change-Id: Ie0338089c15f04a9c6ce15cd86adf95c7e07a80e
2020-09-15 02:15:15 +00:00
Alex Dale
493bf5ec49 Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev am: c628c5aca2 am: 7a65b6c2d4
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11925460

Change-Id: I7677699c1e9d0769447d091f366dae1dc9db08ba
2020-09-15 02:14:41 +00:00
Rahul Frias
d79c4f2c0b Merge "Handle SPOID calculation for L3" into rvc-dev am: 25d1646138 am: 7a43e0f14b
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11736137

Change-Id: Ib373332a453d704e20130f3ef88d45a750240219
2020-09-15 02:10:04 +00:00
Edwin Wong
bfddf2ee37 Merge "Add v16 Widevine Integration Guide Android Supplement" into rvc-dev am: 6b8d0e034d am: 66a17f743d am: 138f690bf7
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11838915

Change-Id: Id3e85976d2db1d00146cd5f56a36f034e832d29e
2020-09-15 02:09:02 +00:00
Rahul Frias
0f322f9df3 Merge changes I295f66f9,I142f286c into rvc-dev am: 05fbb3dd87 am: 041132b76d am: f13fb91002
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11620164

Change-Id: Id4c4303bcba8bfb927cbd21e6c4a1766c59e8ed7
2020-09-15 01:55:41 +00:00
Edwin Wong
138f690bf7 Merge "Add v16 Widevine Integration Guide Android Supplement" into rvc-dev am: 6b8d0e034d am: 66a17f743d
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11838915

Change-Id: I10268df2825750f547accdf4d2ec40b22ff2a143
2020-09-15 01:55:13 +00:00
Fred Gylys-Colwell
2dd6bc4a88 Remove Android.mk for OEMCrypto ref code am: 119932ea69 am: a8e2f398ad am: 37736b322a
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11870737

Change-Id: I0a0a25f4a14946fdac2fb5e91880654f865341ec
2020-09-15 01:43:28 +00:00
Rahul Frias
f13fb91002 Merge changes I295f66f9,I142f286c into rvc-dev am: 05fbb3dd87 am: 041132b76d
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11620164

Change-Id: I71b07f7bcc11a57d86c4ab71a7ca27aa4207788a
2020-09-15 01:42:19 +00:00
Fred Gylys-Colwell
4a53962138 Update OEMCrypto documentation to v16.3 am: aa5fc5afd0 am: e40a29b635 am: 4ac0ba742e
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11707216

Change-Id: Ia4ec6d3f8cf877639e8550f662735709b7b57cbe
2020-09-15 01:29:42 +00:00
Fred Gylys-Colwell
37736b322a Remove Android.mk for OEMCrypto ref code am: 119932ea69 am: a8e2f398ad
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11870737

Change-Id: Ied1a03095d555b900bceeeb7fede1047ff82b34b
2020-09-15 01:29:11 +00:00
Fred Gylys-Colwell
2170c5155c Update OEMCrypto unit tests to require ODK 16.3 am: 45681615b8 am: cd53dfca76 am: ebdecfbd68
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11677949

Change-Id: I404aa64b3a5a9318e1e2113a413c24ab9ff1b689
2020-09-15 01:16:55 +00:00
Fred Gylys-Colwell
6d460881ad Do not verify decrypt hash when no key selected am: 36968de671 am: ea86db9a2a am: 9efaecdee2
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11677948

Change-Id: I572eefdd9236aebed7b26c6b6c4026ea3a4e35cc
2020-09-15 01:16:53 +00:00
Fred Gylys-Colwell
4b6d8ee166 Unit test for loading nonce-free offline license am: a615671f48 am: df9740ecda am: 9b222ef2c5
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11677947

Change-Id: I97ef2e70867ff80fe4bb43cdb5537f6f0339f563
2020-09-15 01:16:52 +00:00
Fred Gylys-Colwell
7bed4bf687 Check for null pointers in oemcrypto adapter am: 42eb79a3ff am: 8ec81840f5 am: 3eb34674d2
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11677946

Change-Id: I361e5882609b82cfeeb9f93d5843371ac1381fbf
2020-09-15 01:16:51 +00:00
Fred Gylys-Colwell
a64625a553 Update ODK Library to 16.3 am: 166b3e8403 am: b33068bf35 am: 6d2b618296
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11699230

Change-Id: Ic7b18f8908ab9e3329214edfcce051347574591b
2020-09-15 01:16:49 +00:00
Fred Gylys-Colwell
d7f28f92db ODK: forward compatibility and nonce-free offline license support am: 8dc1d7a11d am: 1bd515cc47 am: 922411f468
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11688972

Change-Id: I4ec118eb1ebc6ce5f387be7f4e87086def0e4f0f
2020-09-15 01:16:48 +00:00
Fred Gylys-Colwell
4ac0ba742e Update OEMCrypto documentation to v16.3 am: aa5fc5afd0 am: e40a29b635
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11707216

Change-Id: Icb12136e8d6ed319c7c93f3d0c0fd11bd736127b
2020-09-15 01:01:54 +00:00