Commit Graph

3701 Commits

Author SHA1 Message Date
TreeHugger Robot
5775aff942 Merge "CryptoSession: Propagate err from GetSystemIdInternal in Open" into rvc-dev am: 4fe638a779
Change-Id: I01fda2def9771a40c1e4c5b2bfcac2b92401f574
2020-04-01 23:19:25 +00:00
TreeHugger Robot
4fe638a779 Merge "CryptoSession: Propagate err from GetSystemIdInternal in Open" into rvc-dev 2020-04-01 22:52:21 +00:00
Robert Shih
07f40d1bed CryptoSession: Propagate err from GetSystemIdInternal in Open
Merge of http://go/wvgerrit/96509

Bug: 151231204
Test: GtsMediaTestCases
Change-Id: Ib29691fcea1c9d5fcfa981caf3e5bdab00cbb0bf
2020-04-01 07:01:24 +00:00
TreeHugger Robot
6b53b2f4ba Merge "CryptoSession: handle 0-length buffer in DecryptSample" into rvc-dev am: e59339ed6d am: f8175bda83
Change-Id: I6fb21dee970930702e83f11e8e8a6f4da0bea921
2020-04-01 05:44:35 +00:00
TreeHugger Robot
08eb9a7fae Merge "CryptoSession: handle 0-length buffer in DecryptSample" into rvc-dev am: e59339ed6d am: 94108cdbe8
Change-Id: Ie6186c8d4a98c65b4eab47b329c72eceebd25b2a
2020-04-01 05:44:04 +00:00
TreeHugger Robot
f8175bda83 Merge "CryptoSession: handle 0-length buffer in DecryptSample" into rvc-dev am: e59339ed6d
Change-Id: Ib7a0a1c7f1ad11f80482efa0bf87259d5d7d5207
2020-04-01 05:32:06 +00:00
TreeHugger Robot
94108cdbe8 Merge "CryptoSession: handle 0-length buffer in DecryptSample" into rvc-dev am: e59339ed6d
Change-Id: Ie427ca27c16376f1202e3a43b58a50f19ecc0d94
2020-04-01 05:32:01 +00:00
TreeHugger Robot
e59339ed6d Merge "CryptoSession: handle 0-length buffer in DecryptSample" into rvc-dev 2020-04-01 05:12:53 +00:00
Robert Shih
dc9809f7c3 CryptoSession: handle 0-length buffer in DecryptSample
In `Combine Decrypt Calls to OEMCrypto`,
OEMCrypto_ERROR_BUFFER_TOO_LARGE is used as the default error code to
signal fallback to legacy decrypt (sending subsamples separately).
The error code would not be updated if no calls to OEMCrypto were
made (e.g. 0-length buffers).

This change resets error code to OEMCrypto_SUCCESS after fall back to
legacy decrypt. Consequently, buffers that do no require OEMCrypto
calls would return OEMCrypto_SUCCESS.

Merge of http://go/wvgerrit/96743

