Commit Graph

6068 Commits

Author SHA1 Message Date
John W. Bruce
7992650ff6 Add "Model Year" to list of CDM identification properties
(This is a merge of http://go/wvgerrit/138969.)

Provisioning 4.0 on CE CDM requires not only the make & model but the
model year in order to relate a device back to its system ID. This patch
adds model year to the list of properties that partners must provide as
client identification.

As no equivalent field exists for Android, this property is not
provided on Android platforms.

Bug: 206453352
Test: x86-64
Change-Id: I0764d67fec54fa9a0c65074e68f3ee02de1e7820
2021-11-17 16:53:34 -08:00
Rahul Frias
9067a53892 Merge "Update Version number" 2021-11-17 10:36:38 +00:00
Alex Dale
4d219ef217 Merge "Added new error code OEMCrypto_ERROR_INVALID_KEY." 2021-11-17 05:11:42 +00:00
Rahul Frias
1592da96f3 Update Version number
[ Merge of http://go/wvgerrit/138149 ]

Update the android version number test to "12L"

Bug: 205491167
Test: wv unit/integration tests
Change-Id: If11e7c6f3a89263ab78d274aa8d776991d3942e9
2021-11-12 16:33:59 -08:00
TreeHugger Robot
9e72c70966 Merge "Restore by_exception_only comments." 2021-11-12 23:45:13 +00:00
Bob Badour
9bcf92dc35 Restore by_exception_only comments.
Required per https://opensource.google/docs/thirdparty/licenses/#ByExceptionOnly

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m nothing

Change-Id: I45be3e01c44bd053f4c60e8a84945e7d16e88481
2021-11-12 14:44:47 -08:00
TreeHugger Robot
5cf3a1c2c0 Merge "Fix -Wshorten-64-to-32 errors in test code" 2021-11-12 20:28:16 +00:00
TreeHugger Robot
5d41a77815 Merge "Fix -Wshorten-64-to-32 errors in Haystack" 2021-11-12 20:27:47 +00:00
Bob Badour
2d26368b73 Merge "[LSC] Add LOCAL_LICENSE_KINDS to vendor/widevine" 2021-11-12 14:32:51 +00:00
TreeHugger Robot
0cf4748512 Merge "Added numeric value guards to ValueMetric." 2021-11-12 05:42:43 +00:00
TreeHugger Robot
92e57b8ca7 Merge "Updated metric Distribution and Timer utils." 2021-11-12 05:41:42 +00:00
Rahul Frias
693874b9a1 Update Version number am: 0aa9b47b03 am: d44e6b2ff3
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16221418

Change-Id: I5af4bd2baf8af8a0702f8a13c6750f1d87120cf3
2021-11-12 05:03:29 +00:00
Rahul Frias
d44e6b2ff3 Update Version number am: 0aa9b47b03
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16221418

Change-Id: Ia23642271cbe27a4fd86ec4bb64d313e8acb270a
2021-11-12 04:47:17 +00:00
Bob Badour
42d6898539 [LSC] Add LOCAL_LICENSE_KINDS to vendor/widevine
Added legacy_by_exception_only to:
  libwvdrmengine/mediacrypto/Android.bp
  libwvdrmengine/mediadrm/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: I5897dd189cdafc5af86210236fa8468bfb27fd6e
2021-11-12 04:29:24 +00:00
Alex Dale
59f0f7cd36 Added new error code OEMCrypto_ERROR_INVALID_KEY.
[ Merge of http://go/wvgerrit/138606 ]

The new error code OEMCrypto_ERROR_INVALID_KEY is to replace the now
deprecated error code OEMCrypto_ERROR_INVALID_RSA_KEY.  This error code
serves the same purpose of OEMCrypto_ERROR_INVALID_RSA_KEY, but may be
appied to RSA, ECC and Twisted-Edward ECC keys.  In general, this error
code is to indicate that a key is poorly formatted / unparsable, used in
an operation without allow permissions, or used in an operation that it
cannot be association (RSA signing with an ECC key).

Going forward, new OEMCrypto implementation should use
OEMCrypto_ERROR_INVALID_KEY in place of OEMCrypto_ERROR_INVALID_RSA_KEY.
The CDM will continue to support both error codes.

Bug: 201581141
Test: Testbed unit tests
Change-Id: I2cf1af33a9a1d8716eec4cc63bba52d2f4af4c1b
2021-11-11 20:25:31 -08:00
TreeHugger Robot
71e9c3cef3 Merge "Removing Non-HIDL Widevine DRM Plugin for Android" 2021-11-11 22:56:30 +00:00
TreeHugger Robot
0b02296014 Removing Non-HIDL Widevine DRM Plugin for Android
[ Merge of http://go/wvgerrit/138089 ]

Non-hidl code is no longer needed in the widevine android plugin. By
doing work this cleanup will save the team from having to keep
maintaining code that isn't needed anymore.
Clean up steps taken as follows:
    1. Remove non-hidl code but keep commonly used code
    2. Remove legacy test code
    3. Remove legacy test build and test entry

Bug: 69573078
Bug: 172285246
Test: unit tests, GtsMediaTestCases, CtsMediaDrmTestCases
Change-Id: I75938d69413c631ef6be82da3d885ba173efc581
2021-11-11 02:06:15 +00:00
John W. Bruce
c45559177a Fix -Wshorten-64-to-32 errors in test code
(This is a merge of http://go/wvgerrit/134316.)

This patch fixes code that would trigger -Wshorten-64-to-32 by
implicitly narrowing a variable from 64 to 32 bits. Most of the time, it
does this by making the implicit conversion explicit. Occasionally,
where it makes sense, it does this by expanding the code to operate on a
64-bit value.

This patch removes LicenseKeysTest::NumContentKeys(), which no one was
using, as all the tests access content_key_count_ directly.

Bug: 194971260
Test: x86-64
Change-Id: Iae7685c10b9db989253b349cab693728b438798d
2021-11-10 16:16:47 -08:00
John W. Bruce
0c7db1a836 Fix -Wshorten-64-to-32 errors in Haystack
(This is a merge of http://go/wvgerrit/134424.)

This patch fixes code that would trigger -Wshorten-64-to-32 by
implicitly narrowing a variable from 64 to 32 bits. The membarrier
functions have their return type expanded so they can report the full
return value of the syscall.

Bug: 194971260
Test: x86-64
Change-Id: I5d948162b1f3f1540288df9494cabda39ecf8905
2021-11-10 16:10:54 -08:00
Rahul Frias
0aa9b47b03 Update Version number
[ Merge of http://go/wvgerrit/138289 and http://go/ag/16210935 ]

Update the android version number test to accept "12" or "12L"

Bug: 205491167
Test: wv unit/integration tests
Change-Id: If11e7c6f3a89263ab78d274aa8d776991d3942e9
2021-11-09 16:41:40 -08:00
Alex Dale
08c703a7b8 Added numeric value guards to ValueMetric.
[ Merge of http://go/wvgerrit/137951 ]

ValueMetric was not checking whether certain unsigned types will
overflow when casted to protobuf's signed int64 type.  This CL
adds a max value to prevent potential overflows.

The value metric has also been updated to an emum to represent its
possible three state, as opposed to using two boolean flags.  For basic
value metrics, this saves about 4 bytes of space.  This works out to
being ~100 bytes per crypto session, ~20 bytes per CDM session and ~20
bytes per engine metrics.

Bug: 204946540
Test: Metric unit tests
Change-Id: I688bece8f31cccaf2a25bd8f99d9b080b0efd0de
2021-11-08 14:52:29 -08:00
Alex Dale
b6c93683db Merge changes I78f839fa,Ibd68db73
* changes:
  Updated copyright notice and cleaned up includes.
  Ran clang-format on the metrics directory.
2021-11-05 23:44:25 +00:00
Alex Dale
f5759c5149 Updated metric Distribution and Timer utils.
[ Merge of http://go/wvgerrit/137811 ]

Renamed TimerMetric to Timer.  Timer is used to generate durations
included in metrics, but is not a metric itself.  The method of
getting the current time did not require creating an instance of
std::steady_clock.

Updated Distribution and Timer to use default initializers instead of
constructor initialization list.

Bug: 204946540
Test: Metric unit tests
Change-Id: I7ed291b586347dd0b7ab305960883bec04637315
2021-11-05 15:12:09 -07:00
TreeHugger Robot
281bc8322b Merge "Add timestamp when socket times out" 2021-11-05 04:37:52 +00:00
TreeHugger Robot
283e71ae50 Merge "Update fuzz tests" 2021-11-05 04:00:23 +00:00
TreeHugger Robot
eb3d25127a Merge "Added an oemcrypto test for OPK versioning" 2021-11-05 03:41:07 +00:00
Alex Dale
1b95db51f1 Updated copyright notice and cleaned up includes.
[ Merge of http://go/wvgerrit/137810 ]

Bug: 204946540
Test: Metric unit tests
Change-Id: I78f839fafd27604a2bb78c04d587c40919c5372d
2021-11-03 17:28:00 -07:00
Alex Dale
21a021e800 Ran clang-format on the metrics directory.
[ Merge of http://go/wvgerrit/137809 ]

Bug: 204946540
Test: Metric unit tests
Change-Id: Ibd68db73ea9ee64664d33c2cb8e8bb7c56674c27
2021-11-03 17:24:34 -07:00
TreeHugger Robot
2046fc05fa Merge "Fix -Wshorten-64-to-32 error in metrics code" 2021-10-29 18:09:45 +00:00
TreeHugger Robot
1745fbd903 Merge "Make implicit 64-to-32-bit conversions in core_message_serialize.cpp explicit" 2021-10-29 18:09:25 +00:00
TreeHugger Robot
5cdaeab03e Merge "ODK: Fix a few implict type conversion issues" 2021-10-29 18:08:25 +00:00
Alex Dale
dd0b840b91 Clear OTA keybox flag. am: f5e4c94e26 am: 544299db8b
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16094844

Change-Id: I14e4a4f7df36f2c7d2f00e31423250bff370ff30
2021-10-28 17:18:21 +00:00
Alex Dale
5c387ed836 Added debugOtaKeyboxFallbackDuration property. am: 8b12e5acc9 am: 90f7296a4e
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16096276

Change-Id: I1e2103a2a3dcfa513be3e6803ebc7b786f846ee2
2021-10-28 17:18:21 +00:00
Alex Dale
08e7383ad4 Update fallback policy for fast fallback. am: 28b45c4f1b am: 596363ef9e
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16096533

Change-Id: Ifd8e70f097345d9d17f2c96e7bdd0415fea62ca5
2021-10-28 17:18:20 +00:00
Fred Gylys-Colwell
ec631db9a0 [automerger skipped] Update OTA Keybox tests am: eb846100d4 am: cc67284f44 -s ours
am skip reason: Merged-In I48a3771bf5fd4aae8d262b8c7bf42f004d9b9f4c with SHA-1 d92c9b9bd2 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16058124

Change-Id: I1403023307204ace0d23fed47b4602c02572b629
2021-10-28 17:18:19 +00:00
Fred Gylys-Colwell
008aa7f4d7 Correct build error in non-hidl WVDrmPlugin am: 80463a0eea am: 017e6dabce
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16058123

Change-Id: Ifa4843400a50dd90d5750d1bcd7ec376c7d1bd61
2021-10-28 17:18:19 +00:00
Fred Gylys-Colwell
56fbf9e681 [automerger skipped] Use MediaDrm property to ignore installed keybox am: c21b756451 am: 220f1e750e -s ours
am skip reason: Merged-In Ie7d34a8b355398855f4ec43dd95dd73c5907bdeb with SHA-1 938bc7bbad is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16058122

Change-Id: I55f5c002d2f84e8c732eb14bd60d1847d3a6f4ba
2021-10-28 17:18:18 +00:00
Alex Dale
c996df5742 [automerger skipped] Formatted OTA keybox function comments. am: 5975b4e70a am: deb174cef5 -s ours
am skip reason: Merged-In Ia45dc9d727a2a904170912193709cd9416b8fe27 with SHA-1 9f2364cefd is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16058121

Change-Id: I455cb3404ba5faf1bb5f5677f7730266ba881c43
2021-10-28 17:18:17 +00:00
Rahul Frias
4ca4bcbc52 [automerger skipped] Assume Keybox provisioning type if OTA Keybox is supported. am: 581aa1702b am: 2243801d83 -s ours
am skip reason: Merged-In Ie7753546e53fc73fd59803958e88edf416ee5336 with SHA-1 e13c051129 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16058120

Change-Id: I995aa8606be5e0e1e9ad9ea4079ae8e005ba198e
2021-10-28 17:18:17 +00:00
Fred Gylys-Colwell
28bf1d2a11 [automerger skipped] Updates to OTA Keybox Reprovisioning am: a3166eb2ba am: f114219345 -s ours
am skip reason: Merged-In I41ff819a1fd8aca2e20adb25127fa0d9c4879b01 with SHA-1 7397f77343 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16058119

Change-Id: I2f7f72752d2a7cff2649be738adc0c0cec112033
2021-10-28 17:18:16 +00:00
Rahul Frias
bd521b31a3 [automerger skipped] Wrapped OKP info into several classes. am: 39558526f6 am: f19130a23c -s ours
am skip reason: Merged-In Ia572a66a7b73479355758aa3d0c682691eaca0fc with SHA-1 6afcbab5cf is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16058118

Change-Id: I8695502f560bd989b0e18d552472ed7cd982743d
2021-10-28 17:18:15 +00:00
Rahul Frias
1b27e70f9c [automerger skipped] Added an OTA keybox provisioner. am: 52bd1d206e am: 54fc6edf0d -s ours
am skip reason: Merged-In I6aafb4f2164efe69bc733ece0a912f0e91893b91 with SHA-1 3acc64a478 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16058117

Change-Id: I9f1614e0fa4f5d8d4e599e6afadd02452bf2c10f
2021-10-28 17:18:15 +00:00
Fred Gylys-Colwell
eb84b1f763 [automerger skipped] Use local provisioning server am: 44ba42f5cc am: 556940237f -s ours
am skip reason: Merged-In Ide9533943125aa13b8899b652b118a0b410c882c with SHA-1 bac33dbc6e is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16058116

Change-Id: I12d23b7b902ad8b47833dc6645aa67a0c2b7814d
2021-10-28 17:18:14 +00:00
Alex Dale
544299db8b Clear OTA keybox flag. am: f5e4c94e26
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16094844

Change-Id: Id8a110c13e2aed574ec1fd7641d4f0fc24ad382d
2021-10-28 17:02:17 +00:00
Alex Dale
90f7296a4e Added debugOtaKeyboxFallbackDuration property. am: 8b12e5acc9
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16096276

Change-Id: Id74a39aabd42272673de9bbd3efa672c0c609015
2021-10-28 17:02:16 +00:00
Alex Dale
596363ef9e Update fallback policy for fast fallback. am: 28b45c4f1b
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16096533

Change-Id: Ibf2e7e04c28251bf0918db98093d0a6a5191628e
2021-10-28 17:02:16 +00:00
Fred Gylys-Colwell
cc67284f44 Update OTA Keybox tests am: eb846100d4
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16058124

Change-Id: I9000ab12e582e2b1ec8992b70ab6a9c883f1a836
2021-10-28 17:02:15 +00:00
Fred Gylys-Colwell
017e6dabce Correct build error in non-hidl WVDrmPlugin am: 80463a0eea
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16058123

Change-Id: Ibfba7d0ec38fb2ddc9b46b4821f34b9c28f9c9f3
2021-10-28 17:02:15 +00:00
Fred Gylys-Colwell
220f1e750e Use MediaDrm property to ignore installed keybox am: c21b756451
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16058122

Change-Id: Icc1025c0e78ffbc677f17621ad028f27cd565bf0
2021-10-28 17:02:15 +00:00
Alex Dale
deb174cef5 Formatted OTA keybox function comments. am: 5975b4e70a
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/16058121

Change-Id: I4ac7640a58bbb4f3add632759a7b5c59a2c7f3fc
2021-10-28 17:02:14 +00:00