Commit Graph

5704 Commits

Author SHA1 Message Date
Robert Shih
92ff004556 Merge "libwvhidl: map errors to PROVISIONING_REQUEST_REJECTED" into sc-dev am: 6c03986218
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13756452

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia2db6beef77be11e30fab636740f5f380eb165b7
2021-03-07 06:40:24 +00:00
Robert Shih
6c03986218 Merge "libwvhidl: map errors to PROVISIONING_REQUEST_REJECTED" into sc-dev 2021-03-07 06:01:18 +00:00
android-build-team Robot
7abe409fca Snap for 7189863 from 24102741e6 to tm-release
Change-Id: I41f8eb6f920f568949df1237e9dd3358ef3faa24
2021-03-07 02:17:49 +00:00
android-build-team Robot
bcdece7788 Snap for 7188507 from 7e355910a8 to tm-release
Change-Id: Ifa863a59baec394f2f12c8c1fa20ff0575739e1b
2021-03-06 05:28:02 +00:00
Alex Dale
236a15fe9f Merge "Map CERT_PROVISIONING_RESPONSE_ERROR_9 to HAL status." into sc-dev am: bb2e41adfd
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13692447

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idb21a21f5fc1dd4b6c41cf907cbbba8e6cf30db8
2021-03-06 02:15:08 +00:00
Alex Dale
24102741e6 Merge "Map CERT_PROVISIONING_RESPONSE_ERROR_9 to HAL status." into sc-dev am: bb2e41adfd
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13692447

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iec769c3caedd5d677b52907e5846ca5089694a8b
2021-03-06 02:14:44 +00:00
Alex Dale
bb2e41adfd Merge "Map CERT_PROVISIONING_RESPONSE_ERROR_9 to HAL status." into sc-dev 2021-03-06 01:51:03 +00:00
Alex Dale
7e355910a8 Wrapped OEMCrypto RSA key operations. am: 7a46bc3c87
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13619897

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1ad4d61a21319c403ab8b1a29414736cd9e7ba26
2021-03-05 05:10:29 +00:00
Alex Dale
8668df5cb0 Wrapped OEMCrypto RSA key operations. am: 7a46bc3c87
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13619897

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I17a4a82273b517bbc344944dd272343d01ae3436
2021-03-05 05:09:45 +00:00
Alex Dale
ae11b8fea0 Added unittests for reference ECC implementation. am: c42782f6d3
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13619896

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I38344dffa35b397787af2c955964c9a758cd3b2a
2021-03-05 04:27:14 +00:00
Alex Dale
a47e5bb5d9 Added unittests for reference ECC implementation. am: c42782f6d3
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13619896

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I84681dc5718caf500d92eec197fbdbe08f8cee1d
2021-03-05 04:25:26 +00:00
Alex Dale
7a46bc3c87 Wrapped OEMCrypto RSA key operations.
[ Merge of http://go/wvgerrit/115545 ]

This change wraps the RSA key in a public and private key class that is
similar to how ECC keys are wrapped.

This new wrapper replaces deprecated OpenSSL/BoringSSL RSA signing and
signature verification API and uses the generic key digest context for
RSASSA-PSS signatures.

Bug: 135283522
Test: Future CL
Change-Id: Ifff649a3abcca127cc539f937c429c7da8acdcc6
2021-03-03 20:25:46 -08:00
Alex Dale
c42782f6d3 Added unittests for reference ECC implementation.
[ Merge of http://go/wvgerrit/114284 ]

The unittests check that the ECC keys are being created as expected
and that they can perform their basic operations.

Bug: 135283522
Test: oemcrypto_unittests
Change-Id: I1bdb26421ba47e1ab135f5ce5a54da304627a7c3
2021-03-03 20:25:36 -08:00
android-build-team Robot
f4cb35607e Snap for 7183434 from 74eb71ecab to tm-release
Change-Id: Ib7b9336497aada0595e9e8946f730b28f0de7b7b
2021-03-04 04:18:02 +00:00
Robert Shih
23182c9404 libwvhidl: map errors to PROVISIONING_REQUEST_REJECTED
[ Merge of http://go/wvgerrit/118623 ]

Bug: 180579631
Test: VtsHalDrmV1_4TargetTest
Change-Id: I95298218faffc97c19b4c8d4ac78187a62957dd1
2021-03-04 04:14:23 +00:00
Alex Dale
74eb71ecab Merge "Reference code for ECC operations." into sc-dev am: 4568ed6a04
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13619895

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idcdd928d1aa936ac68510a29aaf35f82a672a039
2021-03-03 08:36:19 +00:00
Alex Dale
7b8aa25093 Merge "Reference code for ECC operations." into sc-dev am: 4568ed6a04
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13619895

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib92210d421e0bf2843f71c539bcf02922eaf1fe7
2021-03-03 08:34:10 +00:00
Alex Dale
4568ed6a04 Merge "Reference code for ECC operations." into sc-dev 2021-03-03 05:46:49 +00:00
android-build-team Robot
cbadd2067a Snap for 7181034 from 4263295dcb to tm-release
Change-Id: I091f06638fdefe80e4e4c95a041c7559bc02fa2d
2021-03-03 04:16:30 +00:00
Alex Dale
0e0ce7cb34 Map CERT_PROVISIONING_RESPONSE_ERROR_9 to HAL status.
[ Merge of http://go/wvgerrit/117787 ]

The CdmResponseType code CERT_PROVISIONING_RESPONSE_ERROR_9 was
created while the discussion of mapping the other codes to 1.4 HAL
codes.  CERT_PROVISIONING_RESPONSE_ERROR_9 should be mapped to the HAL
code PROVISIONING_PARSE_ERROR.

Bug: 180579631
Change-Id: Iba51511bfea3139b3b0d9e3022be17375812b671
2021-03-02 17:48:28 -08:00
Robert Shih
d077611355 Merge "wvcdm: filter logs by app uid" into sc-dev am: 1f796bc4e3
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13577645

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8de2d106e12c2b5c1575c599d60ff90d55ba1cc7
2021-03-02 10:50:15 +00:00
Robert Shih
4263295dcb Merge "wvcdm: filter logs by app uid" into sc-dev am: 1f796bc4e3
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13577645

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie9084b3e16655257555a3fbdd6b2cf1644f8d834
2021-03-02 10:44:05 +00:00
Robert Shih
1f796bc4e3 Merge "wvcdm: filter logs by app uid" into sc-dev 2021-03-02 09:54:32 +00:00
Robert Shih
48ca2c099c wvoec3: add membarriers to complete cache flush am: cbfc3c7193
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13719187

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6f57d5bacfef47e2ebed665cb540e29a1fd44fe6
2021-03-02 05:34:28 +00:00
Robert Shih
0312228684 wvoec3: add membarriers to complete cache flush am: cbfc3c7193
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13719187

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I64250150d64415724f332406778e6459e09285eb
2021-03-02 05:32:21 +00:00
Robert Shih
7cb52c1ccf wvcdm: filter logs by app uid
This commit is a combination of the following:
* http://go/wvgerrit/117003
* http://go/wvgerrit/118303

Bug: 162255728
Test: MediaDrmTest#testGetLogMessages
Change-Id: I5699b64d5c4bab463e5b587595fa7d324dc1d93f
2021-03-01 11:56:37 -08:00
Robert Shih
cbfc3c7193 wvoec3: add membarriers to complete cache flush
Merge of http://go/wvgerrit/104543

Bug: 159465432
Test: oemcrypto_test
Change-Id: Idcf345088c1d40836b5e100d2f758147986a4b04
2021-02-28 05:57:40 +00:00
Alex Dale
f7389f1b3a Reference code for ECC operations.
[ Merge of http://go/wvgerrit/113750 ]

This introduces two classes EccPublicKey and EccPrivateKey which
perform all ECC-specific crypto operations.  The main operations
required by ECC are:
- Load/serialize keys from/to X.509 DER formats
- Generate ECC signatures
- Verify ECC signatures
- Derive session keys used by other OEMCrypto operations

These new classes still need to be plugged into rest of the reference
OEMCrypto implementation.

Bug: 135283522
Test: Future CL
Change-Id: Id071cad9129f95a6eb08662322154ba7d1548d40
2021-02-25 22:10:28 -08:00
android-build-team Robot
0748843521 Snap for 7171433 from 475ea683d9 to tm-release
Change-Id: I9682d8642265aaba6a95fadd4792b842279b566a
2021-02-26 04:19:04 +00:00
Edwin Wong
f3ad627bcb [RESTRICT AUTOMERGE] Fix potential decrypt destPtr overflow.
There is a potential integer overflow to bypass the
destination base size check in decrypt. The destPtr
can then point to the outside of the destination buffer.

Test: sts-tradefed
  sts-tradefed run sts-engbuild-no-spl-lock -m StsHostTestCases --test android.security.sts.Bug_176444622#testPocBug_176444622

Test: push to device with target_hwasan-userdebug build
  adb shell /data/local/tmp/Bug-17644462264

Bug: 176444622
Bug: 176496353
Change-Id: Id3aece61d46d548c304782d4e1dc3a4747795c01
Merged-In: Id3aece61d46d548c304782d4e1dc3a4747795c01
2021-02-25 21:34:23 +00:00
Edwin Wong
0b18148b09 Fix potential decrypt destPtr overflow.
There is a potential integer overflow to bypass the
destination base size check in decrypt. The destPtr
can then point to the outside of the destination buffer.

Test: sts-tradefed
  sts-tradefed run sts-engbuild-no-spl-lock -m StsHostTestCases --test android.security.sts.Bug_176444622#testPocBug_176444622

Test: push to device with target_hwasan-userdebug build
  adb shell /data/local/tmp/Bug-17644462264

Bug: 176444622
Bug: 176496353
Change-Id: Id3aece61d46d548c304782d4e1dc3a4747795c01
Merged-In: Id3aece61d46d548c304782d4e1dc3a4747795c01
2021-02-25 17:56:53 +00:00
android-build-team Robot
bc984b49e6 Snap for 7168803 from 49c6d9d548 to tm-release
Change-Id: Ied96a364f7101e6d75c1b111c358eaa46db49e73
2021-02-25 04:22:32 +00:00
Edwin Wong
475ea683d9 Merge "Display menu if no argument is given." 2021-02-25 02:30:36 +00:00
Edwin Wong
49c6d9d548 Merge "Fix potential decrypt destPtr overflow." 2021-02-24 22:14:08 +00:00
Jeff Tinker
8b5128c34d Merge "Create a build_all_unit_tests.sh script" into sc-dev am: 1ffc6ab16a
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13534779

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2958ed998e444c33c41e83df912d593cec8ea8d9
2021-02-24 21:52:38 +00:00
Jeff Tinker
2204d5c960 Merge "Create a build_all_unit_tests.sh script" into sc-dev am: 1ffc6ab16a
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13534779

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I847086ea482abbbe2eb53cbbf615ddb17607e3e4
2021-02-24 21:51:45 +00:00
Jeff Tinker
1ffc6ab16a Merge "Create a build_all_unit_tests.sh script" into sc-dev 2021-02-24 19:51:46 +00:00
android-build-team Robot
f16ff81bda Snap for 7166462 from 2f10256f50 to tm-release
Change-Id: Id28dd4ab5be0e363c6adbe36c4a8296b64415154
2021-02-24 04:18:43 +00:00
Rahul Frias
dbedc7d81b Merge changes I5ff61496,Ic1a41ed8 into sc-dev am: 01f597eed2
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13613380

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I05794d034c475d2584b71bd73deaab010fe4a6e3
2021-02-24 00:14:34 +00:00
Rahul Frias
16ab61ac59 Merge changes I5ff61496,Ic1a41ed8 into sc-dev am: 01f597eed2
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13613380

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I798684a183430a27ffec426b783cea6aaafb6361
2021-02-24 00:14:12 +00:00
Rahul Frias
01f597eed2 Merge changes I5ff61496,Ic1a41ed8 into sc-dev
* changes:
  Throw DeniedByServerException when provisioning detects a revoked device
  Certificate provisioning proto updates
2021-02-23 23:43:39 +00:00
Alex Dale
2f10256f50 Merge "Include DRM key type to SessionMetrics." 2021-02-23 23:25:51 +00:00
Rahul Frias
64d5b38ff5 Throw DeniedByServerException when provisioning detects a revoked device
[ Merge of http://go/wvgerrit/117267 ]

The client will now advertise the ability to handle provisioning errors
by a minor version updated to the provisioning protocol version.
The provisioning service may indicate that the individual device
is revoked or all devices with the same make/model have been revoked.

If the provisoning service has not been upgraded, the protocol version
field in the request will be ignored. The provisioning service/SDK
will respond with an HTTP 400 error to a provisioning request from
a revoked device.

Bug: 174174765
Test: WvCdmRequestLicenseTest.ProvisioningRevocationTest,
      WV unit/integration tests
Change-Id: I5ff61496685f310de6704a90452b8b76b3505cbb
2021-02-23 14:36:21 -08:00
Edwin Wong
fc4100555e Merge "Display menu if no argument is given." into sc-dev am: 8659675556
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13669989

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I79a93cc245f87d52e7307ff3856194b925d5449a
2021-02-23 21:52:09 +00:00
Edwin Wong
52019cfbc4 Merge "Display menu if no argument is given." into sc-dev am: 8659675556
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13669989

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I33806b889e616fe034b811d208b738d051aa76cf
2021-02-23 21:51:51 +00:00
Edwin Wong
8659675556 Merge "Display menu if no argument is given." into sc-dev 2021-02-23 21:03:08 +00:00
Rahul Frias
41ecde78cc Certificate provisioning proto updates
[ Merge of http://go/wvgerrit/117266 ]

These changes facilitate communication of provisioning errors from
provisioning service/SDK to the client.

Clients will indicate in the SignedProvisioningMessage whether they
support handling of error information in the ProvisioningResponse.
The provisioning service/SDK can then indicate why the provisioning
request is being rejected.

The protocol_version field from SignedProvisioningMessage has also been
broken into separate protocol version and provisioning type fields.
This will support changes planned for future releases.

Bug: 174174765
Test: WV unit/integration tests
Change-Id: Ic1a41ed8f83b69697300c586a78266fac20298fb
2021-02-23 00:09:32 -08:00
Alex Dale
2793b16afd Merge changes I09249afe,I713ff1c4 into sc-dev am: a1d66834de
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13619230

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1c8611c1e9ee8ac442500ced8d138f6aaafa107f
2021-02-23 07:24:20 +00:00
Alex Dale
0c1d59c516 Report OEMCrypto's ECC capabilities. am: e70c7a116e
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13619229

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2143a8fec319b9592ca78483f13adb7ba93c6d4f
2021-02-23 07:24:19 +00:00
Alex Dale
665d0a8318 Merge "Updated DrmDeviceCertificate for signature algo." into sc-dev am: 19e1008df7
Original change: https://googleplex-android-review.googlesource.com/c/platform/vendor/widevine/+/13619228

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iee440593d550b230d3a105b7773fb33d7278b7be
2021-02-23 07:23:52 +00:00