Commit Graph

2218 Commits

Author SHA1 Message Date
Fred Gylys-Colwell
b0740b5965 Remove unused variables from mips build am: 35fc4edc11
am: 8a66118d7a

Change-Id: Ibcc045eadfa4ea48082148bdab3e7b482b9454a9
2017-05-05 17:13:31 +00:00
Fred Gylys-Colwell
8a66118d7a Remove unused variables from mips build
am: 35fc4edc11

Change-Id: I25e9f2deb3b729c7bd303fd08dc91aea66922f75
2017-05-05 17:03:56 +00:00
Fred Gylys-Colwell
35fc4edc11 Remove unused variables from mips build
Merge from Widevine repo of http://go/wvgerrit/26940

b/38014227
b/38016711
Test: built sdk_phone_mips

Change-Id: Ibcdbf49f96e976f51c38db25a944268a86a1671e
2017-05-05 07:55:36 -07:00
Fred Gylys-Colwell
5f1e21e1f1 Refresh Current Key in Level 3 am: 38b5e8c71c
am: 9dec53c46c

Change-Id: I93173fbb539bc1ac5ed1e41b3693d4bc9fede542
2017-05-05 01:56:10 +00:00
Fred Gylys-Colwell
9dec53c46c Refresh Current Key in Level 3
am: 38b5e8c71c

Change-Id: I2c133746b2775649df5dbc140b55ee5992f68036
2017-05-05 01:48:10 +00:00
Fred Gylys-Colwell
6707a84d55 Merge "Deliver oem_certificate_generator" 2017-05-05 00:12:47 +00:00
Fred Gylys-Colwell
7b2732169c Deliver oem_certificate_generator
Merge from Widevine repo of http://go/wvgerrit/26880
and http://go/wvgerrit/26062

Deliver oem_certificate_generator

b/37996004
Testing: Tool delivery only

Change-Id: Id95bd3cdd7cf5b48d225624747ab1f8499e4f438
2017-05-05 00:12:26 +00:00
Colin Cross
3c0325fe2c Add moved drm include path to widevine am: 712fd74d85 -s ours
am: 475bf406ed

Change-Id: I66d98edafa0de4bfa40c54aeff0bfe330ad97295
2017-05-04 22:27:31 +00:00
Colin Cross
475bf406ed Add moved drm include path to widevine
am: 712fd74d85  -s ours

Change-Id: I487afb1fc397ea23e656ad1f529e9891127f97d3
2017-05-04 22:23:08 +00:00
Colin Cross
712fd74d85 Add moved drm include path to widevine
Test: m -j libdrmwvmcommon
Change-Id: I7783470aeba248aa381021007e27dcea1fd33e81
2017-05-04 14:56:35 -07:00
Fred Gylys-Colwell
38b5e8c71c Refresh Current Key in Level 3
Merge from Widevine repo of http://go/wvgerrit/26780
and http://go/wvgerrit/26740

Previously, in oemcrypto level 3, a session's current key's duration
was not updated until the next call to SelectKey.  This caused
problems with license that only used one key.  This CL fixes that.

arm64/libwvlevel3.a            Level3 Library 7283 May  2 2017 13:16:21
arm/libwvlevel3.a              Level3 Library 4445 May  2 2017 11:49:34
x86_64/libwvlevel3.a           Level3 Library 7284 May  2 2017 12:09:21
x86/libwvlevel3.a              Level3 Library 4464 May  2 2017 11:53:46

Test: unit tests run on emulator.
b/37481239
b/37523523

Change-Id: Ife90a3358b6620c8fb81324ec2331d3775a38191
2017-05-03 11:53:49 -07:00
Steven Moreland
aea9c1e1ca Remove redundant dependencies
am: 680f23d350

Change-Id: I53bde7701fffe88fd42cb8daabd2fc47370049fb
2017-05-02 22:42:36 +00:00
Steven Moreland
680f23d350 Remove redundant dependencies
android.hidl.base@1.0 and android.hidlmanager@1.0 are built into libhidltransport.

Test: links
Bug: 33276472
Change-Id: Id9053e4484275e3404f31a72d2037884ff6bef5b
(cherry picked from commit 80ec937545)
2017-05-02 21:52:59 +00:00
Fred Gylys-Colwell
b37ab7eead Merge changes I10721146,I5ab5f554,Ie92379dc
* changes:
  OEMCrypto Mock should not downgrade SRM
  Fix SRM Version in mock
  OEMCrypto Logging
