Commit Graph

7140 Commits

Author SHA1 Message Date
Rahul Frias
b3a57e7375 Dump BCC on failed provisioning request
[ Merge of http://go/wvgerrit/168357  and http://go/wvgerrit/168177 ]

When we get an error from the provisioning server while
running a test, we should log extra provisioning
information.

Bug: 273990016
Test: GtsMediaTestCases
Change-Id: I44095261e07ae079c632873f254d8e6879bab8c3
2023-03-28 20:28:57 +00:00
Matt Feddersen
dbd5bd2a4d Update OPK v18 documentation
Merge from Widevine repo of http://go/wvgerrit/169050

- Update changelog
- Update copy parter files script to include linux port
- Update opk_partner_test script (used to make sure everything works out
  of the box) with third party dependencies, refactored downloads into
  a public setup.sh script
- Remove WTPI_BUILD_INFO from OPK makefiles and gyp files, since it is
  no longer needed
- Remove FILES.md since it is out of date and ree-sources.mk and
  tee-sources.mk satisfy the same purpose
- Add debug flag in comments for OP-TEE and Linux ports. As a hint for
  how to enable debug in OPK
- Remove oemcrypto_build_info.h since it is no longer needed. Move the
  XSTR macro it contained to oemcrypto_api_macros.h
- Add provisioning method macro to OPTEE and Linux build files to hint
  at how to build Prov 2 and Prov 4 using the same build files but
  different build-time values.

Merged from https://widevine-internal-review.googlesource.com/166219

Bug: 275264353
Test: luci tests
Change-Id: I220e3296f631d895a7c4504454635fe396efc0a4
2023-03-28 20:28:57 +00:00
Fred Gylys-Colwell
e51bb19296 Refresh corpus for oemcrypto fuzz tests with modified format
Merge from Widevine repo of http://go/wvgerrit/165958
and  http://go/wvgerrit/165862

Bug: 275264353
Test: test only code

Change-Id: I30829ad72d58e2233f4cc9963d17cb07314b7720
2023-03-28 20:28:57 +00:00
Ian Benz
c579a79462 Fix null passed to memcpy in generic verify fuzz
Merge from Widevine repo of http://go/wvgerrit/169048

Do not generate a new signature during mutation if a key handle cannot
be retrieved by OEMCrypto_GetKeyHandle().

Bug: 275264353
Test: luci tests
Change-Id: I9a804328c4b6d3e50d14c3f9c71043e71a88e3da
2023-03-28 20:28:57 +00:00
Fred Gylys-Colwell
322355dbbf Update documentation for Cast
Merge from Widevine repo of http://go/wvgerrit/169044

Document changes needed for supporting cast and provisioning
4.0 at the same time.

Bug: 259454830
Merged from https://widevine-internal-review.googlesource.com/166459

Change-Id: Iebf50d856c18f29db66352041b2b0429c43bd594
2023-03-28 20:28:57 +00:00
Fred Gylys-Colwell
9e7877a95d Document lacking signature of Prov 3.0 message
Merge from Widevine repo of http://go/wvgerrit/169039

Bug: 243734378
Merged from https://widevine-internal-review.googlesource.com/166458

Change-Id: I3eae16d09cf42e554d450f746390744ef580ac03
2023-03-28 20:28:57 +00:00
Alex Dale
85997c0ac0 Merge "Fixed test and log formatting for CdmResponseType." into udc-dev am: 5ed89d16e2
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22141214

Change-Id: Ib52efd43666b2624b63e41a352b59937985edde0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-28 19:42:41 +00:00
Alex Dale
5ed89d16e2 Merge "Fixed test and log formatting for CdmResponseType." into udc-dev 2023-03-28 19:21:20 +00:00
Cong Lin
3ace58cdaf Merge "Fix CSR in wv factory upload tool" into udc-dev am: b7280404bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22294062

Change-Id: I887c673683d3e55813d01a0f9a7ad3f6a3c76e13
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-28 18:19:58 +00:00
Kyle Zhang
ce1fb4f089 Integrate apex version info to Widevine CDM property
Bug: 272587114
Test: dumpsys android.hardware.drm.IDrmFactory/widevine -p
Change-Id: Ica99867511391c252b67f40162665380bd2d8740
2023-03-28 18:14:02 +00:00
Cong Lin
b7280404bd Merge "Fix CSR in wv factory upload tool" into udc-dev 2023-03-28 18:02:05 +00:00
Jooyung Han
95b76106f3 Set min_sdk_version for the Widevine APEX am: a4de7eb9b5
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22307320

Change-Id: Ia6acded434b5c5b8a1991c2063830545481da971
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-28 17:35:27 +00:00
Jooyung Han
a4de7eb9b5 Set min_sdk_version for the Widevine APEX
also remove `use_vndk_as_stable: true` to remove dependency to VNDK
libs.

Bug: 251299786
Test: build WV APEX with V and install it on U device
Change-Id: Ie7f7f9b699119478d4b33f95ab9e6ba7f459346c
2023-03-28 06:57:46 +00:00
Jooyung Han
91496be299 Link dependencies statically am: 81171a7e75
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22302466

Change-Id: I9651e2bbc54e911885e5cb1955653f4d9e397209
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-28 05:53:32 +00:00
Jooyung Han
81171a7e75 Link dependencies statically
This reduces the APEX size from 6754304 to 4378624.

Bug: 274818387
Test: m com.google.android.widevine
Test: adb install $OUT/vendor/apex/com.google.android.widevine.apex
Test: adb reboot
Change-Id: Ib31291e5ee35297b9d85120f5eca118ebf10f55f
(cherry picked from commit 78f0b81ece)
2023-03-27 23:43:17 +00:00
Cong Lin
6db1ae5167 Fix CSR in wv factory upload tool
Merge of https://widevine-internal-review.googlesource.com/c/cdm/+/169024

The CSR extracted by WV internal BCC extraction tool is missing a
field "unverifiedDeviceInfo". This is required by the RKP's device
uploading tool for the CSR to be accepted.

Also updated the size of the randomly generated challenge from 32 bytes
to 64 bytes, same as what is used by rpk_factory_extraction_tool.

Test: extracted CSR v2 and v3 and dry run uploading
Bug: 275075496
Change-Id: Icc776f810c81ac6589d82935950167925f95f906
2023-03-27 21:10:03 +00:00
Alex Dale
52bd76e0e2 Fixed test and log formatting for CdmResponseType.
[ Merge of http://go/wvgerrit/168397 ]

When CdmResponseType (enum) was transformed to CdmResponseType
(struct), the test printers where not updated to print the result
of failed comparisons.  In addition, several logs statements were
updated haphazardly, leaving inconsistencies and potential
compiler-specific behavior.

This CL replaces CdmResponseType std::string operator with a ToString()
method.  This is to make it consistent with Google's C++ style guide
on conversion operators vs methods.  The string conversion function is
now defined in wv_cdm_types.cpp instead of inline in the header file.

The PrintTo function has been implemented along with the other CDM
test printers in test_printers.cpp.

Bug: 273989359
Test: run_x86_64_tests
Test: MediaDrmParameterizedTests on redfin
Test: Forrest drm_compliance
Change-Id: Ibfaa17029046b75b1c8c278f7bd7e04a24379848
2023-03-27 11:21:45 -07:00
Fred Gylys-Colwell
4450b67c36 Remove some names am: bfa8d39a63
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22200007

Change-Id: Iee7d035c851d9892a8c254c7a4e433730b4adc89
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-27 04:34:53 +00:00
Fred Gylys-Colwell
bfa8d39a63 Remove some names
Merge from Widevine repo of http://go/wvgerrit/168657

Some people who have left were still in OWNERS files and TODOs.

Bug: 274772704
Test: comments only
Change-Id: I583da815586e5ca52316b2e238d1c1bb3a5e919a
2023-03-27 02:45:01 +00:00
Fred Gylys-Colwell
2de79a7ede Fix logging error type am: ab8c06906a
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/21649733

Change-Id: I315e84089536f0af41fcea33dee8ece4d2a630e5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-24 21:46:21 +00:00
Fred Gylys-Colwell
ab8c06906a Fix logging error type
Merge from Widevine repo of http://go/wvgerrit/166942

The error type is no longer an enumeration.

Bug: 271146682

Change-Id: I64f60fde94d1e8a586128a59f1455041622444b6
2023-03-23 16:23:43 +00:00
Alex Dale
333150ca8b Avoid null dereference with empty BCC strings. am: ce25b9d44c
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22162393

Change-Id: I1afa1444f8127ce1567bf61639bf3602dd6270ac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-22 22:22:34 +00:00
Alex Dale
ce25b9d44c Avoid null dereference with empty BCC strings.
[ Merge of http://go/wvgerrit/168482 ]

The function OEMCrypto_GetBootCertificateChain() does not always
provide an additional signature depending on the device.  However, the
CDM would still attempt to dereference the first character in the
additional signature buffer when empty.  This CL changes how the data
pointer to an output string is acquired.  Empty string will instead
pass in a null pointer.

Bug: 272643393
Test: run_prov40_tests
Test: atest GtsMediaTestCases
Change-Id: I10b0a3c7df4fc73272aa701bb01c60672645d4fc
(cherry picked from commit a878e7b98d)
2023-03-20 20:29:58 +00:00
TreeHugger Robot
00bac2ca3a Merge "Add Widevine lazy apex" into udc-dev am: 4e8c713f8b
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22105405

Change-Id: I46198f8179c58d460a46d635bc7cf62ee7f59998
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-18 04:55:44 +00:00
TreeHugger Robot
4e8c713f8b Merge "Add Widevine lazy apex" into udc-dev 2023-03-18 04:02:05 +00:00
Cong Lin
a3f6cc9206 Merge "Update Android L3 after entitled key session fix" into udc-dev am: 412e1bfa13
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/22101165

Change-Id: Ie0518f14ed21865a5be2273d85062f4742a5c977
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-16 19:02:21 +00:00
Cong Lin
412e1bfa13 Merge "Update Android L3 after entitled key session fix" into udc-dev 2023-03-16 18:18:09 +00:00
Alex Dale
ae70e78471 Merge "Add mutex to CdmEngine for use of cert_provisioning_." into udc-dev am: 7c213563ca
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/21921282

Change-Id: I37df08b5f2a1480baad403c034e5b1b5651dcc9c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-15 22:19:49 +00:00
Alex Dale
7c213563ca Merge "Add mutex to CdmEngine for use of cert_provisioning_." into udc-dev 2023-03-15 21:34:37 +00:00
Kyle Zhang
2be47ada77 Add Widevine lazy apex
Bug: 244498309
Test: m com.google.android.widevine.lazy
Change-Id: I226ae922e9ab7817353d3e94d509b9579c6551e1
2023-03-15 21:02:14 +00:00
Cong Lin
3dd24639b3 Update Android L3 after entitled key session fix
This is a merge of
https://widevine-internal-review.googlesource.com/c/cdm/+/168143

Original commit message:
Level3_RemoveEntitledKeySession(key_session) can be called when the
entitled key_session is already released by its entitlement session.
Do not return an error if the key_session to be removed is no longer
valid.

Test: run_dynamic_level3, oemcrypto unit tests on Pixel
Test: GTS media tests
Bug: 264688931
Change-Id: If0e0d0db2137c29e1dab4df321cf11ebcad2451f
2023-03-15 09:52:05 -07:00
Pete Bentley
5e72605159 Include hmac.h in test_base.cpp. am: 4247f72e79 am: 965a7f308d
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/21985924

Change-Id: Iadfc39b84f45215d889533904c13912e24dc9698
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-13 19:07:48 +00:00
Pete Bentley
965a7f308d Include hmac.h in test_base.cpp. am: 4247f72e79
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/21985924

Change-Id: I83c97a129c52454782e9d1641ec3fec5c36fb568
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-13 18:31:19 +00:00
Pete Bentley
4247f72e79 Include hmac.h in test_base.cpp.
Cherry-pick note: Compile fix only, needed for latest AOSP BoringSSL in tm-qpr-dev-plus-aosp and downstream branches, e.g. udc-*-dev.

Original change description:
Include what you use - this is no longer pulled in
by the other headers used in this file.

Bug: 272749540
Test: m
Change-Id: I0d4b480e47f84f367d1a9547b89811c52073a2fc
Merged-In: I0d4b480e47f84f367d1a9547b89811c52073a2fc
(cherry picked from commit c785e91ec3)
2023-03-13 10:44:08 +00:00
TreeHugger Robot
8928214a06 Merge "Adding ApexInfo utility" into udc-dev am: cb0d5e24be
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/21702626

Change-Id: I7dd39c8924e5455f365d47bbb619e098acec8de1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 07:01:46 +00:00
TreeHugger Robot
cb0d5e24be Merge "Adding ApexInfo utility" into udc-dev 2023-03-10 06:11:13 +00:00
Alex Dale
6e5ab021d8 Add mutex to CdmEngine for use of cert_provisioning_.
[ Merge of http://go/wvgerrit/167618 ]
[ PoC http://ag/21922303 ]

Bug: 258188673
Test: sts-tradefed run sts-dynamic-develop -m StsHostTestCases \
    -t android.security.sts.Bug_258188673
Test: GtsMediaTestCases
Change-Id: If71a0e7a81f376cf28688a590b6cb9dcea699545
2023-03-09 14:01:40 -08:00
Presubmit Automerger Backend
0aef7b0dd2 [automerge] Add mutex to CdmEngine for use of cert_provisioning_. 2p: 491dfe7690
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/21892284

Bug: 258188673
Change-Id: Id1ee612fa3efa0d9c001dba00d76ed137d1f9594
Merged-In: If71a0e7a81f376cf28688a590b6cb9dcea699545
2023-03-09 04:21:32 +00:00
Alex Dale
48bfaab32f Add mutex to CdmEngine for use of cert_provisioning_.
[ Merge of http://go/wvgerrit/167529 ]
[ PoC http://ag/21900113 ]

Bug: 258188673
Test: sts-tradefed run sts-dynamic-develop -m StsHostTestCases \
    -t android.security.sts.Bug_258188673
Test: GtsMediaTestCases
Change-Id: If71a0e7a81f376cf28688a590b6cb9dcea699545
Merged-In: If71a0e7a81f376cf28688a590b6cb9dcea699545
2023-03-08 20:19:44 -08:00
Alex Dale
491dfe7690 Add mutex to CdmEngine for use of cert_provisioning_.
[ Merge of http://go/wvgerrit/167500 ]
[ PoC http://ag/21891126 ]

Bug: 258188673
Test: sts-tradefed run sts-dynamic-develop -m StsHostTestCases \
    -t android.security.sts.Bug_258188673
Test: GtsMediaTestCases
Change-Id: If71a0e7a81f376cf28688a590b6cb9dcea699545
Merged-In: If71a0e7a81f376cf28688a590b6cb9dcea699545
2023-03-08 20:18:00 -08:00
Alex Dale
7129e9c7ec Add mutex to CdmEngine for use of cert_provisioning_.
[ Merge of http://go/wvgerrit/167337 ]
[ PoC http://ag/21737796 ]

Bug: 258188673
Test: sts-tradefed run sts-dynamic-develop -m StsHostTestCases \
    -t android.security.sts.Bug_258188673
Test: GtsMediaTestCases
Change-Id: If71a0e7a81f376cf28688a590b6cb9dcea699545
Merged-In: If71a0e7a81f376cf28688a590b6cb9dcea699545
2023-03-08 20:15:15 -08:00
Robert Shih
1c89cb3f1b Compact aidl exception message am: 3c9cbc6cbe
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/21874559

Change-Id: I29c9974f3a77433bed9a942137dec6c66f06b49a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-08 06:05:20 +00:00
Robert Shih
3c9cbc6cbe Compact aidl exception message
[ Merge of go/wvgerrit/c/cdm/+/167499 ]

Bug: 249941041
Change-Id: I81ce1ecef22bd87c6d879d1ccfd6874e9786f892
2023-03-07 19:08:02 +00:00
Edwin Wong
9874511eb0 [automerger skipped] Fixed race condition in closeSession am: 97bbc07174 am: 58513d031e -s ours am: b2203809a1 -s ours am: 10c9a1f4e6 -s ours am: c6aebda041 -s ours am: 4e4f786a0b -s ours am: ac68fb78b8 -s ours am: 2c4c12551f -s ours am: cedf65d414 -s ours am: 5552ec447f -s ours
am skip reason: Merged-In I298d3e0770ace9cd590dfaacaa4c52a0732c2fe3 with SHA-1 08acec9c3a is already in history

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

Change-Id: I9abbdd259bb95b6c94034684bf738fb6a41a3a5f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 06:09:56 +00:00
Edwin Wong
5552ec447f [automerger skipped] Fixed race condition in closeSession am: 97bbc07174 am: 58513d031e -s ours am: b2203809a1 -s ours am: 10c9a1f4e6 -s ours am: c6aebda041 -s ours am: 4e4f786a0b -s ours am: ac68fb78b8 -s ours am: 2c4c12551f -s ours am: cedf65d414 -s ours
am skip reason: Merged-In I298d3e0770ace9cd590dfaacaa4c52a0732c2fe3 with SHA-1 08acec9c3a is already in history

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

Change-Id: Ida2ee9374cb9ebd525f9cc230a75db283d24afe9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 05:48:54 +00:00
Edwin Wong
546c5c76de [automerger skipped] Fixed race condition in closeSession am: 97bbc07174 am: 58513d031e -s ours am: b2203809a1 -s ours am: 10c9a1f4e6 -s ours am: c6aebda041 -s ours am: 4e4f786a0b -s ours am: c28a938337 -s ours am: b8b30aadf7 -s ours
am skip reason: Merged-In I298d3e0770ace9cd590dfaacaa4c52a0732c2fe3 with SHA-1 08acec9c3a is already in history

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

Change-Id: I2c6af6d78aa2be6b9e40ddb712b830d86692339b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 05:14:56 +00:00
Edwin Wong
cedf65d414 [automerger skipped] Fixed race condition in closeSession am: 97bbc07174 am: 58513d031e -s ours am: b2203809a1 -s ours am: 10c9a1f4e6 -s ours am: c6aebda041 -s ours am: 4e4f786a0b -s ours am: ac68fb78b8 -s ours am: 2c4c12551f -s ours
am skip reason: Merged-In I298d3e0770ace9cd590dfaacaa4c52a0732c2fe3 with SHA-1 08acec9c3a is already in history

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

Change-Id: I3d65dea4740c81bdbb0636eef3fe19f505bf082e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 05:12:43 +00:00
Edwin Wong
2c4c12551f [automerger skipped] Fixed race condition in closeSession am: 97bbc07174 am: 58513d031e -s ours am: b2203809a1 -s ours am: 10c9a1f4e6 -s ours am: c6aebda041 -s ours am: 4e4f786a0b -s ours am: ac68fb78b8 -s ours
am skip reason: Merged-In I298d3e0770ace9cd590dfaacaa4c52a0732c2fe3 with SHA-1 08acec9c3a is already in history

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

Change-Id: I12431a19cc095ed11530745250a35566154ae078
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 04:41:11 +00:00
Edwin Wong
b8b30aadf7 [automerger skipped] Fixed race condition in closeSession am: 97bbc07174 am: 58513d031e -s ours am: b2203809a1 -s ours am: 10c9a1f4e6 -s ours am: c6aebda041 -s ours am: 4e4f786a0b -s ours am: c28a938337 -s ours
am skip reason: Merged-In I298d3e0770ace9cd590dfaacaa4c52a0732c2fe3 with SHA-1 08acec9c3a is already in history

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

Change-Id: I53a97374a687ed80ebbab6f4c82c6da9d8931de9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 04:38:09 +00:00
Edwin Wong
ac68fb78b8 [automerger skipped] Fixed race condition in closeSession am: 97bbc07174 am: 58513d031e -s ours am: b2203809a1 -s ours am: 10c9a1f4e6 -s ours am: c6aebda041 -s ours am: 4e4f786a0b -s ours
am skip reason: Merged-In I298d3e0770ace9cd590dfaacaa4c52a0732c2fe3 with SHA-1 08acec9c3a is already in history

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

Change-Id: I53a7ede31d47b3cb2c636c4a398b296575fb7e52
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 04:05:13 +00:00