Commit graph

184 commits

Author SHA1 Message Date
Robert Shih
d94926c55d Merge "Add drm hal/vts owners"
am: 72c3a98e9f

Change-Id: If29d7653aa2d75bf9a839519738146fefd2bebec
2020-01-28 15:12:33 -08:00
Robert Shih
e44ad509d6 Add drm hal/vts owners
Change-Id: Ie6f0116a0fc9f4590b3a272d877c0d5be719d624
2020-01-28 13:14:09 -08:00
Robert Shih
d3411d0ce4 Merge "drm vts: introduce helper library"
am: 3a8eb92143

Change-Id: I8960aa5d7a264c37916335dc898a914e0c8bd9cf
2020-01-27 16:16:50 -08:00
Robert Shih
f2fd4adece drm vts: introduce helper library
The helper library includes
* gtest parameter structure (hal instance name, drm scheme uuid)
* existing vendor module APIs

Bug: 142397658
Test: VtsHalDrmV1_0TargetTest
Change-Id: Ifbb443fcb1414e45de2a2073ec545ddd422b9a4d
2020-01-27 20:16:43 +00:00
Steven Moreland
d246996124 Merge "Convert VtsHalDrmV1_*TargetTest to be parameterized test"
am: ca61d1a366

Change-Id: Ieff14ff236c884e5611075258695987a2a606256
2020-01-16 10:38:30 -08:00
Dan Shi
d5f85888fe Convert VtsHalDrmV1_*TargetTest to be parameterized test
Removing dependency from VTS infrastructure so that test can run
standalone, for instance with atest/TEST_MAPPING. Once this is
done for every test, VTS can use the core testing infra.

Bug: 142397658
Test: atest VtsHalDrmV1_0TargetTest VtsHalDrmV1_1TargetTest \
  VtsHalDrmV1_2TargetTest
Change-Id: Ic436d949f5b26087e32c48fac220cd5abad8a443
2020-01-15 20:24:08 +00:00
Automerger Merge Worker
66fb6492f5 default drm hidl: Fix decrypt destination base ptr am: d79abbb0d3 am: 86828796ac am: 44fa9a5cf0 am: 0e8630788f am: 119b9ea01d am: 43f65e0f60
Change-Id: I66ebe64f3387a8b46eb745c6b037877605e05945
2020-01-09 05:21:10 +00:00
Automerger Merge Worker
119b9ea01d default drm hidl: Fix decrypt destination base ptr am: d79abbb0d3 am: 86828796ac am: 44fa9a5cf0 am: 0e8630788f
Change-Id: I73b41a1aebe7dec987e637ca30c9d65b1aedc41e
2020-01-09 04:51:59 +00:00
Automerger Merge Worker
0e8630788f default drm hidl: Fix decrypt destination base ptr am: d79abbb0d3 am: 86828796ac am: 44fa9a5cf0
Change-Id: Ie67b811fe2a172d9a33458ed5c23578c71a0a221
2020-01-09 04:33:04 +00:00
Automerger Merge Worker
44fa9a5cf0 default drm hidl: Fix decrypt destination base ptr am: d79abbb0d3 am: 86828796ac
Change-Id: I4fac71fd9946d37a7a3b1d32a611f007de3e5303
2020-01-09 04:14:08 +00:00
Automerger Merge Worker
86828796ac default drm hidl: Fix decrypt destination base ptr am: d79abbb0d3
Change-Id: Ifaa69ef0ed98f90a42a66b7b64ef9d61457af107
2020-01-09 03:59:10 +00:00
Steven Moreland
0942e33017 Merge "./update-makefiles.sh, for union changes/memory"
am: 00daede4d5

Change-Id: Ie67ccdf2decd3643936793a17d23646452a227b2
2019-11-26 14:55:40 -08:00
Steven Moreland
7696aa885f ./update-makefiles.sh, for union changes/memory
Many more types can be used in Java.

Bug: 143566068
Test: N/A
Change-Id: Ie18e1e0f9c22f2ea15b755df3b048c9d651c4945
2019-11-26 09:24:31 -08:00
Robert Shih
d79abbb0d3 default drm hidl: Fix decrypt destination base ptr
Bug: 144351324
Test: poc_CryptoPlugin_155
Change-Id: Id5d221cd6978d55c46c0368aceb10c1d2f559fd9
2019-11-18 08:23:30 +00:00
Colin Cross
978e59e401 Merge "Use libcrypto_static instead of libcrypto" am: c048c187be
am: 06b758a918