2017-05-02 18:38:32 +00:00
Fred Gylys-Colwell
fb10272f55 OEMCrypto Mock should not downgrade SRM
Merge from Widevine repo of http://go/wvgerrit/26560

With this CL, the modifiable oemcrypto mock will only update the SRM
version number if the new number is greater than or equal to the
current one.

b/37744957

Change-Id: I10721146ca0ce24b1087657e18569a434e5d53b8
2017-05-01 14:49:10 -07:00
Fred Gylys-Colwell
1e451340ba Fix SRM Version in mock
Merge from Widevine repo of http://go/wvgerrit/26522

The modifiable OEMCrypto mock did not use the correct initial SRM
version as specified in the options file.  This CL fixes that.

b/37713658

Change-Id: I5ab5f5549dd7815edd4a3d69b804440faedeb657
2017-05-01 14:42:48 -07:00
Steven Moreland
80ec937545 Remove redundant dependencies
android.hidl.base@1.0 and android.hidlmanager@1.0 are built into libhidltransport.

Test: links
Bug: 33276472
Change-Id: Id9053e4484275e3404f31a72d2037884ff6bef5b
2017-05-01 11:25:23 -07:00
John W. Bruce
a5310bcf0c Prefix ENABLE_MEDIADRM_64 with TARGET_ am: 6262f3721f
am: 2e337abdfb

Change-Id: Iae43cc735930b4d04f7990e7b7c28fd3dd74d7e5
2017-04-29 00:02:00 +00:00
John W. Bruce
2e337abdfb Prefix ENABLE_MEDIADRM_64 with TARGET_
am: 6262f3721f

Change-Id: I2290041e9625fbdb7bb7154ff33b806a1ff5b402
2017-04-28 23:59:59 +00:00
John W. Bruce
6262f3721f Prefix ENABLE_MEDIADRM_64 with TARGET_
This build-time flag should be prefixed.

Bug: 37039525
Test: Built OS
Change-Id: Ie1db1f05bdaf43e4066d26a41391af0d7c729128
2017-04-27 18:50:05 -07:00
Fred Gylys-Colwell
ad94e69d03 OEMCrypto Logging
Merge from Widevine repo of http://go/wvgerrit/26521

This CL adds some missing logging when TraceOEMCryptoCalls is set.
Several SRM functions were not properly logged.

It also changes SelectKey from the TraceOEMCryptoCalls flag to the
TraceDecryptCalls.  This reduces flooding the logs when content is
actually playing.

b/37751139

Change-Id: Ie92379dc295c83d8ec9bacb2445b1ef47377e4cf
2017-04-27 21:47:56 +00:00
John Bruce
f76986d707 Merge changes I490befba,I32512a3e into oc-dev am: e434bb3975
am: 64cbdf8204

Change-Id: I88e8d382c6057f23973656a4cbf767bf00dc0ba1
2017-04-21 05:49:37 +00:00
John Bruce
64cbdf8204 Merge changes I490befba,I32512a3e into oc-dev
am: e434bb3975

Change-Id: I577657a7a8d334fe9bbf37d44e031e2afb3212a9
2017-04-21 05:41:21 +00:00
John Bruce
e434bb3975 Merge changes I490befba,I32512a3e into oc-dev
* changes:
  Remove API Version TODO Comments
  Define Provisioning-Unique ID for New Device IDs
2017-04-21 05:38:38 +00:00
Fred Gylys-Colwell
426e53bbbf OEMCrypto Mock SRM functionality
Merge from Widevine repo of http://go/wvgerrit/24730

This CL adds SRM functionality to the modable version of oemcrypto
mock.  This can be used for end-to-end testing.

b/28955873
b/37353534

Change-Id: I2c6f513495ccfd42f7a3d7a3449db6f810563c04
2017-04-20 14:50:43 -07:00
Fred Gylys-Colwell
5c768c896e Modifiable OEMCrypto
Merge from Widevine repo of http://go/wvgerrit/24729

This CL adds a new variant of the OEMCrypto mock code that adjusts its
behaviour based on a configuration file.  This is intended for
testing.

