Commit Graph

3683 Commits

Author SHA1 Message Date
Fred Gylys-Colwell
c5b7a01ab5 Update ODK Library and add license release unit test
Merge from Widevine repo of two CLs.

Merge from Widevine repo of http://go/wvgerrit/94743

A license release should not have a core message. This CL adjusts the
existing unit tests to verify this. There is also a new unit test called
SecureStop that explicitly tests sending a secure stop in a new
session without first loading the license.

Merge from Widevine repo of http://go/wvgerrit/94865

This CL has the following changes copied from google3:
http://cr/298871728 Remove odk_static_assert for Message size temporarily
http://cr/298755935 Fix a compiling error during macro expansion
http://cr/298481745 Add missing header for android
http://cr/298448142 Fix odk_test gyp file
http://cr/298419641 Remove header from Android.bp
http://cr/298402053 Separate sizeOf(args) bytes in fuzz tests
http://cr/297730316 No core messages for license release
http://cr/297714346 Add copybara_test and piper_sot_to_gerrit
http://cr/297636713 Adding some comments around boolean conversion code
http://cr/297420679 Autofuzzer when ran with address sanitizer ...
http://cr/296513584 Minor fix with fuzzing odk clock values
http://cr/296322024 Fixing errors in code with how request ...
http://cr/296313159 Fuzzing ODK clock values by setting aside ...
http://cr/295763207 Add more odk tests and move helper functions to test helper
http://cr/294524098 Adding a Build Rule for ODK_KDO_Fuzzer and updating
http://cr/294492213 Address a few review comments of ODK
http://cr/293674368 odk_fuzz: add TODOs & comments
http://cr/293492806 Fix spelling