Change-Id: I7cef34166243e60df62b9ab2a1cb8de3142e4104
2019-09-26 07:54:40 -07:00
Colin Cross
263d2df2c7 Use libcrypto_static instead of libcrypto
Replace libcrypto with libcrypto_static, which can be protected through
visibility to ensure only modules that don't affect FIPS certification
can use it.

Bug: 141248879
Test: m checkbuild
Change-Id: I8685cb06d15f3425eeb96d998ffda54c82dcd387
2019-09-18 11:07:09 -07:00
Robert Shih
103efe8c40 default hidl CryptoPlugin: security fixes am: 1e18883b72 am: 02ef6a6283
am: 4d3b73ee5e

Change-Id: I984dbf4463f731bced310342b5763a14ad0cdc4d
2019-09-11 21:30:09 -07:00
Robert Shih
f6e7c9ed25 default hidl CryptoPlugin: security fixes [RESTRICT AUTOMERGE] am: d22f1447fe
am: 756f134fcc

Change-Id: I4289e38c6eab3e8cac9e489a08f74b3efcf008f9
2019-09-11 21:18:04 -07:00
Robert Shih
756f134fcc default hidl CryptoPlugin: security fixes [RESTRICT AUTOMERGE]
am: d22f1447fe

Change-Id: I480b83a0c4ffd752637ff5357b30d6f5c1916b4b
2019-09-11 21:10:00 -07:00
Robert Shih
02ef6a6283 default hidl CryptoPlugin: security fixes
am: 1e18883b72

Change-Id: Ifbbc3cf6c827085046259365808d962ad192c55a
2019-09-11 21:09:00 -07:00
Robert Shih
d22f1447fe default hidl CryptoPlugin: security fixes [RESTRICT AUTOMERGE]
* reject native handle output for clearkey
* validate subsample sizes

Bug: 137370777
Test: cryptopoc
Change-Id: I2a81f2a00ebf7954b16fb10d2af586ce0da801ed
2019-09-11 22:08:28 +00:00
Robert Shih
1e18883b72 default hidl CryptoPlugin: security fixes
* reject native handle output for clearkey
* validate subsample sizes

Bug: 137370777
Test: cryptopoc
Change-Id: Idf075e1a297fe1ab3ea3e1621806dd46b4a51e35
2019-09-11 22:08:19 +00:00
Steven Moreland
b3a4d3832e Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I075670b64eebbbbd6a6ae0e84ad51bf1c6f5ba36
2019-09-06 01:07:02 +00:00
Steven Moreland
6d494b2346 Merge "Update hidl makefiles for bpfmt" am: ff0bd741ca
am: 96f40f7b02

Change-Id: Idbf030e4993067bdb8181321bca2de00c9b6f7ef
2019-04-18 14:34:45 -07:00
Steven Moreland
1ae4615d9f Update hidl makefiles for bpfmt
hidl-generated makefiles are now generated such that bpfmt(file) == file.

Bug: 67417008
Test: enable bpfmt hook
Change-Id: I1f69d292bc23a7cc293a66110cb02d597e1019ad
2019-04-17 09:38:50 -07:00
Steven Moreland
7f4e21adda Merge "Update makefies: no 'types'" am: 4ee5ec1469 am: bab622f6a6
am: 7224bc9bcf

Change-Id: I434939e0770afa436c532a945542fce30a71ef7d
2019-03-04 16:05:59 -08:00
Steven Moreland
a878aee9ab Update makefies: no 'types'
Bug: 123976090
Test: N/A
Change-Id: I30fb04c81889b62775e1b764b965fdb0f893de17
2019-03-04 11:27:17 -08:00
Peter Kalauskas
724a9fc643 Add lazy service target for drm HAL
Test: Run gts on Pixel 1/2/3, marlin_svelte, and walleye_svelte
Bug: 112386116
Change-Id: I5d86e3158794ebae967efb009a0cef8cd140ccb7
2019-01-08 09:00:23 -08:00
Chih-hung Hsieh
df66e3cb29 Merge "Fix performance-for-range-copy warnings" am: d01f7050ac am: 51e835ce22
am: 86fefab5e9