For example, a tester can set current_hdcp to 2 in the options.txt
file, push it to the device, and verify that a license is granted for
HDCP 2.0.  Then the tester can edit the value of current_hdcp to 1 and
push the file to the device.  Playback should stop because the license
is no longer valid.

This variant uses a real level 1 liboemcrypto.so to push data to a
secure buffer.  That means we can test playback for a license that
requires secure buffers on an Android device with real secure buffers.

b/35141278
b/37353534

Change-Id: Id12f2800c6395d9da7cffebd6797aac17414b38d
2017-04-20 14:50:43 -07:00
Fred Gylys-Colwell
ab0d00b92a Use Inheritence for OEMCrypto Mock Properties
Merge from Widevine repo of http://go/wvgerrit/24728

We use compiler options to set different properties in the oemcrypto
mock.  With this CL, we define a base class that has default
properties.  All other variants need only define the properties that
they change.

b/35141278
b/37353534

Change-Id: Id38ec5bf35dcd83cea9a066ebe201e6da7c1a2b0
2017-04-20 14:48:48 -07:00
Fred Gylys-Colwell
86db60d097 Refine OEMCrypto Mock Logging
Merge from Widevine repo of http://go/wvgerrit/24727

This separates out the logging of decrypt calls from all other calls.
This is useful because we sometimes want to trace all the calls in a
license request, but we don't want logging of decrypt calls which
would slow down playback.

b/37353534
b/35141278

Change-Id: I3f172c02778d86e66d0e1f90344a34c4d3b15a9e
2017-04-20 14:40:38 -07:00
John Bruce
7ef74bf0bc Merge changes Ib82cf7a1,Ice6a8eab into oc-dev am: 3c37343e5c
am: cd3fd8c24b

Change-Id: I628b98c3c02b4367dfc460e040c576c2b131d614
2017-04-20 19:05:07 +00:00
John Bruce
2c963f242d Merge "Move SPOID Enable/Disable Logic Out of WVDrmPlugin" into oc-dev am: 9574bc849a
am: 37e7e51090

Change-Id: Iccb9c0ed6a373fa02758c899242e02aa63195271
2017-04-20 19:04:57 +00:00
Rahul Frias
54b2b6a595 Merge "Prevent segfaults when a session is deallocated" into oc-dev am: 518ce632f7
am: 1627bd1b41

Change-Id: Iba8053f83a17f5ca181c1410cf02f513903c0395
2017-04-20 19:04:45 +00:00
John Bruce
cd3fd8c24b Merge changes Ib82cf7a1,Ice6a8eab into oc-dev
am: 3c37343e5c

Change-Id: I6658996c4b4f16091526a70ce6c731b6b712137c
2017-04-20 17:28:24 +00:00
John Bruce
37e7e51090 Merge "Move SPOID Enable/Disable Logic Out of WVDrmPlugin" into oc-dev
am: 9574bc849a

Change-Id: Ib12e6324072cbc7996afe011051c03ae4598c614
2017-04-20 17:28:14 +00:00
Rahul Frias
1627bd1b41 Merge "Prevent segfaults when a session is deallocated" into oc-dev
am: 518ce632f7

Change-Id: Ibb52c6689a6693795288e0d9c7fdf88ea972045f
2017-04-20 17:28:05 +00:00
John Bruce
3c37343e5c Merge changes Ib82cf7a1,Ice6a8eab into oc-dev
* changes:
  Hash OEM Certificate
  Maxing Out Sessions Can Cause SPOID Failures
2017-04-20 17:21:46 +00:00
John Bruce
9574bc849a Merge "Move SPOID Enable/Disable Logic Out of WVDrmPlugin" into oc-dev 2017-04-20 17:19:50 +00:00
Rahul Frias
518ce632f7 Merge "Prevent segfaults when a session is deallocated" into oc-dev 2017-04-20 17:19:45 +00:00
Fred Gylys-Colwell
06caf917a7 Replace mips library with stubs file am: 45bf89ff8b
am: e06c711519

Change-Id: I69bc86a74fa85b4d27c89d6cee49f6627bb84576
2017-04-20 08:19:08 +00:00
Fred Gylys-Colwell
e06c711519 Replace mips library with stubs file
am: 45bf89ff8b

Change-Id: I3b287f73e12e2214ca962b19cbd738c28398873b
2017-04-20 06:58:41 +00:00
Fred Gylys-Colwell
45bf89ff8b Replace mips library with stubs file
Merge from Widevine repo of http://go/wvgerrit/26202