Bug: 150188155
Test: GtsMediaTestCases
Test: DashTest#testWidevineH264AdaptiveWithRendererDisabling
Change-Id: Ib23803c51f16bc809bda5c2720e628e81f1df1dc
2020-04-01 02:47:13 +00:00
John Bruce
630141b5fc Merge "Update OEMCrypto Version Compatibility Document" into rvc-dev am: c113df815d am: d57c09b29b
Change-Id: Id972921cfb3c458c8611631e3f5375b7a0066e0a
2020-03-30 19:09:24 +00:00
John Bruce
bbd4f33386 Merge "Update OEMCrypto Version Compatibility Document" into rvc-dev am: c113df815d am: 5f09de89ae
Change-Id: I73ca6457a6b8aa132e47a5479751f3616f92c3b0
2020-03-30 18:15:28 +00:00
John Bruce
d57c09b29b Merge "Update OEMCrypto Version Compatibility Document" into rvc-dev am: c113df815d
Change-Id: I4e1f3e8ff3e11e7d06defad929bf08ef828b23eb
2020-03-30 18:00:26 +00:00
John Bruce
5f09de89ae Merge "Update OEMCrypto Version Compatibility Document" into rvc-dev am: c113df815d
Change-Id: Ifcfe2508123bca879c457082090133751bceae6a
2020-03-30 17:59:52 +00:00
John Bruce
c113df815d Merge "Update OEMCrypto Version Compatibility Document" into rvc-dev 2020-03-30 17:46:33 +00:00
Fred Gylys-Colwell
c78affbc28 Replace OEMCrypto_LoadDeviceRSAKey with OEMCrypto_LoadDRMPrivateKey am: 56b836bda3 am: 4af6f0cf42
Change-Id: I938b2cad4c00df41562b0f7ddb327f60961f491e
2020-03-29 19:46:04 +00:00
Fred Gylys-Colwell
6b56c1c5ec Replace OEMCrypto_LoadDeviceRSAKey with OEMCrypto_LoadDRMPrivateKey am: 56b836bda3 am: bb42e9bd41
Change-Id: I4099a6dcd2aed17b2132ac0fad22b0268098d22d
2020-03-29 19:45:51 +00:00
Fred Gylys-Colwell
4af6f0cf42 Replace OEMCrypto_LoadDeviceRSAKey with OEMCrypto_LoadDRMPrivateKey am: 56b836bda3
Change-Id: Ia80b1cb34f01e6d85461eb2fef7f22abe219e6b4
2020-03-29 19:30:57 +00:00
Fred Gylys-Colwell
bb42e9bd41 Replace OEMCrypto_LoadDeviceRSAKey with OEMCrypto_LoadDRMPrivateKey am: 56b836bda3
Change-Id: I2478269c1165c4dac094b6f79eae77c80b65668e
2020-03-29 19:30:45 +00:00
Fred Gylys-Colwell
56b836bda3 Replace OEMCrypto_LoadDeviceRSAKey with OEMCrypto_LoadDRMPrivateKey
Merge from Widevine repo of http://go/wvgerrit/96783

This CL updates the reference code, unit tests, and adapter to use the
new v16 function OEMCrypto_LoadDRMPrivateKey. This is just an API
change to allow ECC support in the future. The reference code does not
yet support ECC certificates, and the CDM code assumes that all
certificates have an RSA key.

