Commit Graph

4170 Commits

Author SHA1 Message Date
Robert Shih
4e94dce40b x86 L3: use correct struct size [ DO NOT MERGE ] am: 44aea963d0
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13061527

Change-Id: I5556d22cebfb8f67ba5953444e712f4283c47aff
2020-11-17 03:15:10 +00:00
Robert Shih
44aea963d0 x86 L3: use correct struct size [ DO NOT MERGE ]
Bug: 139814713
Bug: 173331251
Test: GtsMediaTestCases
Change-Id: Ia2db4c1bd4e080a5c0ee4c7be742401494f251b9
2020-11-16 01:34:53 +00:00
Cong Lin
739ae08bb3 Upgrade L3 to v16 and update android makefiles [DO NOT MERGE] am: 2f08c48e94
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12868368

Change-Id: Iacd880e4efcb8bb15247407714b1f6f832b67e1a
2020-11-05 01:47:34 +00:00
Cong Lin
2f08c48e94 Upgrade L3 to v16 and update android makefiles [DO NOT MERGE]
Merging CL:
https://widevine-internal-review.googlesource.com/c/cdm/+/108203
and
https://widevine-internal-review.git.corp.google.com/c/cdm/+/103904 (changes to the L3 source files are excluded)

Generated L3 v16 for Android and added ODK dependency required by L3 v16.

Test: Unit tests on gLinux
    jenkins/linux_unit_tests
    jenkins/ce_cdm_tests
Test: Unit tests on Pixel 4(flame-userdebug, rvc-qpr-dev)
    vendor/widevine/libwvdrmengine/build_and_run_all_unit_tests.sh
Test: Manual ExoPlayer playback tests on Pixel 4(flame-userdebug) for L1 and L3
    WV: Secure HD/SD (cenc,MP4,H264)
    WV: Secure HD/SD (cbc1,MP4,H264)
    WV: Secure HD/SD (cbcs,MP4,H264)
Test: Widevine GTS tests(bramble-userdebug, rvc-qpr-dev)
    https://android-build.googleplex.com/builds/tests/view?invocationId=I35000006266076664&testResultId=TR45714199883476235
    (Note: the two failures are due to GTS/http issue and not related/specific to L3 and the change)
Bug: 136317881
Bug: 139814713
Change-Id: If3d4999ca3b725eab76c41588f202beec3873928
2020-11-04 18:53:04 +00:00
Baligh Uddin
2ccfaeac56 Cleanup references to system/core/base -> system/libbase am: 673ca3c689
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12917865

Change-Id: I6b48816ef96567b7c7f8aff643706f624b46a1b9
2020-10-26 23:12:52 +00:00
Baligh Uddin
673ca3c689 Cleanup references to system/core/base -> system/libbase
BUG: 157656545
Test: TH
Merged-In: I3412348b28b56b13702af14ce77238fac506efdd
Change-Id: I9398826834a360afdf973c94afb11edcd65a6779
2020-10-26 03:32:32 +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
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
Alex Dale
601d910d17 DO NOT MERGE Handle unlimited usage table capacity. am: 99335a6aa8
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12266132

