Commit Graph

3518 Commits

Author SHA1 Message Date
John Bruce
6ae7e5e14a Merge "Update OEMCrypto Version Compatibility Document" into rvc-dev am: c113df815d am: d57c09b29b
Change-Id: I097e489a6858ca3ed9a62f8cd3b2a6b05f8ec54d
2020-03-30 18:14:31 +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
c113df815d Merge "Update OEMCrypto Version Compatibility Document" into rvc-dev 2020-03-30 17:46:33 +00:00
Fred Gylys-Colwell
fc1326554e Replace OEMCrypto_LoadDeviceRSAKey with OEMCrypto_LoadDRMPrivateKey am: 56b836bda3 am: bb42e9bd41
Change-Id: I8c35f3c05793844ce4bf24cde418936f31cc6d04
2020-03-29 19:46:03 +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
bb38d223f8 Merge "Reject partial clear subsamples when keys are not loaded" into rvc-dev am: 3560247878 am: c79babac4c
Change-Id: I1e826fc634e3517898c10caa61624cc905242608
2020-03-28 19:09:26 +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
f2c24373a6 Add unit test for preloaded license am: ca404aae6f am: ab82b4b78f
Change-Id: Icfcfda4c1410426ba3364907594a513052b04455
2020-03-27 19:21:27 +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
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
b9ef42f7a6 Merge "Use unique_ptr in oemcrypto ref" into rvc-dev am: a55244025b am: 0abb41845e
Change-Id: I1b05161d7fe15f573a70a58768b186ef87c7188f
2020-03-26 18:42:34 +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
a983f577b1 Merge "Usage table header operations no longer need an open session." into rvc-dev am: 73f301a66c am: ef31c865f2
Change-Id: Ifa3470a582eb45437e98e25c49043cc08b6ffce7
2020-03-26 03:57:31 +00:00
Alex Dale
c75f01f7c9 Merge "New CDM error codes for usage table errors." into rvc-dev am: 8d45d93d0e am: b587f64cac
Change-Id: Ic3bbf3ed9662db105921e68a2edaf54e035d1fc5
2020-03-26 03:57:26 +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
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
8dec93cb18 Merge "Address review comments" into rvc-dev am: d035d76ed6 am: 7f56b4cc50
Change-Id: I23ca755ece35fc92398f8ddc8dd5a94f1fb085c0
2020-03-25 19:49:23 +00:00
TreeHugger Robot
7f56b4cc50 Merge "Address review comments" into rvc-dev am: d035d76ed6
Change-Id: Ib6c7e07e64126ab954eee0b4bbde8c632f3558f3
2020-03-25 19:30:23 +00:00
TreeHugger Robot
d035d76ed6 Merge "Address review comments" into rvc-dev 2020-03-25 19:14:55 +00:00
Fred Gylys-Colwell
80b0005d44 Address review comments
Merge from Widevine repo of http://go/wvgerrit/96163

This CL just addresses some review comments from the big merge to
master. The header OEMCryptoCENC.h is now synced with the
document http://go/oemcrypto.