Bug: 150243585
Bug: 150020278
Bug: 150095506
Bug: 147297226
Bug: 148290294
Bug: 148907684
Bug: 150608451
Test: unit tests
Change-Id: I25fd406f29f4eba40f5cb27e9a1317dce4ffc2f5
2020-03-05 19:06:31 +00:00
Automerger Merge Worker
69f1ab03c7 Merge "Correct log messages" into rvc-dev am: d0d3216eda am: b093ce8733
Change-Id: Id0daa39e50810e2551d36737551c1187b4f3edbb
2020-03-05 00:27:12 +00:00
Automerger Merge Worker
5e9ab5aa83 Merge "Correct log messages" into rvc-dev am: d0d3216eda am: ec2d331246
Change-Id: I8ca840929b60296832a6da443fb79dc91e332778
2020-03-05 00:26:55 +00:00
Automerger Merge Worker
b093ce8733 Merge "Correct log messages" into rvc-dev am: d0d3216eda
Change-Id: I7fb8dcd64b45f872e3cf840ef59aaddeabb63163
2020-03-05 00:11:02 +00:00
Automerger Merge Worker
ec2d331246 Merge "Correct log messages" into rvc-dev am: d0d3216eda
Change-Id: Ib9d57ae301d678b6d2c1ec879aa6b4374ddc9e40
2020-03-05 00:11:01 +00:00
Rahul Frias
d0d3216eda Merge "Correct log messages" into rvc-dev 2020-03-05 00:01:37 +00:00
John W. Bruce
1f1ba94a61 Cache Max Subsample Size
(This is a merge of http://go/wvgerrit/95003.)

To reduce the number of OEMCrypto calls on the decrypt path, the maximum
subsample size will now be cached after the first call to retrieve it.

Bug: 150018606
Test: Android Unit Tests
Test: CE CDM Unit Tests
Test: ExoPlayer high-bitrate playback on OEC v15
Change-Id: I0b5d38d8a082c0a127d2a47f112b76c64085bddb
2020-03-04 12:20:58 -08:00
John W. Bruce
82951b01ef Treat the (0,0) Pattern as 'cbcs'
(This is a merge of http://go/wvgerrit/94928.)

In OEMCrypto v16, we dropped support for 'cens' and 'cbc1'. However, we
did not redefine the pattern (0,0) to be a valid pattern for 'cbcs', even
though it was no longer being used to signal 'cbc1'. Instead, we made
the CDM reject CTR with a pattern ('cens') and CBC with a (0,0) pattern
('cbc1') to mirror the behavior of OEMCrypto v16.

However, some apps have been using 'cbc1' mode to decrypt audio in
'cbcs' content. This is normally not possible but is possible for a
subset of content. Furthermore, it is easy to do by accident because of
the way most packagers package 'cbcs' audio and the special significance
Widevine has historically given the (0,0) pattern.

This patch updates the CDM to not reject CBC with a (0,0) pattern but
instead treat it as 'cbcs' content. To decrypt it correctly, the pattern
is treated specially inside the CDM core and converted to the
recommended equivalent pattern — (10,0) — before passing the content to
OEMCrypto.

For more specifics, please see the design doc: http://go/vclfg

Bug: 150219982
Test: ExoPlayer Demo App 'cbcs' Content
Test: GTS 'cbcs' Content
Change-Id: I334ff15db5f7b7d62040a036ba6d17515c3caee4
2020-03-04 12:11:29 -08:00
Automerger Merge Worker
a03a713af2 hidl WVDrmPlugin openSession: set securityLevel correctly am: 9a530b7f1e am: 23c1be8cee am: 6e18484a49
Change-Id: I0162b1f8a62427ace6a52ccbef267624e56fea14
2020-03-04 20:03:22 +00:00
Automerger Merge Worker
1aa1ee7170 hidl WVDrmPlugin openSession: set securityLevel correctly am: 9a530b7f1e am: 23c1be8cee am: 8f127f41cb
Change-Id: I4136c508b2c4c9351ab5cf9f3ea9ae9ef4955926
2020-03-04 20:03:10 +00:00
Automerger Merge Worker
6e18484a49 hidl WVDrmPlugin openSession: set securityLevel correctly am: 9a530b7f1e am: 23c1be8cee
Change-Id: I0ea9b79244b92ab9afd6a963c2753e47c406529a
2020-03-04 19:48:20 +00:00
Automerger Merge Worker
8f127f41cb hidl WVDrmPlugin openSession: set securityLevel correctly am: 9a530b7f1e am: 23c1be8cee
Change-Id: I30c8e0fd77385a4d14ef0c8483b2654792dcdbc1
2020-03-04 19:48:01 +00:00
Automerger Merge Worker
23c1be8cee hidl WVDrmPlugin openSession: set securityLevel correctly am: 9a530b7f1e
Change-Id: I7dbc26be06ae0fdfa0013dd65a57c169b21f4bdc
2020-03-04 19:33:38 +00:00
Robert Shih
9a530b7f1e hidl WVDrmPlugin openSession: set securityLevel correctly
Merge of http://go/wvgerrit/94827

Bug: 149035295
Bug: 150103154
Bug: 150407639
Test: VtsHalDrmV1_2TargetTest
Change-Id: I3687b2305eb413112f7fbd0d5127d2168cdf376d
2020-03-04 18:44:44 +00:00
Automerger Merge Worker
ea2124a286 Merge "Merge "CDM handles mixed output warnings." into rvc-dev am: d3f10ece7c am: cfb91676e9" into rvc-d1-dev-plus-aosp 2020-03-02 18:54:55 +00:00
Automerger Merge Worker
42cb23e6e9 Merge "CDM handles mixed output warnings." into rvc-dev am: d3f10ece7c am: cfb91676e9
Change-Id: I634b830d2673ec385146cca388577b54ce60f68b
2020-03-02 18:54:51 +00:00
Automerger Merge Worker
09d4f2b535 Merge "CDM handles mixed output warnings." into rvc-dev am: d3f10ece7c am: bbf7f28831
Change-Id: Ie8b36f165c74fc8fbebd636a3efc8e81bb3393e1
2020-03-02 18:54:48 +00:00
Automerger Merge Worker
bbf7f28831 Merge "CDM handles mixed output warnings." into rvc-dev am: d3f10ece7c
Change-Id: Ia54a736025a3fe6eab32ab616947785f98e68ac3
2020-03-02 18:44:17 +00:00
Automerger Merge Worker
cfb91676e9 Merge "CDM handles mixed output warnings." into rvc-dev am: d3f10ece7c
Change-Id: I8fcebbe44c80c38448915cff2ef506ccedc32865
2020-03-02 18:43:58 +00:00
Alex Dale
d3f10ece7c Merge "CDM handles mixed output warnings." into rvc-dev 2020-03-02 18:35:13 +00:00
Automerger Merge Worker
c80a6473d9 Merge "Use staging provisioning server even more" into rvc-dev am: b73c015557 am: b604a114fa
Change-Id: I4a71190a313d2442cc15d7ce63fdbc5d9637f952
2020-02-29 02:12:31 +00:00
Automerger Merge Worker
a035e72daf Merge "Use staging provisioning server even more" into rvc-dev am: b73c015557 am: fa58da183b
Change-Id: I77974a8abf1e860ae127842b7e01d91833729ff0
2020-02-29 02:12:19 +00:00
Automerger Merge Worker
b604a114fa Merge "Use staging provisioning server even more" into rvc-dev am: b73c015557
Change-Id: Idd16ce804b03e6eca5c5b40411b2455ef9b8780e
2020-02-29 01:57:40 +00:00
Automerger Merge Worker
fa58da183b Merge "Use staging provisioning server even more" into rvc-dev am: b73c015557
Change-Id: I5df3c9e50fec4cf8fedc7dbc72905410a37822da
2020-02-29 01:57:38 +00:00
Fred Gylys-Colwell
b73c015557 Merge "Use staging provisioning server even more" into rvc-dev 2020-02-29 01:44:38 +00:00
Alex Dale
fb5c67929f CDM handles mixed output warnings.
[ Merge of http://go/wvgerrit/94483 ]

With OEMCrypto V16 comes a new potential error code from calls to
DecryptCENC().  WARNING_MIXED_OUTPUT_PROTECTION may be returned by
supporting devices if one of the output devices does not meet the
required HDCP level for the decryption key/license; however the output
is instead restricted (by OEMCrypto) to devices that are secure. This
warning is informative to the CDM; but no action can/should be taken
by the CDM.

In addition, if DecryptCENC() returns an error/warning, it is likely
that the same status code will be returned on subsequent calls to
decrypt within the same crypto session.  To reduce the number of logs
the CDM produces within the same crypto session only changes in error
codes are logged.

Bug: 140825538
Change-Id: Iaf9da3f0c88889525f73f3153a5977c8416286bb
(cherry picked from commit d9c703ef9e)
Merged-In: Iaf9da3f0c88889525f73f3153a5977c8416286bb
2020-02-29 01:24:12 +00:00
Fred Gylys-Colwell
1c8fac32d3 Use staging provisioning server even more
Merge from Widevine repo of http://go/wvgerrit/94745

I missed a few in http://go/wvgerrit/94067

Test: ran unit tests
Bug: 149622735
Change-Id: I2289adb05bbd41376528e09bbaa62430644a3e20
2020-02-29 00:50:04 +00:00
Rahul Frias
951ec2c6f5 Correct log messages
[ Merge of http://go/wvgerrit/94903 ]

Prefixes are no longer needed now that file and line number are
being logged.

Bug: 149829271
Test: wv unit/integration tests
Change-Id: I0ba701fc262cdb59056dca139c38ed76035bcbb8
2020-02-28 15:19:36 -08:00
Automerger Merge Worker
c2387ab507 Merge "Add odk_test to platform tests" into rvc-dev am: 5ebb430af7 am: 013fff3618
Change-Id: Icbfce4669bf2dc6889c8a6eb3dc029b0ff9a6b83
2020-02-28 02:54:35 +00:00
Automerger Merge Worker
53ec720bfc Merge "Add odk_test to platform tests" into rvc-dev am: 5ebb430af7 am: 440b864da3
Change-Id: I39878e94de6640b3a58d3d6fb829df89dfd6d245
2020-02-28 02:54:14 +00:00
Automerger Merge Worker
013fff3618 Merge "Add odk_test to platform tests" into rvc-dev am: 5ebb430af7
Change-Id: I7c3466b42ad6512831e49181cd09fa92e5719b01
2020-02-28 02:43:44 +00:00
Automerger Merge Worker
440b864da3 Merge "Add odk_test to platform tests" into rvc-dev am: 5ebb430af7
Change-Id: I6986db3399629f65af8e74d254b3e5a7736ea6a2
2020-02-28 02:43:41 +00:00
TreeHugger Robot
5ebb430af7 Merge "Add odk_test to platform tests" into rvc-dev 2020-02-28 02:26:50 +00:00
Automerger Merge Worker
0e2adab96f Merge "Search for test executables in odk_test" into rvc-dev am: 6373ff35ca am: c4804925ed
Change-Id: I04e4e66881432fa8aed5af33d9227db5faef706f
2020-02-28 00:18:40 +00:00
Automerger Merge Worker
0d9d17a748 Merge "Search for test executables in odk_test" into rvc-dev am: 6373ff35ca am: 50a831a37e
Change-Id: I00f12b28f3752b7f69a6504f16f01c471912fbd5
2020-02-28 00:18:13 +00:00
Automerger Merge Worker
c4804925ed Merge "Search for test executables in odk_test" into rvc-dev am: 6373ff35ca
Change-Id: Iadc7390665edb0324437d35e350fb8994a88c63c
2020-02-28 00:04:21 +00:00
Automerger Merge Worker
50a831a37e Merge "Search for test executables in odk_test" into rvc-dev am: 6373ff35ca
Change-Id: I3e31324bfb2c681edb225999c98ff7218ed866df
2020-02-28 00:00:01 +00:00
Rahul Frias
6373ff35ca Merge "Search for test executables in odk_test" into rvc-dev 2020-02-27 23:47:56 +00:00
Robert Shih
b1ee517ff1 Add odk_test to platform tests
Bug: 150158890
Test: build & inspect platform_tests.zip
Change-Id: I06c0acd0f7fed168e8e2ad876a58983b11d9b43f
2020-02-27 21:35:30 +00:00
Automerger Merge Worker
5e6aaefc69 Fix nonce problem in license renewal am: 0947bd185b am: 54a2a92988
Change-Id: I4330802d905f4bb48e5d2423ac2bf58491f51107
2020-02-27 20:37:03 +00:00
Automerger Merge Worker
af930f2cc4 Fix nonce problem in license renewal am: 0947bd185b am: e8406c63fd
Change-Id: I26567ab69b4c3f347800b77230b09811f9b2c75f
2020-02-27 20:36:37 +00:00
Fred Gylys-Colwell
e8406c63fd Fix nonce problem in license renewal
am: 0947bd185b

Change-Id: Ibeb92f4598af6bcf414f6757e8b9816d9988751e
2020-02-27 12:24:29 -08:00
Fred Gylys-Colwell
54a2a92988 Fix nonce problem in license renewal
am: 0947bd185b

Change-Id: Ic1bc6c3a83ff64d09bafac0a3851fa26973139a3
2020-02-27 12:24:26 -08:00
Automerger Merge Worker
566e2448d2 Change some test EXPECT to ASSERT to avoid segfaults am: 7f006997cb am: 938bfe1a40
Change-Id: I1d2481c8f87978600dcdb052b0f4370a7c1c6b99
2020-02-27 04:53:36 +00:00
Automerger Merge Worker
81a9803241 Change some test EXPECT to ASSERT to avoid segfaults am: 7f006997cb am: 69b6019d39
Change-Id: Ia90b035b76a3bd9e6a28529fd197710e6a336e36
2020-02-27 04:39:10 +00:00
Automerger Merge Worker
69b6019d39 Change some test EXPECT to ASSERT to avoid segfaults am: 7f006997cb
Change-Id: I5f62b43edd5898bda5c4c06ee44bb34b62e5a9e6
2020-02-27 04:08:11 +00:00
Automerger Merge Worker
938bfe1a40 Change some test EXPECT to ASSERT to avoid segfaults am: 7f006997cb
Change-Id: I32d98f57678911e3b0eb3882064aa1161fb7d9c8
2020-02-27 04:07:51 +00:00
Fred Gylys-Colwell
0947bd185b Fix nonce problem in license renewal
Merge from Widevine repo of http://go/wvgerrit/94523

For OEMCrypto v16, a renewal does not get a new nonce.

Bug: 149856581
Test: WvCdmRequestLicenseTest.StreamingLicenseRenewal
Change-Id: I258f0bcb9c9a417310785f130d32d66fa7430185
2020-02-26 14:32:24 -08:00
Rahul Frias
19605579d5 Search for test executables in odk_test
[ Merge of http://go/wvgerrit/94507 ]

./build_and_run_all_tests.sh runs all WV unit/integration tests.
It searches for unit/integration tests in $OUT/data/nativetest/ .
ODK tests are in $OUT/data/nativetest/vendor/odk_test. Adding this
path to the list of directories that the script searches through.

Bug: 150158890
Test: Run ./build_and_run_all_tests.sh
Change-Id: Ib3b7d247a5cb86f9972157c13ad60b7f3cbbb7dc
2020-02-26 13:51:14 -08:00
Fred Gylys-Colwell
7f006997cb Change some test EXPECT to ASSERT to avoid segfaults
Merge from Widevine repo of http://go/wvgerrit/94505

Some tests use an EXPECT when checking an array size or to verify a
pointer is not null. Then they access the pointer or array. When they
use an EXPECT, this access results in a segfault.

I also removed a compiler warning about unused parameters.

Bug: 149856581
Test: request_license_test (now lists failed tests)
Change-Id: I08ac11250921245c89ed5c0c43cc5f4321e0a9cc
2020-02-26 13:11:25 -08:00