Change-Id: Ib139d710d47a7a51e24ba8ba582b252f5ff6e244
2018-12-17 14:09:52 -08:00
Chih-Hung Hsieh
65ab67312b Fix performance-for-range-copy warnings
Bug: 30413223
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,performance*
Change-Id: I1b76a22eab100a31e77048626e48169fe7eeaf92
2018-12-17 19:57:21 +00:00
Keun Soo YIM
68ae05dd2d pack VTS cc_test binaries as general-tests
Test: make general-tests
Bug: 120093339
Merged-In: I363450d205868f900e4925ccff1430e2a569f2a4
Change-Id: I363450d205868f900e4925ccff1430e2a569f2a4
2018-12-07 10:49:56 -08:00
Keun Soo YIM
ff84c37bc1 pack VTS cc_test binaries as general-tests
Test: make general-tests
Bug: 120093339
Change-Id: I363450d205868f900e4925ccff1430e2a569f2a4
2018-11-27 16:11:41 -08:00
Jeff Tinker
5c2e29de11 Fix failing drm 1.0 vts tests
The shared library path was incorrectly set based on
the drm.64bit.enabled flag. It should be set based
on whether the drm service is running as 32-bit or
64-bit.

Test: vts-tradefed run commandAndExit vts -m VtsHalDrmV1_0Target

bug:111289939
Change-Id: I388dc87bd4566211dc2901feccf1e6e1c90bfe67
Merged-In: I388dc87bd4566211dc2901feccf1e6e1c90bfe67
2018-09-13 00:39:42 +00:00
Jeff Tinker
3418cd6077 Remove spurious error log message
In change id Ie2f306bce6aec697ae584da3f55b3cf72edaa07b, a
shared memory leak was fixed using a workaround that
maintained compatibility with the frozen DRM HAL API
1.1. Unfortunately it triggered an error log message that
was no longer an error condition.  This change just removes
the log line to avoid raising undue concerns.

Change-Id: I9abe08ef5ab86b2f8589a5c1e5c5175e19ab09d2
Test: Compiles
Bug:111131173
2018-07-31 18:34:12 +00:00
Jeff Tinker
b065c9d8b7 Fix failing drm 1.0 vts tests
The shared library path was incorrectly set based on
the drm.64bit.enabled flag. It should be set based
on whether the drm service is running as 32-bit or
64-bit.

Test: vts-tradefed run commandAndExit vts -m VtsHalDrmV1_0Target

bug:111289939
Change-Id: I388dc87bd4566211dc2901feccf1e6e1c90bfe67
2018-07-20 16:36:05 -07:00
Zhuoyao Zhang
cf50a32e57 Convert drm hal test to use VtsHalHidlTargetTestEnvBase
* The testEnvBase template is only used to register the testing hal.
* The service name is specifically determined by the test logic, so
  disable the feature for vts to run the test against all service
  instance (by setting HalServiceCombMode::NO_COMBINATION)

Bug: 64203181
Test: make vts
      vts-tradefed run vts -m VtsHalDrmV1_0Target
      vts-tradefed run vts -m VtsHalDrmV1_1Target

Change-Id: Ib2e005e8ccbc815067f0e9455fcd3e6c5ec151fb
2018-02-13 15:25:59 -08:00
Rahul Frias
173d4fb93b Add new values to KeyRequestType
Two additional KeyRequestTypes have been added, None and Update. None
indicates that no key request is needed as keys have already been loaded.
Update indicates that while keys have previously been loaded, an
additional (non-renewal) license request is needed.

Bug: 70335058
Test: make
Change-Id: I43b7491110871332c3a79573773c441c2a4f5ccb
2018-01-23 13:33:59 -08:00
Jeff Tinker
5fee182384 Fix potential memory leak in default drm crypto plugin
bug:70205403

Test: manual play movies test forcing the legacy default
  widevine plugin to be used, instead of the widevine hidl
  service.