Change-Id: I25cb6ad05f466357fa4e2485a093ae8598bd5b51
2020-08-17 19:19:36 +00:00
Alex Dale
99335a6aa8 DO NOT MERGE Handle unlimited usage table capacity.
[ Merge of http://go/wvgerrit/103684 ]
[ Cherry pick of http://ag/12221244 ]

The OEMCrypto method for usage table capacity can return zero to
indicate that the usage table size is not explicitly limited.  The
CDM must handle this case with regard to the CDM's usage table
management and information querying.

The usage table initialization tests are extended to include cases
where the table does not have a defined limit.

AddEntry() was missing call to update the usage table header after
creating a new usage entry.  This call is now included and required
additional changes to the usage table unit tests.

Bug: 160560364
Test: Android unit tests
Change-Id: Ica5d181092d2938d24deba5005a211ca883cb0f0
2020-07-29 17:45:21 -07:00
Automerger Merge Worker
8de7e42545 Merge "Allow offline licenses to be loaded and restored in the same session am: 3709a4f419 am: 5cb846db83" into rvc-qpr-dev-plus-aosp 2020-07-26 18:35:09 +00:00
Rahul Frias
f68b9d3575 Allow offline licenses to be loaded and restored in the same session am: 3709a4f419 am: 5cb846db83
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12209028

Change-Id: Ifb7157752ab3cbfcd4e0a5b21136a43420947a4f
2020-07-26 18:35:02 +00:00
Rahul Frias
e37249c1de Allow offline licenses to be loaded and restored in the same session am: 3709a4f419 am: 693d58e17d
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12209028

Change-Id: If71a6573a618910478b3c0d9f8b9eb34d72fd9c0
2020-07-26 18:34:59 +00:00
Rahul Frias
5cb846db83 Allow offline licenses to be loaded and restored in the same session am: 3709a4f419
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12209028

Change-Id: I105d1e1b88a554a3ef9cd2174b2210c15852b0e0
2020-07-26 18:11:50 +00:00
Rahul Frias
693d58e17d Allow offline licenses to be loaded and restored in the same session am: 3709a4f419
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12209028

Change-Id: I5911f1d09a15d8ec266d60c22314b21e20788a30
2020-07-26 18:11:39 +00:00
Rahul Frias
3709a4f419 Allow offline licenses to be loaded and restored in the same session
[ Merge of http://go/wvgerrit/103243 ]

In v16, OEMCrypto specifications required that an error be returned if
multiple attempts are made to load an offline license into a session.
This caused the GTS test testConcurrentDrmCertificates to fail. It was
introduced to verify that a license could retrieved and loaded into a
session and then restored. This was based on an app use case.

Ideally we would like to disallow a this behavior but need to make sure
it is not being used by apps.

For now this will be allowed. If detected, the CDM will reintialize the
OEMCrypto session and allow the license to be restored.

Bug: 161551490
Test: WV unit integration tests, GtsMediaTestCases and
      WidevineConcurrentDrmCertificatesTest#testConcurrentDrmCertificates,
      MediaDrmTest#testMultipleLoadKeys on a redfin
Change-Id: I0834e4419c3a6dccfd77aaea3afa3d65c2c0c742
2020-07-24 07:27:19 -07:00
Robert Shih
0d3f31559a PolicyTimersV16: override base class HasRenewalDelayExpired am: d9112ff7e1 am: 951877a8ec
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12184963

Change-Id: I3f291f5f0c200d7678999e0ed3552cb6d0a37706
2020-07-24 00:04:01 +00:00
Robert Shih
6c6cbc95df PolicyTimersV16: override base class HasRenewalDelayExpired am: d9112ff7e1 am: 035254e828
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12184963

Change-Id: I01a10b72bb3a803197a814c74bcc04e5eaac3948
2020-07-24 00:03:01 +00:00
Robert Shih
951877a8ec PolicyTimersV16: override base class HasRenewalDelayExpired am: d9112ff7e1
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12184963

Change-Id: Ic030fa19260c55a47686507abc7bec3b41253d77
2020-07-23 23:46:28 +00:00
Robert Shih
035254e828 PolicyTimersV16: override base class HasRenewalDelayExpired am: d9112ff7e1
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12184963

Change-Id: I416235b868332a0a93ce9d2a8310350d9ffef733
2020-07-23 23:46:10 +00:00
Robert Shih
d9112ff7e1 PolicyTimersV16: override base class HasRenewalDelayExpired
Base class uses license_start_time_ which is not updated on renewals.

Merge of http://go/wvgerrit/103123

Bug: 161023174
Bug: 161621246
Test: WidevineDashPolicyTests#testL1RenewalDelay5S
Test: WidevineDashPolicyTests#testL1RenewalDelay13S
Change-Id: I16056d492bea4dd721984998b5cf38409fe3b055
2020-07-23 21:06:29 +00:00
Automerger Merge Worker
d56089551e Merge "Merge "Start rental clock when nonce-free offline license loaded" into rvc-d1-dev am: d24b3d4bd2 am: 7f873c03fd" into rvc-qpr-dev-plus-aosp 2020-07-21 10:50:49 +00:00
TreeHugger Robot
8d9109c46b Merge "Start rental clock when nonce-free offline license loaded" into rvc-d1-dev am: d24b3d4bd2 am: 7f873c03fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12184965

Change-Id: I93bc83f2458f6fd36fa562def376a29056f870c2
2020-07-21 10:50:46 +00:00
TreeHugger Robot
e8cf28340a Merge "Start rental clock when nonce-free offline license loaded" into rvc-d1-dev am: d24b3d4bd2 am: 84c1ff91ae
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12184965

Change-Id: I87351f7ef5ba59b076ab331f45732c5e462f6db1
2020-07-21 10:50:45 +00:00
TreeHugger Robot
7f873c03fd Merge "Start rental clock when nonce-free offline license loaded" into rvc-d1-dev am: d24b3d4bd2
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12184965

Change-Id: Ie7c3dd1ea96c1ef12aafc3fb19d2acbc4b0909cf
2020-07-21 10:39:25 +00:00
TreeHugger Robot
84c1ff91ae Merge "Start rental clock when nonce-free offline license loaded" into rvc-d1-dev am: d24b3d4bd2
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12184965

Change-Id: Idb4570f166748606d74618bce155aaba81c5f9d3
2020-07-21 10:39:10 +00:00
TreeHugger Robot
d24b3d4bd2 Merge "Start rental clock when nonce-free offline license loaded" into rvc-d1-dev 2020-07-21 10:24:53 +00:00
Fred Gylys-Colwell
6dbbc42d40 Adjust nonce for v15 servers am: 7f347cd59f am: 9cf2a475e2
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12173751

Change-Id: I9b99e0231fb4c0b0e652e84929a2e8393bcfa186
2020-07-21 08:41:27 +00:00
Fred Gylys-Colwell
08fe6b1690 Adjust nonce for v15 servers am: 7f347cd59f am: 940a771969
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12173751

Change-Id: I67ed1d76737d81d039b603d85b18977845f20007
2020-07-21 08:41:22 +00:00
Fred Gylys-Colwell
940a771969 Adjust nonce for v15 servers am: 7f347cd59f
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12173751

Change-Id: Ifb92abb057be10bbe43d1cb184969302b7ff5b05
2020-07-21 08:28:12 +00:00
Fred Gylys-Colwell
9cf2a475e2 Adjust nonce for v15 servers am: 7f347cd59f
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12173751

Change-Id: If52b4180e02638e93028d0dda38b79e6d0dbd1d0
2020-07-21 08:28:08 +00:00
Fred Gylys-Colwell
b90f88072f Start rental clock when nonce-free offline license loaded
Merge from Widevine repo of http://go/wvgerrit/103107

When an offline license is reloaded, if it does not have a usage entry
to indicate when the rental clock was started, the start time defaults
to 0 in the ODK library (in OEMCrypto). This CL changes the code to
start the rental clock in this case. It does this by signing a dummy
message, which triggers the ODK library to start the rental clock.

Bug: 161585265
Bug: 161023174
Test: GTS tests. http://go/forrest-run/L55100000642199761
Change-Id: I4cf555b2fb43009ffb62e7b2c1a37265c3f70bfe
2020-07-20 23:11:48 +00:00
Fred Gylys-Colwell
7f347cd59f Adjust nonce for v15 servers
Merge from Widevine repo of http://go/wvgerrit/102783

When OEMCrypto is v16, but the license server is v15, we should not
create a new nonce for a license renewal. However, the request does
need a nonce or the license server will not generate a valid key
control block. So we should use the nonce that came from the original
license.

Bug: 160676790
Test: tested playback using netflix
Test: GTS tests. http://go/forrest-run/L55100000642199761
Change-Id: Ie1644b5abe0662387edf01f6110d82f70a64df6c
2020-07-20 23:11:41 +00:00
Robert Shih
ba2e3e41f8 GetDecryptHashSupport: recognize OEMCrypto_ERROR_NOT_IMPLEMENTED am: da09f4abca am: f240709ef2 am: 918dba59f1
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12036417

Change-Id: Ibb4706058e19d68706ba0fa011554ba2330e8c0e
2020-07-07 00:20:41 +00:00
Robert Shih
c171cefa91 GetDecryptHashSupport: recognize OEMCrypto_ERROR_NOT_IMPLEMENTED am: da09f4abca am: 0db8b90cdb am: 231770e40c
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12036417

Change-Id: I72e461c36bf48714648e04b256885d5948a724dc
2020-07-07 00:20:18 +00:00
Robert Shih
deb11efb5f GetDecryptHashSupport: recognize OEMCrypto_ERROR_NOT_IMPLEMENTED am: da09f4abca am: 0db8b90cdb am: 2009155f7e
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12036417

Change-Id: I841154f06f33f926d56dde9e25bb3bf45efad7b6
2020-07-07 00:19:54 +00:00
Robert Shih
231770e40c GetDecryptHashSupport: recognize OEMCrypto_ERROR_NOT_IMPLEMENTED am: da09f4abca am: 0db8b90cdb
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12036417

Change-Id: I94c1340571cffbe834c8ea2576008665d61c08c0
2020-07-06 23:58:19 +00:00
Robert Shih
918dba59f1 GetDecryptHashSupport: recognize OEMCrypto_ERROR_NOT_IMPLEMENTED am: da09f4abca am: f240709ef2
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12036417

Change-Id: Ic83b03effbc60ba595e83b6348d4abd451b269eb
2020-07-06 23:57:56 +00:00
Robert Shih
2009155f7e GetDecryptHashSupport: recognize OEMCrypto_ERROR_NOT_IMPLEMENTED am: da09f4abca am: 0db8b90cdb
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12036417

Change-Id: I10bc5ae45c8f20f0a9b2349c6fa01b8aae0664ae
2020-07-06 23:57:44 +00:00
Robert Shih
f240709ef2 GetDecryptHashSupport: recognize OEMCrypto_ERROR_NOT_IMPLEMENTED am: da09f4abca
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12036417

Change-Id: Ifb1122df9b6098e0d7ce51a7522249693fe40fee
2020-07-06 23:40:18 +00:00
Robert Shih
0db8b90cdb GetDecryptHashSupport: recognize OEMCrypto_ERROR_NOT_IMPLEMENTED am: da09f4abca
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/12036417

Change-Id: Icc0b7bb24c4058de5786fc7e28a50bbc2aee5f4b
2020-07-06 23:39:43 +00:00
Robert Shih
da09f4abca GetDecryptHashSupport: recognize OEMCrypto_ERROR_NOT_IMPLEMENTED
[ Merge of http://go/wvgerrit/102383 ]

Bug: 153297118
Bug: 160182693
Test: MediaDrmTest#testDecryptHashError
Change-Id: I107668cdd1ab0acda717f184496e569a4f9a8653
2020-06-29 22:19:26 +00:00
Alex Dale
65211cab08 Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev am: c628c5aca2 am: 3adda0dfe1 am: b535120ccd
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11925460

Change-Id: I5b906c594c1c3292bdc5aaa20c2071ae56d912a6
2020-06-25 20:03:15 +00:00
Alex Dale
a5e30b73a3 Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev am: c628c5aca2 am: 62462f4ec5 am: 8453477daa
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11925460

Change-Id: Ic6505cf29342b745a3dfed0047d1e8503b6c6f38
2020-06-25 20:03:02 +00:00
Alex Dale
33c3fd9085 Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev am: c628c5aca2 am: 3adda0dfe1 am: 52901002a1
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11925460

Change-Id: I4091326a55cc8cb514971b2ea595b10e12f38294
2020-06-25 20:02:55 +00:00
Alex Dale
8453477daa Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev am: c628c5aca2 am: 62462f4ec5
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11925460

Change-Id: I46c0b2e57cedfdac19b622c9191e604c05301eeb
2020-06-25 19:50:16 +00:00
Alex Dale
b535120ccd Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev am: c628c5aca2 am: 3adda0dfe1
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11925460

Change-Id: I2bf4c438575cb22bd350bb9c364a2543f04423d3
2020-06-25 19:50:04 +00:00
Alex Dale
52901002a1 Merge "Test CDM sessions prevent multiple usage entries." into rvc-dev am: c628c5aca2 am: 3adda0dfe1
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11925460

Change-Id: I2c3237138f100970ab62dddb377122a980a211f1
2020-06-25 19:50:03 +00:00