Commit Graph

4883 Commits

Author SHA1 Message Date
Alex Dale
23f7cd60a7 Sync Android reference with CDM reference.
The sc-dev branch on Android is out of sync with several important
changes on the CDM master branch.  This changes copies several CLs.

[ Merge of http://go/wvgerrit/104524 ]

OEMCrypto unittest: generic crypto APIs

Add unit tests to verify that generic crypto APIs do not crash for large
input buffer lengths and signature lengths.

[ Merge of http://go/wvgerrit/106583 ]

Fix secure buffer tests in OEMCrypto testbed

The secure buffers were not being used correctly in the testbed, and
were failing OEMCryptoMemoryCopyBufferForHugeBufferLengths.

[ Merge of http://go/wvgerrit/109603 ]

Reject block_offsets of 16 or greater in OEC Ref

This is a potential security hole. We will be enforcing that OEMCrypto
rejects this in an upcoming test, so the Ref must be updated to reject
it.

[ Merge of http://go/wvgerrit/110165 ]

Fix Format String Signedness

See above for full description.

[ Merge of http://go/wvgerrit/111784 ]

Fix heap overflow test in L3 and OEMCrypto ref

Check the length of wrapped_rsa_key_length before casting to
WrappedRSAKey struct.

[ Merge of http://go/wvgerrit/113563 ]

Reword "blacklisted" to "forbidden"

[ Merge of http://go/wvgerrit/113583 ]

Use error code from RAND_bytes

The return code from RAND_bytes was not used correctly.

[ Merge of http://go/wvgerrit/113644 ]

Check for buffer overflow when computing subsample size

The test DecryptCENCForNumBytesClearPlusEncryptedOverflowsSize
cleverly picks num_bytes_clear + num_bytes_encrypted = 1 after integer
overflow. This is in the refernce code, level 3, and odkitee.

[ Merge of http://go/wvgerrit/113683 ]

OEMCrypto reference code: respect analog flags for clear buffers

The reference code should honor the analog_display_active flag for
both clear and secure buffers.

[ Merge of http://go/wvgerrit/114883 ]

Add size check for IV in OEMCrypto APIs

IV is supposed to be 16 bytes but the size is never checked before iv
gets used in LoadProvisioning.

Bug: 145026457
Bug: 147569428
Bug: 159847851
Bug: 162372059
Bug: 169278035
Bug: 169980065
Bug: 173460694
Bug: 173994023
Bug: 174523584
Bug: 175001473
Bug: 175041667
Test: No compiled files changed
Change-Id: If0ccd1cd3a56f72eedd2a6cb202a34bc7b43ca0d
2021-03-08 19:45:05 -08:00
Alex Dale
eb56801fdb Added unittests for WV CRC-32 implementation.
[ Merge of http://go/wvgerrit/115549 ]

Our WV CRC-32 implementation is for CRC-32/MPEG-2 (rather than the
documented CRC-32-IEEE).  The OEMCrypto document has been updated to
reflect the reference implementation.

Test: oemcrypto_partner_tests
Bug: 135283522
Change-Id: Iea8fc4ec500aec96bdb27102c51dfcca77d7bffb
2021-03-08 19:45:05 -08:00
Alex Dale
b3b11ca1ea Added unittests for OEM Certificates.
[ Merge of http://go/wvgerrit/115548 ]

Create a small set of unittests to verify the functionality of OEM
Certificate.

This adds a test OEM Public Certificate and OEM Private Key.

Bug: 135283522
Test: oemcrypto_unittests
Change-Id: Iaa634543d9cb5005d91f1e7c528bf05b2b0c4d68
2021-03-08 19:45:05 -08:00
Alex Dale
10370fb66e Wrapped OEM Certificate.
[ Merge of http://go/wvgerrit/115547 ]

The functionality of OEM Certificates are being abstracted away.  This
is to help with the integration of ECC-based DRM certificates and in
preparation for ECC-based OEM Certificates.

Summary of OEM Certificate functionality:
- Parsing OEM Public Certs (PKCS7 signedData)
- Parsing OEM Private Key (PKCS8 PrivateKey)
- Public cert getter
  - Implements most of OEMCrypto_GetOEMPublicCertificate()
- Certificate validation
  - Implements most of OEMCrypto_IsKeyboxOrOEMCertValid() for OEM
    Certificates
  - Checking public-private key pairing

Bug: 135283522
Test: Future CL
Change-Id: Ib9580bd83641865c53dd829ff09b142bf111768c
2021-03-08 19:44:58 -08:00
Alex Dale
5ad2bd7ba3 Added unittests for reference RSA implementation.
[ Merge of http://go/wvgerrit/115546 ]

Included a set of unittests for RSA keys which ensure client-server
RSA operations work as expected.

Bug: 135283522
Test: oemcrypto_unittests
Change-Id: I8363a82403d0780f3074a05c64c804e700c2b779
2021-03-08 19:24:48 -08:00
Edwin Wong
9c278174c8 [RESTRICT AUTOMERGE] Fix WVCryptoPlugin use after free vulnerability.
The shared memory buffer used by srcPtr can be freed by another
thread because it is not protected by a mutex. Subsequently,
a use after free AIGABRT can occur in a race condition.

SafetyNet logging is not added to avoid log spamming. The
mutex lock is called to setup for decryption, which is
called frequently.

The crash was reproduced on the device before the fix.
Verified the test passes after the fix.

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

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

Bug: 176495665
Bug: 176444161
Change-Id: Ie1aca0ceacb4b7a1b6e473b823541607a36d8cb4
2021-03-08 15:54:00 -08:00
Rahul Frias
9ab837c78a Integration test for license duration with renewal
This is a squash of several different CLs with chnages only affecting
duration_use_case_test.cpp

* Integration test for license duration with renewal

[ Merge of http://go/wvgerrit/117263 ]

Bug: 180067457

* Add test for infinite renewal

[ Merge of http://go/wvgerrit/107743 ]

This adds a test that verifies an infinite renewal is processed
correctly.

Bug: 162516965
Bug: 170355696
Bug: 169213621
Bug: 166728158

* Add more time to CdmUseCase_Streaming test

[ Merge of http://go/wvgerrit/114146 and http://go/wvgerrit/114147 ]

The duration tests CdmUseCase_Streaming.Case3 was flaky on the
buildbot for platforms with a real clock because there was only room
for 1 second of fudge at the end of playback -- i.e. the rental window
ended at 35s, but the last playback was 34s.

Bug: 175741647

* Set renewal server on command line for tests

[ Merge of http://go/wvgerrit/110903 ]

This CL adds the ability to set the renewal server on the command
line, and adds some comments to the build scripts' README file to
explain how to test a server rollout.

Bug: 173031207

* Change duration test fudge from 1 to 2

[ Merge of http://go/wvgerrit/112143 ]

Some duration tests are flakey. Let's see if this cleans them up
enough.

Bug: 175741647

* Correct some grammar

[ Merged from http://go/wvgerrit/111824 and http://go/wvgerrit/112063 ]

* Add license duration test

[ Merge of http://go/wvgerrit/109143 ]

This adds a license duration test that behaves the same as a rental
duration test. We do not encourage content providers to do this, but
it is reasonable that legacy licenses should work.

Bug: 172099147

* Shorten duration tests

[ Merge of http://go/wvgerrit/108664 ]

This CL tweaks some of the times in the duration use case tests so
that they take less time to run.

These changes the CdmUseCase test time from six and half hours to 3
and a quarter. A 50% savings!

Bug: 170746277

* Improve logging and edge cases in duration tests

[ Merge of http://go/wvgerrit/108663 ]

This cleans up some logging, and handles some edge cases on renewals
when the renewal request round trip overlaps the cutoff time.

Bug: 170746277

* Remove extra cutoff computations

[ Merge of http://go/wvgerrit/106783 ]

The duration tests originally tried to keep track of when the timer
would have gone off if the test was allowed to continue. This proved
impracticle, so the extra parameter has been removed. The tests still
closely match the documented use cases.

Bug: 169453960

* But not too lenient

[ Merge of http://go/wvgerrit/107943 ]

Previously, the duration tests were modified to allow playback to
continue in some cases. See the documentation or code for a list of
these cases. However, the tests had been modified to force playback to
continue in these cases.

This is not desired: in some cases, v15 devices can restrict playback
as requested. This CL changes the tests so that playback restriction
is allowed.  In other words, we no longer force older devices to fail
the test.

Bug: 169255315

* Make some integration tests lenient

[ Merge of http://go/wvgerrit/106843 ]

This allows devices that have OEMCrypto version < v16 or do not
support usage tables to continue playback for an offline license after
the playback window has expired.

Bug: 169582310
Test: duration_use_case_test.cpp

* Add Renewal Use Case tests

[ Merge of http://go/wvgerrit/105826 and http://go/wvgerrit/103784 ]

This CL adds several integration tests that match the duration use
cases with renewals. The test classes are designed for the core cdm,
but the test cases match those found in
oemcrypto/odk/test/odk_timer_test.cpp.

Test: tests pass except for documented bugs.
Bug: 161463952
Change-Id: Ib4775d48490cf150b89aeb2cc64e01a1428f0ab5
2021-03-08 15:36:49 -08:00
Rahul Frias
3176f5f66f An integration test for secure buffers
This is a squash of several different CLs with changes only affecting
policy_integration_test.cpp

* An integration test for secure buffers

[ Merge of http://go/wvgerrit/113905 ]

This extends the previous CL that loads a license that has a key that
requires a secure buffer. It now creates a secure buffer and tries to
decrypt to it.

Bug: 38004627

* Test loading license requiring secure buffer

[ Merge of http://go/wvgerrit/113903 ]

This adds a policy test to verify we can load a license that requires
hardware secure buffers.

Bug: 38004627
Test: WV  unit/integration tests
Change-Id: I1cc0b607ddf5b43fc6b7ba648f3c78d6163e14e9
2021-03-08 15:31:18 -08:00
Rahul Frias
0831e575ba Add Duration Use Case integration tests
Cherry pick from http://go/wvgerrit/102986, rvc-dev branch of
http://go/wvgerrit/105825, rvc-widevine-release of http://go/ag/12561661

Most of this CL was merged in http://go/ag/12967146 except this
correction of ordering in test listing.

Test: Ran the tests against v16 OEMCrypto. Some fail against v15.
Bug: 161463952
Change-Id: I3fa803a645c745dfce42ad15b5ceec9f28aab630
2021-03-08 15:30:08 -08:00
Rahul Frias
a9f051faac Fix test sleep on iOS.
[ Merge of http://go/wvgerrit/117203 ]

clock_settime isn't available on iOS (even though settimeofday is).  But
we can't change the system time on iOS anyway, so this just disallows
iOS.

Bug: 182058081
Test: WV unit/integration tests
Change-Id: I96e5b6634803bd4e6aaf5cc6d64f4441296247d4
2021-03-08 15:28:48 -08:00
Rahul Frias
9a659e31c1 Restrict a2b_hex to 2000 bytes.
[ Merge of http://go/wvgerrit/109144 ]

Because it doesn't help anybody when a buffer overflow test chokes the
logger.

Bug: 182058081
Test: Ran unit tests with verbose logging
Change-Id: Ibcb3379b9eb9bdd94a8959b977e8de32ea116859
2021-03-08 15:27:01 -08:00
Rahul Frias
616a9b38dc Return error when test initialization fails
[ Merge of http://go/wvgerrit/116243 ]

Currently if a command line argument is not understood, all tests are
skipped and the test suite passes.

Bug: 182058081
Test: WV unit/integration tests
Change-Id: I9725a9ed9446f15f08372e68c7a25dffd99c7cef
2021-03-08 15:25:50 -08:00
Rahul Frias
50efa73e34 Set renewal server on command line for tests
[ Merge of http://go/wvgerrit/110903 ]

This CL adds the ability to set the renewal server on the command
line, and adds some comments to the build scripts' README file to
explain how to test a server rollout.

Bug: 173031207
Test: WV unit/integration tests
Change-Id: Ibe71e77469c94601627fb85a1ad4654553d3eb1a

Change-Id: I7e9bfc873c78e26c0cece113dc8a3d08cd9163db
2021-03-08 15:24:27 -08:00
Rahul Frias
24e4c33262 Fix deprecated and printf warnings.
[ Merge of http://go/wvgerrit/118703 ]

Bug: 182058081
Test: WV unit/integration tests
Change-Id: I2d8995b8aab864a2d2f5161d12a473d34e67bad4
2021-03-08 15:22:56 -08:00
Rahul Frias
71cf45fb3f Throw DeniedByServerException when provisioning detects a revoked device
[ Merge of http://go/wvgerrit/117267 ]

This includes some clang-format corrections that were missed in the
original merge from wvgerrit.

Bug: 174174765
Test: WvCdmRequestLicenseTest.ProvisioningRevocationTest,
      WV unit/integration tests
Change-Id: Ifd16ab51eb89530fa5e0b91acc42f30864246d38
2021-03-06 23:53:49 -08:00
Alex Dale
e52086c283 Include DRM key type to SessionMetrics.
[ Merge of http://go/wvgerrit/111903 ]

CDM metrics has been updated to include the DRM key type.  The CDM
session records the key type when the wrapped DRM key is successfully
loaded into an OEMCrypto session.

Now that the API refers to a general DRM key rather than an RSA key,
the timer metric for loading the DRM key has been renamed on the client
to reflect this.

Test: Metric unit tests
Bug: 140813486
Change-Id: I9069f13ac7c979cc8556e08591e1cf8f623d0a84
(cherry picked from commit 47fc031576)
Merged-In: I9069f13ac7c979cc8556e08591e1cf8f623d0a84
2021-03-06 23:47:30 -08:00
Robert Shih
6c03986218 Merge "libwvhidl: map errors to PROVISIONING_REQUEST_REJECTED" into sc-dev 2021-03-07 06:01:18 +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
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
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
4568ed6a04 Merge "Reference code for ECC operations." into sc-dev 2021-03-03 05:46:49 +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
1f796bc4e3 Merge "wvcdm: filter logs by app uid" into sc-dev 2021-03-02 09:54:32 +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
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
Jeff Tinker
1ffc6ab16a Merge "Create a build_all_unit_tests.sh script" into sc-dev 2021-02-24 19:51:46 +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
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
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
Edwin Wong
0ac0ee50eb Display menu if no argument is given.
If not argument is given, the app just sits and wait
for stdin input, this can be confusing for the user.
Add logic to display menu if no argument is given.

Test: metrics_dump
  display menu

Test: metrics_dump [bugreport from sabrina-q.gz]
  display mediadrm and widevine metrics

Test: metrics_dump --mediadrm [adb shell dumpsys media.metrics output]
  display mediadrm metrics

Test: metrics_dump --widevine [adb shell dumpsys media.metrics output]
  display widevine metrics

Test: metrics_dump [bugreport from sabrina-q.gz] --widevine
  display menu because the order is app_name, options, input file

Bug: 180983850
Change-Id: I9b35f782d8f59663661148d3950f89e4724b6bce
Merged-In: I9b35f782d8f59663661148d3950f89e4724b6bce
2021-02-22 23:04:59 -08:00
Alex Dale
a1d66834de Merge changes I09249afe,I713ff1c4 into sc-dev
* changes:
  Enable the CDM to track the DRM private key type.
  Report OEMCrypto's ECC capabilities.
2021-02-23 06:53:31 +00:00
Alex Dale
19e1008df7 Merge "Updated DrmDeviceCertificate for signature algo." into sc-dev 2021-02-23 06:53:18 +00:00
Robert Shih
ae9b1cd128 Merge "OEMCrypto_LoadLicense doc cleanup" into sc-dev 2021-02-22 23:30:55 +00:00
Robert Shih
00b4a9b5b5 OEMCrypto_LoadLicense doc cleanup
Bug: 162255728
Change-Id: I11f74b1f38e0e073e0e2e464bdce41e720f00549
2021-02-20 08:38:39 +00:00
Robert Shih
f7285fb0e9 wvhidl: map wvcdm LogPriority to hidl LogPriority
[Merge of http://go/wvgerrit/117343]

Bug: 162255728
Test: VtsHalDrmV1_4TargetTest
Change-Id: I368b2d7a125e62e46ded322c1e171a15a9a7a1b4
2021-02-19 01:53:22 -08:00
Alex Dale
e15c0607c7 Enable the CDM to track the DRM private key type.
[ Merge of http://go/wvgerrit/110923 ]

The CDM is responsible for telling OEMCrypto the underlying DRM
private key type when loading it into a session.  To do this, the
CDM must determine and store the key type of a successfully loaded
provisioning response.  The type of key is available from the
DRM certificate proto that is provided in the reponse.

This change introduces a class to contain the wrapped key and
type together.  To store the type, the CDM device files have been
updated to include a key type with the DRM certificate and to
store from and load to the new class.

Unittests have been updated for using the new class where the
wrapped key was used before.

Test: Linux unit tests
Bug: 140813486
Change-Id: I09249afe9c291632fb651ecd00eac697d6939ec7
(cherry picked from commit 6c457402e944079271cef488aa4699f986da6a2e)
Merged-In: I09249afe9c291632fb651ecd00eac697d6939ec7
2021-02-18 23:10:39 +00:00
Alex Dale
e70c7a116e Report OEMCrypto's ECC capabilities.
[ Merge of http://go/wvgerrit/110824 ]

When generating a provisioning request, the CDM includes the different
certificate key types that are supported.

This change will enable the reporting of ECC certificate types if
OEMCrypto supports them.

Test: Linux unit tests and Android integration test
Bug: 140813486
Change-Id: I713ff1c469dff5c8a41461727ce63486d962575e
(cherry picked from commit 547d2f8775)
Merged-In: I713ff1c469dff5c8a41461727ce63486d962575e
2021-02-18 23:09:53 +00:00
Alex Dale
5e982e8fff Updated DrmDeviceCertificate for signature algo.
[ Merge of http://go/wvgerrit/110823 ]

DrmDeviceCertificate is the CDM's reduced version of DrmCertificate
used in the backend.  With the introduction of ECC, the CDM needs to
extract the signature algorithm to determine how to handle the wrapped
private key used by OEMCrypto post-provisioning.

This change brings the DrmDeviceCertificate in line with the
provisioning service's DrmCertificate message as the new source of
truth.

Bug: 140813486
Test: Compiled proto
Change-Id: I164a1c9266fb74b6cdd0ff35f1986ca032033bba
(cherry picked from commit 667c672c80)
Merged-In: I164a1c9266fb74b6cdd0ff35f1986ca032033bba
2021-02-18 23:08:29 +00:00
Robert Shih
9397f5b972 Merge "wv hidl: map CdmResponseType to drm@1.4 Status" into sc-dev 2021-02-18 00:25:48 +00:00
Robert Shih
0450bfcda1 WVDrmPlugin: map OEMCryptoResult to drm@1.4 Status
Bug: 162255728
Change-Id: Ieb7de4e3d40e132ab17d5907132879714ef7e918
Test: MediaDrmTest#testExceptionMessage
2021-02-17 09:05:21 +00:00
Robert Shih
bbfa2b4ff4 Merge "Run git-clang-format on log.{h,cpp}" into sc-dev 2021-02-17 09:01:14 +00:00
Robert Shih
89b9cb2706 Run git-clang-format on log.{h,cpp}
Bug: 168341163
Test: build
Change-Id: Ie51b1d4ab66e256992b6fffa524331ec124e047d
2021-02-16 00:39:43 -08:00
Robert Shih
fa49fdade0 Run git-clang-format
Bug: 168341163
Test: build
Change-Id: Icf8bd644ee5e87cd499ee017c8c522a96d385d4c
2021-02-11 08:40:31 -08:00
Jeff Tinker
bcc3313828 Create a build_all_unit_tests.sh script
bug: 163163467
test: ./build_all_unit_tests.sh
      ./build_and_run_all_unit_tests.sh

Merge from: go/wvgerrit/116524

Change-Id: I5eaf5ed34b46445d23530ca0edca94bfaeb3abaf
2021-02-09 12:10:31 -08:00
Robert Shih
6ed2c30a0a wv hidl: map CdmResponseType to drm@1.4 Status
Bug: 162255728
Test: VtsHalDrmV1_4TargetTest
Change-Id: Icc96c17f38218475efc7489348b75c9978f16b01
2021-02-08 19:10:43 -08:00