Test: unit tests
Bug: 148907684
Change-Id: Ic825126e0dd3d7e86eefab2c51b4abb5d57fb568
2020-03-25 16:16:58 +00:00
Alex Dale
193d5c384d Usage table header operations no longer need an open session.
[ Merge of http://go/wvgerrit/95405 ]

There are several OEMCrypto functions that do not require an open
session to be called.  This change updates the OEMCrypto functions
related to the Usage Table Header.

Bug: 150888316
Test: Linux unit tests and Android build
Change-Id: Ic879876dd190fb3e058bbe8e0cce37273030b105
2020-03-23 12:56:41 -07:00
Alex Dale
c9e4dd2495 New CDM error codes for usage table errors.
[ Merge of http://go/wvgerrit/95404 ]

There are three situtations where error codes from a usage table
operations were not being mapped to unique CDM response types.  These
particular errors provide useful information for the CDM during table
defragging.

Also fixed misspelled error code.

Bug: 150890014
Bug: 150891685
Test: Linux unit tests and Android build
Change-Id: I683abdd5fc0871317eede960ea36cfafac7e7f49
2020-03-23 12:54:27 -07:00
Rahul Frias
798be44069 Merge "Move the CDM version string to a header file" into rvc-dev am: 8c1f8f1469 am: d107dd8f04
Change-Id: I283489c958173cd2a7aac7b55e12429974a6781e
2020-03-20 02:39:05 +00:00
Rahul Frias
d107dd8f04 Merge "Move the CDM version string to a header file" into rvc-dev am: 8c1f8f1469
Change-Id: I6b0ff1b8de6f7f15880216278fb3f83e0740d650
2020-03-20 02:22:55 +00:00
Rahul Frias
8c1f8f1469 Merge "Move the CDM version string to a header file" into rvc-dev 2020-03-20 01:59:36 +00:00
Fred Gylys-Colwell
9030a671c8 Log oemcrypto unit test version number am: 88934aa322 am: dd7947af7c
Change-Id: I935d51f4e1077e1e53cd61e8c6d8cdd9bc170cd3
2020-03-19 19:24:57 +00:00
Fred Gylys-Colwell
dd7947af7c Log oemcrypto unit test version number am: 88934aa322
Change-Id: I438cf0cc2b888724f6bb0853ae6884dfd8f0ba29
2020-03-19 19:09:07 +00:00
Fred Gylys-Colwell
88934aa322 Log oemcrypto unit test version number
Merge from Widevine repo of http://go/wvgerrit/95483

This adds a log message to the oemcrypto unit tests so that if
somebody sends us a log, we can tell which version they are
running.

With this CL, the version string is
OEMCrypto unit tests for API 16.2. Tests last updated 2020-03-18

This can be found in the logs and in stdout when running the unit test
OEMCryptoClientTest.VersionNumber. One can verify the executable on
android using
strings $OUT/data/nativetest/oemcrypto_test | grep -i "oemcrypto unit tests"

Test: ran oemcrypto_test and verified version string
Bug: 144713981
Change-Id: Ie10b2f270b783ed10a3ff9855b7ca32a5327ea1c
2020-03-18 15:13:57 -07:00
Robert Shih
8bc3a16378 Merge "hidl WVDrmPlugin: check for listener transport errors" into rvc-dev am: e77874f376 am: 344ff21fbe
Change-Id: I3bd4e4186aea75635af1b40a8a5ad2d9584f5caf
2020-03-18 19:55:09 +00:00
Robert Shih
344ff21fbe Merge "hidl WVDrmPlugin: check for listener transport errors" into rvc-dev am: e77874f376
Change-Id: I2411a28a382d508cd1d89d55f4f55f5adb09c6ac
2020-03-18 19:42:34 +00:00
Robert Shih
e77874f376 Merge "hidl WVDrmPlugin: check for listener transport errors" into rvc-dev 2020-03-18 19:27:39 +00:00
Robert Shih
18fec07897 hidl WVDrmPlugin: check for listener transport errors
Transport errors usually happen when hidl client crashes in DRM event
handler.

Merged from http://go/wvgerrit/95963

Bug: 150204874
Test: artificial crashes in client DRM event listener
Change-Id: I8037374550357d003e302f2a25fbb2305ae5a5e7
2020-03-18 00:56:55 -07:00
Cong Lin
1186a8b804 (WV to Android) Fix un-initialized-value warning as error in odk_test am: 78fddc230a am: 45b6d363c1
Change-Id: I966e6fb87777f0d202ca754fafdb074bbecc9339
2020-03-18 03:04:28 +00:00
Cong Lin
45b6d363c1 (WV to Android) Fix un-initialized-value warning as error in odk_test am: 78fddc230a
Change-Id: Ia1d6743f0fdd1f7856fe5b645b0ce2f2465d0661
2020-03-18 02:50:03 +00:00
Cong Lin
78fddc230a (WV to Android) Fix un-initialized-value warning as error in odk_test
Merge from Widevine repo of http://go/wvgerrit/95968

Un-initialized int array allocated on heap is detected by MemorySanitizer using this command:

rabbit test --config=msan --keep_going --compilation_mode=opt --runs_per_test=1 //video/widevine/export/common/oemcrypto_core_message/odk:odk_test

Bug: 151339875
Test: cdm and odk unit tests
Change-Id: Ic3329b918636a58eccb518ded7b262c4d98c3644
2020-03-17 21:44:17 +00:00
Rahul Frias
ca39586f8d Move the CDM version string to a header file
[ Merge of http://go/wvgerrit/95943 ]

The CDM version for android is now defined in a platform specific
header file. A check for version number match has been removed
from integration tests as it will always be true. We will still
get a notification to change the CDM version when the Android OS
version gets updated.

Bug: 151663718
Test: WV unit/integration tests
Change-Id: I96bac87186e30a709585514be7f338ad2209cdf6
2020-03-16 14:55:37 -07:00
Automerger Merge Worker
52462fc83b Merge "Use production provisioning server for unit tests" into rvc-dev am: 7cd0aacedb am: c9d2afd386
Change-Id: Id806ff907916fe389ba575aa979f5042e0d629d0
2020-03-16 06:57:23 +00:00
Automerger Merge Worker
c9d2afd386 Merge "Use production provisioning server for unit tests" into rvc-dev am: 7cd0aacedb
Change-Id: I8ae224f1394825bbcddd307669c6fe699bcf980a
2020-03-16 06:38:31 +00:00
TreeHugger Robot
7cd0aacedb Merge "Use production provisioning server for unit tests" into rvc-dev 2020-03-16 06:19:31 +00:00
Automerger Merge Worker
1914295162 Merge "Remove the access to net.hostname" into rvc-dev am: 7461d0bc38 am: 6688149e76
Change-Id: Icfb68f3c6c918d823b66609f0c4bc2f3c12a1b23
2020-03-14 01:34:38 +00:00
Automerger Merge Worker
6688149e76 Merge "Remove the access to net.hostname" into rvc-dev am: 7461d0bc38
Change-Id: I6db35ab5adec9bed3f16424871153ec8265f430d
2020-03-14 01:13:45 +00:00
Cong Lin
7461d0bc38 Merge "Remove the access to net.hostname" into rvc-dev 2020-03-14 00:55:08 +00:00