This is a workaround to fix a broken mips build.

Test: Built for sdk_phone_mips.
b/37523523

Change-Id: I56ce65919303113f712d422d33e335b594292d42
2017-04-19 21:16:57 -07:00
Rahul Frias
f2fccc20cd Prevent segfaults when a session is deallocated
[ Merge of http://go/wvgerrit/26201 ]

Race conditions arose when a session was closed while data was
still queued for decryption in MediaCodec buffers. If a session
is closed while data is still queued for decryption, subsequent
decryption requests will be rejected with a CryptoException
ERROR_SESSION_NOT_OPENED.

Test: Verified by wv unit/integration test and
      WvCdmExtendedDurationTest.DecryptionCloseSessionConcurrencyTest

b/36747801

Change-Id: I044d1d6b9fc886a1c353d20b9c6365319aa71e80
2017-04-19 19:24:04 -07:00
Rahul Frias
0dd1ee8739 Merge changes I9039bc1f,I43758cd2 into oc-dev am: c2969ef0f4
am: 221ac95f1a

Change-Id: Iada5ea5199ea1f9b625152f3313ce4127a4dc0f5
2017-04-20 01:31:34 +00:00
Rahul Frias
221ac95f1a Merge changes I9039bc1f,I43758cd2 into oc-dev
am: c2969ef0f4

Change-Id: I95eda1b053fa299e50d85886258a231c9300f6ed
2017-04-19 23:58:12 +00:00
John W. Bruce
68d26ef98b Remove API Version TODO Comments
(This is a merge of http://go/wvgerrit/26221)

We have agreed on API 26 for O, so these comments can be removed without
making any further changes.

Bug: 34548395
Test: This is a comment-only change. But I verified it builds.
Change-Id: I490befba4f47902a84b60e562a7a5eb162a9f3be
2017-04-19 16:48:14 -07:00
Rahul Frias
c2969ef0f4 Merge changes I9039bc1f,I43758cd2 into oc-dev
* changes:
  Allow decryption of unencrypted data before key has been retrieved
  Correct CryptoException error returned before keys have been loaded
2017-04-19 23:40:51 +00:00
John W. Bruce
ce6bd41627 Define Provisioning-Unique ID for New Device IDs
(This is a merge of wvgerrit/25583)

Devices that use Provisioning 3.0 did not have a Provisioning-Unique ID
defined. Attempting to retrieve it would result in an error.

Devices that use SPOIDs with keyboxes would expose the keybox's real
Provisioning-Unique ID when asked. This is a security flaw.

To solve both cases, an alternative Provisioning-Unique ID is used,
consisting of the Device-Unique ID bitwise-inverted.

Bug: 36065223
Test: run_all_unit_tests.sh
Change-Id: I32512a3e11403e679939187e156904a57a9e24ef
2017-04-19 16:35:29 -07:00
John W. Bruce
8513b71499 Hash OEM Certificate
(This is a merge of wvgerrit/25582)

Provisioning 3.0 devices that do not use SPOIDs have been returning
their full OEM Public Certificate as their device ID. While this is not
a security concern, (it is a PUBLIC cert) the cert is many times larger
than applications are likely expecting. (several kilobytes vs. just a
few bytes) This patch hashes the OEM Public Certificate to produce a
smaller value, but only when it is being provided out of the CDM to a
caller.

Bug: 34716264
Test: run_all_unit_tests.sh
Change-Id: Ib82cf7a174a8bf02ff606edd0394ada13842224c
2017-04-19 16:03:22 -07:00
John W. Bruce
8c5cfa5c7f Rebuild Haystack and Store L3 Keybox in /data/vendor am: 76d3ca9091
am: 84ae8875bf

Change-Id: Ifc4285b0743bb4e0c202f8d97c7844ad0c1fe7e2
2017-04-19 22:21:25 +00:00
John W. Bruce
84ae8875bf Rebuild Haystack and Store L3 Keybox in /data/vendor
am: 76d3ca9091

Change-Id: Ib61e1b2b3ff01addb9bedbbe3d434db337861c6d
2017-04-19 22:01:14 +00:00
TreeHugger Robot
091d35e771 Merge "Undo bad merge" 2017-04-19 19:53:57 +00:00