Commit Graph

1917 Commits

Author SHA1 Message Date
John W. Bruce
1d5b7cc8fe Take a Global Write Lock Before Calling OEMCrypto_GenerateNonce()
(This is a merge of http://go/wvgerrit/77803)

In OEMCrypto 15.2, OEMCrypto_GenerateNonce() is a Session Initialization
Function, which means the global OEMCrypto lock must be held before
calling it. There's no harm updating our code to behave this way now,
even before OEMCrypto 15.2 implementations are ready, since it's a
stricter guarantee than the current behavior.

Bug: 131327826
Test: CE CDM Unit Tests
Test: Android Unit Tests
Change-Id: Icb6a86dea7298c99596fa9e3d90cec721ebcb8a6
2019-05-31 19:02:29 -07:00
Rahul Frias
6c9c4697f0 Merge "Return key request type none after key rotation" into qt-dev am: 999a466275 am: 4690da2bcb
am: 4c9a3a6f02

Change-Id: Iddcac699401f64d920fcb8ff73053410019ec028
2019-05-31 09:55:31 -07:00
Rahul Frias
4c9a3a6f02 Merge "Return key request type none after key rotation" into qt-dev am: 999a466275
am: 4690da2bcb

Change-Id: I45387edbb83f05dcadec53e4514cb97c68eae6c7
2019-05-31 09:33:36 -07:00
Rahul Frias
999a466275 Merge "Return key request type none after key rotation" into qt-dev 2019-05-31 15:55:05 +00:00
Rahul Frias
b271da5139 Merge "WvCdmExtendedDurationTest#VerifyLicenseRequestTest fixes" into qt-dev am: e4d432806a am: 785cd12f3c
am: 09e2b6dfa6

Change-Id: I5b1757fee7311a2d34ea5299ec900421dc160634
2019-05-29 19:30:56 -07:00
Rahul Frias
09e2b6dfa6 Merge "WvCdmExtendedDurationTest#VerifyLicenseRequestTest fixes" into qt-dev am: e4d432806a
am: 785cd12f3c

Change-Id: Ic2853252157390f93d2c6cc9406361feb7696d99
2019-05-29 19:24:33 -07:00
Rahul Frias
e4d432806a Merge "WvCdmExtendedDurationTest#VerifyLicenseRequestTest fixes" into qt-dev 2019-05-30 02:06:42 +00:00
Rahul Frias
b7c6f9b52c Address request license test failures [ DO NOT MERGE ]
[ Merge of http://go/wvgerrit/79883 ]

This corrects test code and undoes CE CDM changes in b/113167010 which
will be resolved in a future release.

The tests failures addressed are
* ProvisioningTestWithServiceCertificate
* ReleaseRetryOfflineKeyTest
* ReleaseRetryL3OfflineKeyTest
* ReleaseRetryL3OfflineKeySessionUsageDisable

ProvisioningInterspersedRetryTest has been disabled and will be
addressed in a post 15.2 OEMCrypto release in 133641240

Bug: 119428680
Test: WV unit/integration tests
Change-Id: I7961b4556a0ac749e4f38d43f1bea8f520d67f20
2019-05-29 19:04:52 -07:00
Rahul Frias
3c9175fec5 Return key request type none after key rotation
[ Merge of http://go/wvgerrit/80084 ]

Corrected the key type being returned after entitled keys from
init data are loaded. Made test changes to validate.

Bug: 133903028
Test: WV unit/integration tests
Change-Id: Icb44587f5c3aba3b0facae6d83dc9344d6b60833
2019-05-29 19:03:43 -07:00
Srujan Gaddam
1423b9261f Merge "Change move_widevine_data.sh to move L3 files" into qt-dev am: f246f028b2 am: c9ba0981ba
am: b4396d0e6e

Change-Id: I2549d67295dc4bb9599a951ea6ed9d8f99048d67
2019-05-25 10:58:02 -07:00
Srujan Gaddam
28696a2125 Reverse LD_LIBRARY_PATH order based on liboemcrypto.so am: 45d02c545c am: 61510bbc8a
am: 971aa7d2d4

Change-Id: I96e5f4358ef37ec1dce634b021fd64f24ed7a77e
2019-05-25 10:34:07 -07:00
Srujan Gaddam
c9ba0981ba Merge "Change move_widevine_data.sh to move L3 files" into qt-dev
am: f246f028b2

Change-Id: If234e0936bb67da65a60cf724792bdea97d3fae9
2019-05-25 10:05:10 -07:00
Srujan Gaddam
61510bbc8a Reverse LD_LIBRARY_PATH order based on liboemcrypto.so
am: 45d02c545c

Change-Id: I792d5690d8a635338a844addc4bd4ad3ef469cb1
2019-05-25 09:58:50 -07:00
TreeHugger Robot
f246f028b2 Merge "Change move_widevine_data.sh to move L3 files" into qt-dev 2019-05-24 20:59:31 +00:00
Srujan Gaddam
45d02c545c Reverse LD_LIBRARY_PATH order based on liboemcrypto.so
Bug: b/133427576
Test: Unit tests on Taimen and Crosshatch
Merge of http://go/wvgerrit/79804

Currently, the run_all_unit_tests.sh script fails to load in the Level 1
OEMCrypto for some devices that don't have a 64-bit liboemcrypto.so. This
is because the liboemcrypto.so tries to load in libQSEEComAPI.so, which
some devices contain both a 32-bit and 64-bit version of. Since we set
the LD_LIBRARY_PATH to use /vendor/lib64 first, and since we only have a
32-bit liboemcrypto.so, the 32-bit liboemcrypto.so will try to load in the
libQSEEComAPI.so in the lib64 path first. Since the liboemcrypto.so is
32-bit, it will fail to open the 64-bit library. The solution to this is
to conditionally set the LD_LIBRARY_PATH based on if a 64-bit
liboemcrypto.so exists or not.

Change-Id: I80a9e778f31f089f66df0544cb022d810e9d3de3
2019-05-24 10:30:10 -07:00
Rahul Frias
80b8e29c3f WvCdmExtendedDurationTest#VerifyLicenseRequestTest fixes
[ Merge of http://go/wvgerrit/79724 ]

Bug: 122982573
Test: WV unit/integration tests
Change-Id: Icb7b192311dc6bbe630d96f993ccca774160774b
2019-05-22 18:12:06 -07:00
Haibo Huang
f078443fd7 Merge "Using ::testing::DoAll" into qt-dev-plus-aosp 2019-05-22 17:43:01 +00:00
Haibo Huang
e3e086e3f8 Using ::testing::DoAll
Without this statement, compilation failed with new googletest.

Test: build
Bug: 129498355
Change-Id: I9eb7b7a2634f20ef80a23b75c06fc84a2fa52dc3
(cherry picked from commit 9055e93a70)
2019-05-22 17:38:58 +00:00
Haibo Huang
c70771dd20 Using ::testing::DoAll
[ Merge of ag/7620084 ]

Without this statement, compilation failed with new googletest.

Test: build
Bug: 129498355
Change-Id: I5e3f5310617e00821f70079fc700bc3f87c3d0ab
(cherry picked from commit 5764d3f801)
2019-05-22 17:27:03 +00:00
Rahul Frias
9900ce909b Merge "Ref count WvCdmDecryptionModule" 2019-05-22 14:28:02 +00:00
Fred Gylys-Colwell
aa7f7d3ac4 Remove test keybox one more time
Merge from Widevine repo of http://go/wvgerrit/78883

Bug: 119316243
Test: unit tests
Change-Id: Ic6748a6e020c2a4058510fb5c6c5a821e57cc5fd
2019-05-22 00:25:56 +00:00
Rahul Frias
776996d6d2 Ref count WvCdmDecryptionModule
[ Merge of http://go/wvgerrit/78803 ]

WvCdmDecryptionModule needs to be refcounted since it inherits
from RefBase. The test code instantiates it as a member variable.

Bug: 133188706
Test: WV unit/integration tests
Change-Id: Ib41f3477a55923fb4cc26472e42d3e18eb2b84d4
2019-05-21 11:41:52 -07:00
Haibo Huang
5764d3f801 Using ::testing::DoAll
Without this statement, compilation failed with new googletest.

Test: build
Bug: 129498355
Change-Id: I5e3f5310617e00821f70079fc700bc3f87c3d0ab
2019-05-20 11:19:06 -07:00
Haibo Huang
c19f8867c0 Merge "Using ::testing::DoAll" 2019-05-20 00:19:13 +00:00
Haibo Huang
9055e93a70 Using ::testing::DoAll
Without this statement, compilation failed with new googletest.

Test: build
Bug: 129498355
Change-Id: I9eb7b7a2634f20ef80a23b75c06fc84a2fa52dc3
2019-05-20 00:18:22 +00:00
Rahul Frias
1ae3ff21e8 Merge "Correct android version number in test" into qt-dev am: 48650f74ab am: 5b3a43b17c
am: 766a15693a

Change-Id: I95a665e2eedeacea6d8ad1b676f8bd3757ddb76c
2019-05-18 04:00:21 -07:00
Fred Gylys-Colwell
b56e01cd2f Merge "Disable failures for LoadKeyWithSuspiciousIV and SelectKeyNotThereAPI15" into qt-dev am: 3454ccf51e am: d579bbf511
am: 5a9ef9a128

Change-Id: I56452ec76a98895d3dd077222e72030f40192f5a
2019-05-17 14:19:57 -07:00
Rahul Frias
48650f74ab Merge "Correct android version number in test" into qt-dev 2019-05-17 14:23:01 +00:00
Robert Shih
fe8924f814 Add CdmKeyStatus kKeyStatusUsableInFuture am: 69c8f488ca am: 6a329e6c9a
am: e6ba3ec747

Change-Id: Iee17c92d9a3f3fd390e05bb0324ba04861236210
2019-05-16 20:07:33 -07:00
Fred Gylys-Colwell
f3b65702ca Merge "Address review comments for OEMCrypto Build Information" 2019-05-17 01:19:56 +00:00
Rahul Frias
4f273991b9 Correct android version number in test
[ Merge of http://go/wvgerrit/79144 ]

Bug: 132908020
Test: WV unit/integration tests
Change-Id: Idf5cf3e1e886af3bfed157320fa09d66dfa55c0d
2019-05-16 14:44:40 -07:00
TreeHugger Robot
3454ccf51e Merge "Disable failures for LoadKeyWithSuspiciousIV and SelectKeyNotThereAPI15" into qt-dev 2019-05-16 20:34:18 +00:00
Srujan Gaddam
189eb87977 Change move_widevine_data.sh to move L3 files
Bug: b/130252305
Test: nyc-mr2-release -> pi-dev, oc-mr1-release -> pi-dev
nyc-mr2-release -> oc-mr1-release -> pi-dev upgrades with offline
licenses
Merge of http://go/ag/7323341

In N, the L3 files were stored in /data/mediadrm/IDM[uid]/. In O, they
were moved to /data/mediadrm/IDM[uid]/L3/. In P, we moved the contents
of mediadrm to /data/vendor/mediadrm/. For an O->P upgrade, the L3 files
can be read in /data/vendor/mediadrm/IDM[uid]/L3/, but when we upgrade
N->P, the L3 files sit in /data/vendor/mediadrm/IDM[uid]/, unable to be
read. This CL addresses this issue by changing the script to move any L3
files if they exist under this directory to the L3 subdirectory after we
do the bulk move from /data/mediadrm/ to /data/vendor/mediadrm/.

Change-Id: I319c323879766df063d25478046367878023a7cf
(cherry picked from commit 1a6ca36976)
2019-05-16 20:25:54 +00:00
Fred Gylys-Colwell
e4c7bc38f8 Address review comments for OEMCrypto Build Information
Merge of http://go/wvgerrit/78683

There were some review comments in http://go/wvgerrit/78683 that came
in after the code was merged to the qt-dev branch.  This CL addresses
them on the master branch.

Test: unit tests.
Bug: 129070445
2019-05-16 18:32:16 +00:00
Srujan Gaddam
fa60c58344 Merge "Update Level 3 to OEMCrypto v15.2" 2019-05-15 22:49:21 +00:00
Robert Shih
69c8f488ca Add CdmKeyStatus kKeyStatusUsableInFuture
Bug: 116738851
Test: unit tests
Change-Id: I49728788e57905806b72e891f3654fbf0c8b1bc0
2019-05-15 15:16:05 -07:00
Fred Gylys-Colwell
29becbc2bf Disable failures for LoadKeyWithSuspiciousIV and SelectKeyNotThereAPI15
Merge from Widevine repo of http://go/wvgerrit/78949

LoadKeyWithSuspiciousIV is a new test for OEMCrypto v15.2.  It is
being disabled since we do not require 15.2 for the Q release.

SelectKeyNotThereAPI15 was failing because the error code is
delayed. This is acceptable.

Bug: 132720732
Test: unit tests on taimen
Change-Id: Iea3fabfb3afd800065119ce812fb454be1e82644
2019-05-14 22:32:54 -07:00
Fred Gylys-Colwell
843c8ab83a Merge "Fix OEMCrypto UsageTableTest.GenerateReportWrongPST" into qt-dev am: 127f87770c am: e4eef77a01
am: 8a104ddc65

Change-Id: Ifbb57ea1111add3c018a6c115f9337c5594d6b79
2019-05-14 16:56:10 -07:00
TreeHugger Robot
127f87770c Merge "Fix OEMCrypto UsageTableTest.GenerateReportWrongPST" into qt-dev 2019-05-14 22:01:11 +00:00
Srujan Gaddam
50c555336d Update Level 3 to OEMCrypto v15.2
Bug: b/132083217
Test: Linux, CE CDM, and Android unit/integration tests
Merge of http://go/wvgerrit/78946

This CL checks nonce collisions, checks iv offset compared to mac_keys
offset, checks the memory before the mac_keys to the iv, and clears the
encryption key after a LoadKeys call.

Change-Id: Ic8e4bcd6ee4512d93ef88583f337cfdf00c58fb0
2019-05-14 21:00:37 +00:00
Rahul Frias
090d9d409b Merge "Ref count Timer implementation" into qt-dev am: ed833222a6
am: 389d917e88

Change-Id: Ie51744931c38b5e4b0bc8110b07fee9d229870f9
2019-05-13 14:23:19 -07:00
Rahul Frias
ed833222a6 Merge "Ref count Timer implementation" into qt-dev 2019-05-13 20:24:45 +00:00
Rahul Frias
c9c3e6ab6f Merge "Single PSSH entitlement handling" into qt-dev am: 19c6e57269
am: f13e62fbe3

Change-Id: Ib06c9f6606fab960a132d1fb0876108cd7513c2d
2019-05-13 09:49:41 -07:00
Rahul Frias
f1bb063682 Merge "Key Status should reflect key container security level" into qt-dev am: 80f5e283ad
am: 555d7cdc83

Change-Id: Ib3c97a96e8482fafc888d71780daa047cc6428ac
2019-05-13 09:49:24 -07:00
Rahul Frias
19c6e57269 Merge "Single PSSH entitlement handling" into qt-dev 2019-05-13 16:26:16 +00:00
Rahul Frias
80f5e283ad Merge "Key Status should reflect key container security level" into qt-dev 2019-05-13 16:25:24 +00:00
Rahul Frias
4d917e3ee8 Ref count Timer implementation
[ Merge of http://go/wvgerrit/78763 ]

The android timer instance is held by a regular pointer rather
than reference counted as all classes that derive from RefBase
should be. This could result in a double deallocation, if the
timer is ever passed to a strong pointer.

Bug: 79364026
Test: WV unit/integration tests. GtsMediaTestCases. Play movies
      playback tests.

Change-Id: I01f622bc045e1012f2240b3775a6d121f9415463
2019-05-12 02:15:12 -07:00
Fred Gylys-Colwell
878e39c740 Report OEMCrypto Build Information in License Request am: 5ee5d00514
am: 23c3bc8ebc

Change-Id: I1006614f9eadc97e9287816723ec179851bf2e67
2019-05-10 06:30:12 -07:00
Rahul Frias
7d78609548 Key Status should reflect key container security level
[ Merge of http://go/wvgerrit/77506 ]

Callers of MediaDrm can register to be notified when key status
changes and if they are usable for decryption. A number of factors
are evaluated when making this determination. Key container security
level will now be included in the evaluation.

Bug: 78652608
Test: WV unit/integration test, GtsMediaDrmTest, Play movies playback
      testing.

Change-Id: I20243e5cb160f7957e3239e8d05f715ff0ee6dd6
2019-05-09 22:16:23 -07:00
Fred Gylys-Colwell
5ee5d00514 Report OEMCrypto Build Information in License Request
Merge from Widevine repo of http://go/wvgerrit/78623

This updates the license request client identification to include
OEMCrypto build information.

Bug: 129070445
Test: ExoPlayer on crosshatch with mod mock
Change-Id: I0dbce0cca4e9810e14f60561e4e434f1dbcadfb6
2019-05-09 13:24:04 -07:00