Change-Id: Icb5b234999c5bf49b31d967814e48d42d9dd767f
2018-01-05 11:18:00 -08:00
TreeHugger Robot
7c258c36cd Merge "Cleanup drm_hal_clearkey_test." 2017-11-15 01:02:11 +00:00
Edwin Wong
31a86d2847 Cleanup drm_hal_clearkey_test.
To stay close to the original test, the only time the test will abort is
when it encounters errors in Setup.

The following changes are applied in this CL:

- #include <openssl/aes.h> should be sorted alphabetically
- gtest macro should follow convention of ASSERT_EQ(expected, actual)
- removed unused variables: num, ecount_buf and kNotSecure
- TestQueryKeyStatus needs to call closeSession()
- moved and renamed test dependent global constants:
   e.g. k256SubSampleByteCount, k512SubSampleClearBytes and k512SubSampleEncryptedBytes
- use isOK() for checking Status::OK, e.g.
   ASSERT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk());

Test: VTS test
  adb shell /data/nativetest/VtsHalDrmV1_0TargetTest/VtsHalDrmV1_0TargetTest

bug: 68735305
Change-Id: Ic8f43b4c35644bf7223f24a531eae818e59e0f4a
2017-11-13 14:13:26 -08:00
Steven Moreland
8db261bc99 Updating makefiles for hidl_interface.
Bug: 64487114
Test: manual
Merged-In: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
Change-Id: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
2017-11-13 10:00:18 -08:00
Edwin Wong
c1512b4577 Add tests to validate key length for clearkey plugin. am: cc77a50e96 am: 01802815eb am: 36c9c34bdb
am: d29bc78ec9

Change-Id: Idbae7b29df1f71b331a13d31e47de925bceb4514
2017-11-03 05:46:59 +00:00
Edwin Wong
d29bc78ec9 Add tests to validate key length for clearkey plugin. am: cc77a50e96 am: 01802815eb
am: 36c9c34bdb

Change-Id: Ibb92aa618ceec88721ed807819d31516ab70595c
2017-11-03 05:44:56 +00:00
Edwin Wong
36c9c34bdb Add tests to validate key length for clearkey plugin. am: cc77a50e96
am: 01802815eb

Change-Id: I298891316951cc6ba5f000b796fb60c0b4f76290
2017-11-03 05:42:54 +00:00
Edwin Wong
01802815eb Add tests to validate key length for clearkey plugin.
am: cc77a50e96

Change-Id: Id61b8d76ef30a6c66edd10cd48b4ecdad795165d
2017-11-03 05:40:23 +00:00
Edwin Wong
cc77a50e96 Add tests to validate key length for clearkey plugin.
AesCtrDecryptor::decrypt() doesn't check whether the size of "key"  is
equal to 16 bytes,  which may lead to an OOB read problem in the context
of mediadrmserver. The fix is in clearkey plugin. Add tests to validate
the fix.

Test: VTS test
  adb shell /data/nativetest/VtsHalDrmV1_0TargetTest/VtsHalDrmV1_0TargetTest

bug: 63982768

Merged-In: Ife2da17e7f39d8031bc36b83c3b27ba5e9d83eb7
Change-Id: Ife2da17e7f39d8031bc36b83c3b27ba5e9d83eb7
2017-11-02 14:46:43 -07:00
Steven Moreland
1d7374c5e1 Update for Soong java makefiles. am: c3e80fa01e am: 0fff75dee1 am: 6c811964a1
am: 116161d94e

Change-Id: I33643636e2511de77fdf7de57777eb67edee2e52
2017-10-11 16:39:21 +00:00
Steven Moreland
116161d94e Update for Soong java makefiles. am: c3e80fa01e am: 0fff75dee1
am: 6c811964a1

Change-Id: I85ccbb4a15cd18938607f5bca4e065b9d7e0182b
2017-10-11 16:31:07 +00:00
Steven Moreland
0fff75dee1 Update for Soong java makefiles.
am: c3e80fa01e

Change-Id: Ia8835f9c95bd98a96f5fd3aff11191e7d3726fb9
2017-10-11 16:23:54 +00:00
Steven Moreland
c3e80fa01e Update for Soong java makefiles.
Test: pass
Bug: 33420795
Change-Id: Id9b1919a19b8ff682738cfb0869a479b4dbb4293
2017-10-10 23:07:20 +00:00