Commit Graph

3733 Commits

Author SHA1 Message Date
Fred Gylys-Colwell
32b318e7c4 Unit test for loading nonce-free offline license am: a615671f48 am: ed900f242b
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11677947

Change-Id: Ie8a0e3ab425a263b07cf3a265f46ffb6aa11fc20
2020-06-02 22:01:32 +00:00
Fred Gylys-Colwell
2643b76731 Check for null pointers in oemcrypto adapter am: 42eb79a3ff am: 7a4313483c
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11677946

Change-Id: I17badea700bcf40780baf33787a496da1c5b67c9
2020-06-02 22:01:30 +00:00
Fred Gylys-Colwell
4b9e91eefd Update ODK Library to 16.3 am: 166b3e8403 am: 62802d8e10
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11699230

Change-Id: I736fcfe4c1f3347d7587bd83ba22e0f2ce71a71a
2020-06-02 22:01:28 +00:00
Fred Gylys-Colwell
c2920550ed ODK: forward compatibility and nonce-free offline license support am: 8dc1d7a11d am: 5bb396fb72
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11688972

Change-Id: Ia7a272da6d58ce201348782addb2a7d201b4ebda
2020-06-02 22:01:26 +00:00
Fred Gylys-Colwell
ed900f242b Unit test for loading nonce-free offline license am: a615671f48
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11677947

Change-Id: Ia129aba764568a853b6b89a7f35f902ef2068942
2020-06-02 21:49:22 +00:00
Fred Gylys-Colwell
7a4313483c Check for null pointers in oemcrypto adapter am: 42eb79a3ff
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11677946

Change-Id: I01d29869ce9f1ce6c252066cbb8f9b4f5286a5ef
2020-06-02 21:49:21 +00:00
Fred Gylys-Colwell
62802d8e10 Update ODK Library to 16.3 am: 166b3e8403
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11699230

Change-Id: I4d951b808e21128d8dbe4e0fafe4fd24b4753124
2020-06-02 21:49:19 +00:00
Fred Gylys-Colwell
5bb396fb72 ODK: forward compatibility and nonce-free offline license support am: 8dc1d7a11d
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/11688972

Change-Id: I61a70e52e875c017a706f1337d75405f19748dfa
2020-06-02 21:49:17 +00:00
Fred Gylys-Colwell
a615671f48 Unit test for loading nonce-free offline license
Merge from Widevine repo of http://go/wvgerrit/100964

The previous nonce-free test used the same session to generate the
request as to load the license. However, it is a realistic use case to
have a new session used for loading the license.

The use case relates to a pre-loaded, shared license.

Test: Ran unit tests on taimen and on v16 ref implementation
Bug: 156853321
Change-Id: Ibc07744a16edcd3952d88d73660a75d0c3e8eeb8
2020-06-02 08:30:34 -07:00
Fred Gylys-Colwell
42eb79a3ff Check for null pointers in oemcrypto adapter
Merge from Widevine repo of http://go/wvgerrit/100963

Test: unit tests on taimen
Bug: 156967805
Change-Id: Ic8ba7461ffcaa371a5239dca84e8a3007b0df517
2020-06-02 08:30:34 -07:00
Fred Gylys-Colwell
166b3e8403 Update ODK Library to 16.3
Merge from Widevine repo of http://go/wvgerrit/101130

https://cr/314253512
ODK Library: roll version number to 16.3

https://cr/314253425
ODK Library: Accept release request as renewal request

To support forward compatibility, the v16 server should parse a
release request as a renewal request.

https://cr/314213725
ODK: Accept larger message sizes

The ODK should accept a message size that is larger than the
current
API requires. This allows for future API versions to append
fields to
a message that current the current license SDK will
ignore.

https://cr/313962712
ODK: accept messages with future API version numbers

This CL updates the ODK parse functions to accept future versions
of
the message. This will allow a v16 server to talk to a v17
device.

https://cr/313814938
ODK Version String

Add an automatically generated version string to odk_structs.h