Bug: 152558018
Test: unit tests on taimen and w/v16 mod mock.
Change-Id: I0793b416513b81b3d74849f0b58dbdc91f075ac6
2020-03-29 10:43:54 -07:00
Rahul Frias
e53740a0c4 Merge "Reject partial clear subsamples when keys are not loaded" into rvc-dev am: 3560247878 am: eba182293d
Change-Id: I917f52263e70e03ea958c789b2f366fc29e19608
2020-03-28 19:09:26 +00:00
Rahul Frias
93bb315c8e Merge "Reject partial clear subsamples when keys are not loaded" into rvc-dev am: 3560247878 am: c79babac4c
Change-Id: Icfa7b9cf7c3714f86e3de812f386512f2be9a312
2020-03-28 19:09:14 +00:00
Rahul Frias
eba182293d Merge "Reject partial clear subsamples when keys are not loaded" into rvc-dev am: 3560247878
Change-Id: I8af7288266e5ad5ec82685ea7b467e8ef35a29cb
2020-03-28 18:43:07 +00:00
Rahul Frias
c79babac4c Merge "Reject partial clear subsamples when keys are not loaded" into rvc-dev am: 3560247878
Change-Id: I1a0ebfba3f4648e44dc3f28870076c6a6e0f1cc2
2020-03-28 18:42:55 +00:00
Rahul Frias
3560247878 Merge "Reject partial clear subsamples when keys are not loaded" into rvc-dev 2020-03-28 18:24:15 +00:00
Rahul Frias
734aea940b Reject partial clear subsamples when keys are not loaded
[ Merge of http://go/wvgerrit/96514 ]

The combined decryption call feature was introduced in android R.
In earlier releases, subsamples were passed one at a time for
decryption within the plugin. A decryption request that consists
entirely of clear data should be passed on to OEMCrypto even if
no keys are loaded.

A sample might consist of subsamples of clear and protected data.
In legacy mode, this proved to be an issue for OEMCrypto if the clear
subsamples were passed on but the protected ones were rejected (b/110251447).

For legacy mode and in the absence of keys being loaded, the subsample will
be passed to OEMCrypto only if the clear lead/frame is in a single subsample
and not broken up across multiple subsamples.

Bug: 150316417
Test: WV android unit/integration tests
Change-Id: Iff8ae8f58530cb9c5d31ce388742443ae807c16f
2020-03-27 15:07:29 -07:00
John W. Bruce
1f08e4dcf1 Update OEMCrypto Version Compatibility Document
(This is a merge of http://go/wvgerrit/96723.)

This syncs the document with the current version in Google Docs. Changes
since the last version:

* Specified that the Cobalt table only applies to First-Party Platforms
* Filled in gaps in Cobalt table
* Updated the Android R entry to reflect that some devices will stay on
  v15
* Added further details on the contents of various OEMCrypto v16
  versions
* Corrected Cobalt versions erroneously marked as Supported
* Updated copyright statement for 2020
* Reworded the header on the CE CDM section
* Corrected which CE CDM versions used OEMCrypto v8
* Put a section heading on the first table in the document to clarify
  that it is not a table of contents nor a document version history

Bug: 151455443
Test: Verified PDF visually
Change-Id: I0a15f79a58a94cda178018373852582abb6c1463
2020-03-27 13:41:59 -07:00
Fred Gylys-Colwell
64e528dc99 Add unit test for preloaded license am: ca404aae6f am: 6bd4b47612
Change-Id: I0ce97c01bceaa48a5ea8fce2870f8c072eca3fbe
2020-03-27 19:21:28 +00:00
Fred Gylys-Colwell
d8ea3672c4 Add unit test for preloaded license am: ca404aae6f am: ab82b4b78f
Change-Id: I650eec69db450862ca645b1cab0f55c20926a635
2020-03-27 19:21:04 +00:00
Fred Gylys-Colwell
ab82b4b78f Add unit test for preloaded license am: ca404aae6f
Change-Id: I68c4098513de8313f7ecd9b30958c5b05a620703
2020-03-27 19:05:44 +00:00
Fred Gylys-Colwell
6bd4b47612 Add unit test for preloaded license am: ca404aae6f
Change-Id: Ieeff31dfb52a182da5217ab26ddd168d39e44381
2020-03-27 19:05:43 +00:00
Fred Gylys-Colwell
ca404aae6f Add unit test for preloaded license
Merge from Widevine repo of http://go/wvgerrit/96508

This adds a unit test for to verify that a preloaded license may be
loaded into OEMCrypto. A preloaded license is a license that does not
have a nonce, and for which there is no license request. This is used
in CAS and ATSC.

I also updated the test version string to
OEMCrypto unit tests for API 16.2. Tests last updated 2020-03-27

Bug: 144105097
Test: ran oemcrypto unit tests on taimen and with v16 modmock.
Change-Id: I6a4926917f36a084d15defa7b908d067612c4dcf
2020-03-26 15:38:38 -07:00
Cong Lin
a87dafc5ba Merge "Use unique_ptr in oemcrypto ref" into rvc-dev am: a55244025b am: 275b896d9c
Change-Id: I871b21d3aabccbb70c271748332b145f56ebdca9
2020-03-26 18:42:56 +00:00
Cong Lin
b651eb3278 Merge "Use unique_ptr in oemcrypto ref" into rvc-dev am: a55244025b am: 0abb41845e
Change-Id: I1fef37738bf914471a412e199643874983ee9b1e
2020-03-26 18:42:25 +00:00
Cong Lin
275b896d9c Merge "Use unique_ptr in oemcrypto ref" into rvc-dev am: a55244025b
Change-Id: I266de93e39d6754539b562da6b24ce42892b294d
2020-03-26 18:28:22 +00:00
Cong Lin
0abb41845e Merge "Use unique_ptr in oemcrypto ref" into rvc-dev am: a55244025b
Change-Id: If9fd5ca1143cf3372cf70a7d3627c8e98514a3a8
2020-03-26 18:28:10 +00:00
Cong Lin
a55244025b Merge "Use unique_ptr in oemcrypto ref" into rvc-dev 2020-03-26 18:15:33 +00:00
Cong Lin
a53a6bf355 Use unique_ptr in oemcrypto ref
Merge from Widevine repo of http://go/wvgerrit/95945

The reference oemcrypto and testbed still use old style pointers, even
though we now require a more modern C++ compiler. Updated a few places
where smart pointer would be appropriate.

Bug: 141393616
Test: Ran unit tests
Change-Id: I8b1e155bce241075928e373478d6f8e1001233f9
2020-03-26 16:15:24 +00:00
Alex Dale
970ceb343a Merge "Usage table header operations no longer need an open session." into rvc-dev am: 73f301a66c am: d650718c27
Change-Id: I5b122e382a37fa977ae6f5e661fc64beff34eaa5
2020-03-26 03:57:26 +00:00
Automerger Merge Worker
72eebd9d75 Merge "Merge "New CDM error codes for usage table errors." into rvc-dev am: 8d45d93d0e am: 4188d4478b" into rvc-d1-dev-plus-aosp 2020-03-26 03:57:15 +00:00
Alex Dale
84e758c3e4 Merge "New CDM error codes for usage table errors." into rvc-dev am: 8d45d93d0e am: 4188d4478b
Change-Id: I329bd2e415818e7b8d410de424a0df769f3eb2e1
2020-03-26 03:57:11 +00:00
Alex Dale
8aff059243 Merge "Usage table header operations no longer need an open session." into rvc-dev am: 73f301a66c am: ef31c865f2
Change-Id: Ib3008c8544f885190ab5645fd64181abd9aee971
2020-03-26 03:57:10 +00:00
Alex Dale
4e22b2253c Merge "New CDM error codes for usage table errors." into rvc-dev am: 8d45d93d0e am: b587f64cac
Change-Id: I8652c63f22c9f71bc548c0af07cc4071ac48904b
2020-03-26 03:56:56 +00:00
Alex Dale
d650718c27 Merge "Usage table header operations no longer need an open session." into rvc-dev am: 73f301a66c
Change-Id: I2853ab3f534c8f1c3d7a5597bfc69a4685574d19
2020-03-26 03:45:43 +00:00
Alex Dale
ef31c865f2 Merge "Usage table header operations no longer need an open session." into rvc-dev am: 73f301a66c
Change-Id: Ifa6a1bc17ceb2dded06cb4f6547c6bc7d4478983
2020-03-26 03:45:34 +00:00
Alex Dale
4188d4478b Merge "New CDM error codes for usage table errors." into rvc-dev am: 8d45d93d0e
Change-Id: Iab515ba54795d43abd7eefd02d41461aabd777bb
2020-03-26 03:45:24 +00:00
Alex Dale
b587f64cac Merge "New CDM error codes for usage table errors." into rvc-dev am: 8d45d93d0e
Change-Id: I84ec88383d316d56cfba3fce6f8cd3ab7e315bec
2020-03-26 03:45:09 +00:00
Alex Dale
73f301a66c Merge "Usage table header operations no longer need an open session." into rvc-dev 2020-03-26 03:27:31 +00:00
Alex Dale
8d45d93d0e Merge "New CDM error codes for usage table errors." into rvc-dev 2020-03-26 03:26:30 +00:00
TreeHugger Robot
9a3e97dcf5 Merge "Address review comments" into rvc-dev am: d035d76ed6 am: 7f56b4cc50
Change-Id: I0237b16779c5d5519a83e44b15d16dd3fe2f0ee3
2020-03-25 19:49:19 +00:00
TreeHugger Robot
6f1601d18e Merge "Address review comments" into rvc-dev am: d035d76ed6 am: b82da207fd
Change-Id: I6a6132c41c713a896bb0ff9090b6b6425899b17f
2020-03-25 19:49:06 +00:00