Bug: 157030231
Bug: 157512150
Bug: 157822248
Bug: 157512322
Test: unit tests on taimen
Change-Id: I346f73c41bc984fe17856d3b61cd08cf92b39919
2020-06-02 08:30:34 -07:00
Fred Gylys-Colwell
8dc1d7a11d ODK: forward compatibility and nonce-free offline license support
Merge of http://go/wvgerrit/101183

This is a combination of multiple commits from google3:
* http://cl/313814938
  ODK Version String
* http://cl/313962712
  ODK: accept messages with future API version numbers
* http://cl/312219187
  Ignore hash if initial load of license, and the nonce not required
  (squashed into http://cl/313962712)

Test: OEMCryptoLicenseTest.LoadKeyWithNoRequest
Bug: 157822248
Bug: 156853321
Change-Id: I735d355241876bddb0c52440b0049efb72a4b26f
2020-06-01 19:13:32 +00:00
Automerger Merge Worker
af5d4ff666 Merge "Merge "Fix implicit type conversion issue in ODK" into rvc-dev am: c34e2af181 am: 4f895ec8ec" into rvc-d1-dev-plus-aosp 2020-05-30 03:31:16 +00:00
Cong Lin
9b0efc6683 Merge "Fix implicit type conversion issue in ODK" into rvc-dev am: c34e2af181 am: 4f895ec8ec
Change-Id: Ibbbc2672752ac6b7be5ad51759511b0b38bdeaff
2020-05-30 03:31:12 +00:00
Cong Lin
5f76c56c05 Merge "Fix implicit type conversion issue in ODK" into rvc-dev am: c34e2af181 am: f5e7afe51d
Change-Id: I78cc8e8b91563d320e8cbb185c83650dc4caee4f
2020-05-30 03:31:11 +00:00
Cong Lin
f5e7afe51d Merge "Fix implicit type conversion issue in ODK" into rvc-dev am: c34e2af181
Change-Id: I3c00810baef5c538b655c8af58243723e228959b
2020-05-30 03:13:51 +00:00
Cong Lin
4f895ec8ec Merge "Fix implicit type conversion issue in ODK" into rvc-dev am: c34e2af181
Change-Id: Idcdbf54471e640b79a9af2a924b139d1c5def0f5
2020-05-30 03:13:36 +00:00
Cong Lin
c34e2af181 Merge "Fix implicit type conversion issue in ODK" into rvc-dev 2020-05-30 02:56:31 +00:00
John Bruce
10283634b1 Merge "OEMCrypto Unit Test Fix: Do Not Derive Keys Immediately" into rvc-dev am: 729723b3d2 am: ec894e1bce
Change-Id: Ide72822e741b0a6c736ac00d39ebd0e6fd9bcf56
2020-05-29 23:57:09 +00:00
John Bruce
698b36b263 Merge "OEMCrypto Unit Test Fix: Do Not Derive Keys Immediately" into rvc-dev am: 729723b3d2 am: b349680d3f
Change-Id: I3b54a66197769dffa7d78030a9c79f673a426f7b
2020-05-29 23:56:58 +00:00
John Bruce
b349680d3f Merge "OEMCrypto Unit Test Fix: Do Not Derive Keys Immediately" into rvc-dev am: 729723b3d2
Change-Id: I72df59375a2c05e47978abc37418ebc69f308bdc
2020-05-29 23:40:52 +00:00
John Bruce
ec894e1bce Merge "OEMCrypto Unit Test Fix: Do Not Derive Keys Immediately" into rvc-dev am: 729723b3d2
Change-Id: I1e4a4c7c54e24f4f754cbe1ef6b5ec7c665dd509
2020-05-29 23:40:49 +00:00
John Bruce
729723b3d2 Merge "OEMCrypto Unit Test Fix: Do Not Derive Keys Immediately" into rvc-dev 2020-05-29 23:26:50 +00:00
Cong Lin
69e7e21882 Fix implicit type conversion issue in ODK
Merging CL
https://widevine-internal-review.googlesource.com/c/cdm/+/100924 Fix implicit type conversion issue in ODK

1. Implicit cast is reported as error when compiling ODK with Level3
2. Override odk_add_overflow_xxx function with the built in functions can cause
redefinition issue when compiling Level3; Let's use odk customized overflow functions.

Bug: b/157510403
Test: ODK unittests and CDM unittests passed.
Change-Id: Ieef8ccfb41d08007ec72f4a061f92968e55539cb
2020-05-29 10:07:08 -07:00
Alex Dale
e8cfec7c67 Rolled expected version number for R. am: dd70d63b76 am: 3316ea8c53
Change-Id: I66a5a56e3c11a86f82e920d20e309c852d3179e8
2020-05-27 21:44:10 +00:00
Alex Dale
7eb1c2b619 Rolled expected version number for R. am: dd70d63b76 am: 9329bf331c
Change-Id: Idc9fe4cee6699c6d35c828f4c4fa0075f3ccfaa2
2020-05-27 21:44:02 +00:00
Alex Dale
3316ea8c53 Rolled expected version number for R. am: dd70d63b76
Change-Id: I0e80a32a474d0e0229ef3b1f73ff06c4f60d785f
2020-05-27 21:25:03 +00:00
Alex Dale
9329bf331c Rolled expected version number for R. am: dd70d63b76
Change-Id: Id8ddfa7e676b57eb0ab8261d166dd0cf8901a458
2020-05-27 21:24:39 +00:00
Alex Dale
dd70d63b76 Rolled expected version number for R.
[ Merge of http://go/wvgerrit/100403 ]

VersionNumberTest.VersionNumberChangeCanary was expecting a version
string of "R".  However, Android rvc branch is now far enough into
development to use a numbered version: version "11".

Bug: 156853733
Test: Android license request test
Change-Id: I63d33f742c849b672b2d2402ab8423fdf2450f6f
2020-05-27 17:27:46 +00:00
TreeHugger Robot
549a259ef9 Merge "The Entitlement key map was not being cleaned up." into rvc-dev am: bd8e573e0c am: a22fc9fa8e
Change-Id: I3a1441864c20a2aa34363ad29604b9af94e4dce1
2020-05-27 04:17:38 +00:00
Automerger Merge Worker
a0eb7bfe04 Merge "Merge "Start playback timer in integration tests" into rvc-dev am: 7534d9795b am: 089fe5d90b" into rvc-d1-dev-plus-aosp 2020-05-27 04:17:36 +00:00
TreeHugger Robot
e3a6cee1ed Merge "Start playback timer in integration tests" into rvc-dev am: 7534d9795b am: 089fe5d90b
Change-Id: I1eddafa565b76b571a54dfacb96e02b8049cdc33
2020-05-27 04:17:33 +00:00
TreeHugger Robot
fbd9ca7eca Merge "The Entitlement key map was not being cleaned up." into rvc-dev am: bd8e573e0c am: 5bedd9c4ad
Change-Id: I0114b7dd12054575199c5eeb021617842f1d5b4a
2020-05-27 04:17:32 +00:00
TreeHugger Robot
3889252bfc Merge "Start playback timer in integration tests" into rvc-dev am: 7534d9795b am: 208a088e8e
Change-Id: I174696645e9885044023ad9177fcc6780d928178
2020-05-27 04:17:20 +00:00
TreeHugger Robot
a22fc9fa8e Merge "The Entitlement key map was not being cleaned up." into rvc-dev am: bd8e573e0c
Change-Id: Ifdefc4babbdef591b73c0afb7a76035148657523
2020-05-27 04:00:57 +00:00
TreeHugger Robot
5bedd9c4ad Merge "The Entitlement key map was not being cleaned up." into rvc-dev am: bd8e573e0c
Change-Id: I992d0c2d9da83a6d192a019b1fca2c1b774bad92
2020-05-27 04:00:54 +00:00
TreeHugger Robot
089fe5d90b Merge "Start playback timer in integration tests" into rvc-dev am: 7534d9795b
Change-Id: If61e903fb3b32cb9cf610511c07585eeb942f157
2020-05-27 04:00:28 +00:00
TreeHugger Robot
208a088e8e Merge "Start playback timer in integration tests" into rvc-dev am: 7534d9795b
Change-Id: I9e2aadbdbfa628e5987df9ea780c85f8a64e7b86
2020-05-27 04:00:22 +00:00
TreeHugger Robot
bd8e573e0c Merge "The Entitlement key map was not being cleaned up." into rvc-dev 2020-05-27 03:43:48 +00:00
TreeHugger Robot
7534d9795b Merge "Start playback timer in integration tests" into rvc-dev 2020-05-27 03:43:30 +00:00
John W. Bruce
b8e13cec2d OEMCrypto Unit Test Fix: Do Not Derive Keys Immediately
(This is a merge of http://go/wvgerrit/100053.)

The OEMCrypto Unit Tests were previously deriving keys from the session
key as part of loading the test RSA key. This creates an invalid
function call order, since the OEMCrypto session will likely next be
used for actions that need to be done *before* deriving these keys. With
ODKiTEE, which is more strict about this order, all OEMCrypto tests were
failing.

Bug: 156655072
Test: OEMCrypto Unit Tests
Change-Id: Ibfede587da30cfff4a44a5e0687e4199b1430372
2020-05-27 01:19:48 +00:00
Fred Gylys-Colwell
0a165bbf44 Update TimeRollbackPrevention unit test am: 75575418d0 am: d22ef11122
Change-Id: Ia251d06305a373715303be4c315401552e8d44f9
2020-05-21 22:41:23 +00:00
Fred Gylys-Colwell
51cf7e4668 Update TimeRollbackPrevention unit test am: 75575418d0 am: 7cd14be01d
Change-Id: Ifc0acc1b95a25f071bafdaf6474bdadfe594a483
2020-05-21 22:41:00 +00:00
Fred Gylys-Colwell
d22ef11122 Update TimeRollbackPrevention unit test am: 75575418d0
Change-Id: I1a0345208fcbce3a03798d9641725a67f218ea6f
2020-05-21 22:29:15 +00:00
Fred Gylys-Colwell
7cd14be01d Update TimeRollbackPrevention unit test am: 75575418d0
Change-Id: I3c6e54676e35581d0dfa255e230b7b4094f783bb
2020-05-21 22:29:14 +00:00
Fred Gylys-Colwell
75575418d0 Update TimeRollbackPrevention unit test
Merge from Widevine repo of http://go/wvgerrit/100110

The unit test TimeRollbackPrevention was broken for several
reasons. This CL reduces the test to its most basic functionality and
updates it to be compatible with a v16 oemcrypto.

This CL also adjusts the fake clock used by the buildbot to fake
sleeping backwards, so that the TimeRollbackPrevention test can also
be run on the buildbot.

Bug: 155773482
Bug: 79422351
Test: unit tests on buildbot, and on flame w/v16 modmock
Change-Id: I3027018b17b738281989e63ae6b0729757217d05
2020-05-20 13:47:28 -07:00
Fred Gylys-Colwell
e9dfca1219 The Entitlement key map was not being cleaned up.
Merge from Widevine repo of http://go/wvgerrit/100385

The map now contains unique_ptr instead of raw pointers
to ensure the memory is released.

Bug: 156780432 OEMCrypto Fuzzing: Fix OEMCrypto Memory Leak.
Test: oemcrypto reference code only
Change-Id: I78054f9207399f052d6e4bfdfa96824f6e050bac
2020-05-19 10:58:05 -07:00
Fred Gylys-Colwell
f6229788b0 Start playback timer in integration tests
Merge from Widevine repo of http://go/wvgerrit/100328

Several integration tests in WvCdmRequestLicenseRollbackTest had been
testing the duration of a license. However, the license they request
sets the playback duration and not the rental duration. That means the
timer we are checking does not start until the first playback. To fix
the tests, we simply add a decrypt operation right after the license
is received.

Test: integration tests w/v16 mod mock.
Bug: 156854660
Change-Id: Ie4f017c82db8aaf084ad050de3fcb7f51987c97e
2020-05-18 20:57:41 +00:00
Fred Gylys-Colwell
7ed988ef1f License release does not use core message am: 760bf71908 am: 75cae91c79
Change-Id: I1aedd3a72479940d8a35d96f13e3c91031abf712
2020-05-14 22:05:45 +00:00
Fred Gylys-Colwell
fa074ccc04 License release does not use core message am: 760bf71908 am: 98ca694dcd
Change-Id: I303f3b4d8893f9d99f34f7db118588a7c433ed25
2020-05-14 22:05:22 +00:00