Commit Graph

2560 Commits

Author SHA1 Message Date
android-build-team Robot
4e1bd236be Snap for 4587185 from 4e5599d4ff to pi-release
Change-Id: I9b0f0c5e56203739a8cfcf29d5921630fa61548a
2018-02-06 08:22:59 +00:00
TreeHugger Robot
4e5599d4ff Merge "Use real system id in GetProvisioningTokenValidMetrics" 2018-02-06 04:20:17 +00:00
Fred Gylys-Colwell
ee43f9b411 Clean symbol export on mod mock
Merge from Widevine repo of http://go/wvgerrit/42281

This cleans up some of the oemcrypto mock code.  This code is only
used for testing.

bug: 72831885
bug: 69271232
Change-Id: I8add162839d6febe56a89df84e8ae0cf0b97a2d9
2018-02-05 11:53:27 -08:00
android-build-team Robot
a1b3dab880 Snap for 4585119 from 51212b1505 to pi-release
Change-Id: I6c7596d0336e8470d6383d5d08af30b0647d5b11
2018-02-05 08:20:46 +00:00
TreeHugger Robot
51212b1505 Merge "Test Carmicahel RSA Keys" 2018-02-02 23:44:01 +00:00
Fred Gylys-Colwell
a6cd7c501b Use real system id in GetProvisioningTokenValidMetrics
Merge from Widevine repo of http://go/wvgerrit/42102

The unit test should use the real system id if it is using a real
oemcrypto.

test: ran unit tests on sailfish.
bug: 72718962

Change-Id: Ib58a47976f85b840c6f34d379b1c020e7e85d59a
2018-02-01 13:54:00 -08:00
android-build-team Robot
9b13e19442 Snap for 4579913 from eead89c86c to pi-release
Change-Id: I8e1fcd5675b9f8039bcd4827c045061b91ae1d20
2018-02-01 08:53:33 +00:00
TreeHugger Robot
eead89c86c Merge "Remove finalized concept from media.metrics" 2018-01-31 22:37:49 +00:00
android-build-team Robot
beea0b486f Snap for 4577102 from 78f933d6ae to pi-release
Change-Id: I0c7778cc1ed8b73fb081f98049091fb85ff8c2c6
2018-01-31 17:25:36 +00:00
Fred Gylys-Colwell
dfe6489ca2 Test Carmicahel RSA Keys
Merge from Widevine repo of http://go/wvgerrit/42064

This adds a unit test to verify that OEMCrypto can load a certificate
with an RSA private key generated using the Carmichael Totient.

bug: 67309725
test: No new failures. This code is part of unit tests only.

Change-Id: I492cf6bcff0ac2d1a838e7aa334c4b2b580ac5c7
2018-01-31 01:07:56 +00:00
Fred Gylys-Colwell
78f933d6ae Correct capitalization of OEMCrypto_LoadKeys_V13
Merge from Widevine repo of http://go/wvgerrit/42063

The dynamic adapter could not load old LoadKeys functions because the
spelling was wrong.

bug: 72646612
Change-Id: Ia6d917a17a95c48925496c5959ddb2bdff771241
2018-01-30 14:48:49 -08:00
Fred Gylys-Colwell
c45384bf00 Merge changes from topic "entitlement_license"
* changes:
  Fix some unit tests
  Add basic handling for entitlement keys in a license.
  Refactor key sessions to move them out of crypto session.
  Fix entitlement keys encryption and content key loading.
2018-01-30 20:17:32 +00:00
Fred Gylys-Colwell
8230484de2 Fix some unit tests
Merge from Widevine repo of http://go/wvgerrit/42020

This CL fixes the OEMCrypto unit tests for refresh license.

Test: ran unit tests

bug: 64851667
bug: 72497813
Change-Id: Ice1661fd832793358b725be9016d85465f6b8d14
2018-01-30 00:48:11 -08:00
Fred Gylys-Colwell
9ae7489938 Add basic handling for entitlement keys in a license.
Merge from Widevine repo of http://go/wvgerrit/41834

Key rotation is not yet supported.

The key statuses are updated from a license. The
mechanism expects content keys tro come in a license.
For entitlement licenses, the content keys come in the
init_data.

This code does not yet support the key rotation event.
(A new pssh with wrapped keys is a passed to the cdm)
The policy engine/key status mechanism needs to be
updated to handle updated from the init_data.

For now, the cdm builds a license with a key container
with the content keys and used that to call
PolicyEngine::SetLicense to setup the policy engine
and key statuses.

Bug: 64003606
Bug: 70334840

Test: In child CL
Change-Id: Ibf46a18f5321cab4ff6f1778ba30527942c8021f
2018-01-30 00:11:04 -08:00
Fred Gylys-Colwell
8251aab9f6 Refactor key sessions to move them out of crypto session.
Merge from Widevine repo of http://go/wvgerrit/41833

Bug: 64003606
Test: in child CL

Change-Id: I3e1d36d0b0944dce0fb1515257bc15243d76f397
2018-01-30 00:04:36 -08:00
Fred Gylys-Colwell
8de7caf788 Fix entitlement keys encryption and content key loading.
Merge from Widevine repo of http://go/wvgerrit/41831

Bug: 72418096 OEMCrypto14 entitlement keys failed decryption testing
Test: in child CL

Change-Id: Ie92c34edb6162fb1e4553c5364f478de189ab793
2018-01-30 00:03:29 -08:00
gitbuildkicker
7c90374ae5 merge in pi-release history after reset to master 2018-01-29 14:58:11 -08:00
gitbuildkicker
f830ce819a merge in pi-release history after reset to master 2018-01-29 12:10:05 -08:00
Ray Essick
69b839e86c Remove finalized concept from media.metrics
the 'finalized' concept didn't pan out -- remove references to it. Purged some
uses of generateSessionID().  Simplifies the code flow.

Bug: 71874686
Test: logcat/dumpsys
2018-01-29 12:08:34 -08:00
Rahul Frias
f6c12c465c Report analog output capabilities
[ Merge of http://go/wvgerrit/41840 ]

Bug: 69867619
Test: WV unit/integration tests
      Playback using netflix and play movies on Taimen

Change-Id: I49d0dd9ae12322eecc80efb8cb744419c85e8ae5
2018-01-28 23:44:33 -08:00
android-build-team Robot
dd9c5733d3 Snap for 4571561 from 795cf8a624 to pi-release
Change-Id: I9aa85153da757640bebc9c9b8eb4f345a0a8c72d
2018-01-28 08:22:26 +00:00
Adam Stone
795cf8a624 Revise a few metrics and add unit tests.
This is a merge of Widevine cl 39040.

A few of the metrics were not implemented, or implemented incorrectly in
O MR1. This cleans them up

Bug: 64001676

Test: Re-ran unit tests and added some additional tests. GPlay Movies check.

Change-Id: I1e8bcc36fecd76e72d853306075bc46d82f45161
2018-01-25 21:03:07 +00:00
android-build-team Robot
7097958e1f Snap for 4565898 from 80a70c2dfb to pi-release
Change-Id: I7a89f0d5668acc6acf141b228763c3731263a0df
2018-01-25 09:06:58 +00:00
Fred Gylys-Colwell
7bbe8e3bf1 Add Level3 changes for v14 adapters
Merge from Widevine repo of http://go/wvgerrit/41680

These changes change the signature of LoadKeys to LoadKeys_V13 for the
Level 3. This change will be reverted once we update Level 3 to v14.

level3/x86/libl3oemcrypto.cpp  Level3 Library 4464 Jan 23 2018 13:22:20
level3/arm/libl3oemcrypto.cpp  Level3 Library 4445 Jan 23 2018 12:12:32
level3/mips64/libl3oemcrypto.cpp Level3 Library 7285 Jan 23 2018 15:48:51
level3/arm64/libl3oemcrypto.cpp Level3 Library 7283 Jan 23 2018 12:47:26
level3/mips/libl3oemcrypto.cpp Level3 Library 4465 Jan 23 2018 15:13:13
level3/x86_64/libl3oemcrypto.cpp Level3 Library 7284 Jan 23 2018 13:50:10

test: Play Movies plays on sailfish.

Change-Id: Ia492463cd15178b12908faa24af7fbbcfef22e77
2018-01-24 21:54:35 -08:00
Fred Gylys-Colwell
d72f49e31a Update LoadTestKeybox
Merge from Widevine repo of http://go/wvgerrit/41662

This CL updates oemcrypto unit tests to use the new test keybox.

bug: 69552641 Update OEMCrypto_LoadTestKeybox

test: Unit tests compile and run -- many tests won't pass until merged
with vendor code

Change-Id: I73bdca3958b2c985d4c61801aa95807a2e6d4299
2018-01-24 21:54:34 -08:00
Fred Gylys-Colwell
19cb1792a4 OEMCrypto v14 Unit tests and reference code
Merge from Widevine repo of http://go/wvgerrit/41661

bug: 64001862 OEMCrypto V14 for Android P

test: Unit tests pass
Change-Id: I3314a881357c12ef63d7b257d83f6f0d07e4725a
2018-01-24 21:54:34 -08:00
Fred Gylys-Colwell
979ed70c7b Add Entitlement License to OEMCrypto
This CL adds entitlement license features and moves cipher mode from
LoadKeys to SelectKeys.

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

bug: 70334840 Entitlement License - cdm layer
bug: 70334345 Entitlement License - reference code and unit tests

test: Entitlement license unit tests pass.
Change-Id: Ic7d7f42c15e6d83ef7fcfd8a866c778adc4c8095
2018-01-24 21:53:15 -08:00
Fred Gylys-Colwell
95fa4ffca9 OEMCrypto v14 adapter and plugin changes
Merge from Widevine repo of http://go/wvgerrit/41621

This updates the dynamic adapter and some plugins to work with the new
OEMCrypto v14 API.

bug: 70334345 Entitlement License - reference code and unit tests
bug: 34103646 Encryption Scheme Propagation
bug: 69552641 Update OEMCrypto_LoadTestKeybox
bug: 69867568 OEMCrypto - Report Analog

test: In child CL.
Change-Id: I51349d15b779d52d245bd234867bbd2bbe7b9ae7
2018-01-24 21:53:15 -08:00
Fred Gylys-Colwell
aff3e81a2c OEMCrypto v14 docs and headers
Merge from Widevine repo of http://go/wvgerrit/41641

test: In child CL.

bug: 64001862 OEMCrypto V14 for Android P
Change-Id: I707c4dc24aa534c92b099cd310b9afd09168d456
2018-01-24 21:53:15 -08:00
Fred Gylys-Colwell
df389c1417 Convert oemcrypto tests to BoringSSL
Merge from Widevine repo of http://go/wvgerrit/41620

bug: 62739406
test: unit tests
Change-Id: I72a64623912305965ff625a45041e2932a41f69b
2018-01-24 21:53:15 -08:00
Fred Gylys-Colwell
80a70c2dfb Quit test WithClientId early
Merge from Widevine repo of http://go/wvgerrit/41784

To avoid a seg fault, WithClientId will quit as soon as we find
usage_info is empty.

test: run unit tests (with no wifi to force failure)
bug: 72457799

Change-Id: I250538e750e14ed5780572a69360c8ec304e2554
2018-01-25 01:05:18 +00:00
android-build-team Robot
06a3903be9 Snap for 4562879 from e008a1e5d8 to pi-release
Change-Id: Id1697b5b37edf73b38c893680f32875f6528727d
2018-01-24 08:21:14 +00:00
gitbuildkicker
5835977eb1 merge in pi-release history after reset to master 2018-01-23 14:21:19 -08:00
gitbuildkicker
64a3603295 merge in pi-release history after reset to master 2018-01-23 12:17:30 -08:00
Rahul Frias
e008a1e5d8 Merge "Allow use of cached initialization data" 2018-01-23 18:54:17 +00:00
Rahul Frias
fbd6d9c5d3 Merge "Update CDM version number for android Pi" 2018-01-23 17:15:13 +00:00
TreeHugger Robot
9876af2f96 Merge "Fix compile errors related to adding new MediaDrm methods" 2018-01-23 17:07:39 +00:00
android-build-team Robot
5ce0d9a365 Snap for 4560043 from c58a0c62fe to pi-release
Change-Id: I1be55aa7d5317133c224f96b23a7c28ca0942e8e
2018-01-23 08:25:05 +00:00
gitbuildkicker
84b8352233 merge in pi-release history after reset to master 2018-01-22 22:32:45 -08:00
gitbuildkicker
f17764890b merge in pi-release history after reset to master 2018-01-22 19:15:17 -08:00
Srujan Gaddam
c58a0c62fe Make OEMCrypto test error-order agnostic
Bug: b/72320670
Test: Verified by unit/integration tests on sailfish

Merge from Widevine master of http://go/wvgerrit/41240

Previously, OEMCertForbiddenPaddingScheme checks to see if the OEMCrypto
returns a short buffer error on GenerateRSASignature and then resizes it
accordingly if so. If the OEMCrypto does not return this error first
(and instead complains about the padding scheme), the assertion will
return false since the signature has size 1. This CL changes that so it
doesn't matter which error the OEMCrypto returns first.

Change-Id: I2fd3a3814ff3722fd40ae6a3bcbd65293c9baed7
2018-01-22 14:01:43 -08:00
Rahul Frias
0fc6e5a9b3 Update CDM version number for android Pi
[ Merge of http://go/wvgerrit/41360 ]

Bug: 72239183
Test: wv unit/integration tests on taimen.
Change-Id: I7b093fbef6493e336e04f2b4eb162d5333636692
2018-01-21 11:47:40 -08:00
android-build-team Robot
7dd5f01e71 Snap for 4557233 from f8d114ad11 to pi-release
Change-Id: I99c2233a8b310d9277b9b6e059bc9c69d279d873
2018-01-21 08:26:48 +00:00
Rahul Frias
bd45d4f0fa Allow use of cached initialization data
[ Merge of http://go/wvgerrit/41340 ]

An initial license request may actually result in a service certificate
request. Once the service certificate has been successfully handled,
an app may make a license request without needing to provide
the initialization data again. This behavior was broken in a recent
merge. Correcting the test as well.

b/72182032
Test: Ran wv unit/integration tests

Change-Id: I82401b9a3bf38140706dad859b4ae241b7ddac12
2018-01-19 17:10:33 -08:00
Fred Gylys-Colwell
f8d114ad11 Merge "Don't try to open non-existant file" 2018-01-19 19:33:06 +00:00
Jeff Tinker
87d58f85c1 Fix compile errors related to adding new MediaDrm methods
bug:64001680
bug:33657579
Change-Id: I67cabf96b03c2217df6772fed18ce2cab3d9f625
2018-01-18 23:47:53 -08:00
Rahul Frias
07ce4f5a55 Address x86 OEMCrypto compilation failures
b/71650075
Test: Verified by wv unit/integration tests on taimen, compilation on
      aosp_x86, sdk_gphone_x86

Change-Id: I62c132f1a904e613ce5ea2734822f2d9580d22ef
2018-01-18 14:41:41 -08:00
android-build-team Robot
68b8b3b7e9 Snap for 4551672 from 674a748f39 to pi-release
Change-Id: I718a18843689205385b3797606bff1ccd6258164
2018-01-18 08:26:06 +00:00
Fred Gylys-Colwell
4c7e6ca78b Don't try to open non-existant file
Merge from Widevine repo of http://go/wvgerrit/40883

The oemcrypto dynamic adapter will try to load a keybox from the
filesystem if oemcrypto reports it doesn't have one.  Previously, it
would check the size of the file, and then open the file before
responding to errors.  Opening a non-existant file would result in a
segfault.

With this CL, we do not try to open the file if the size is not
positive.

Test: unit tests
Bug: 72129404
Change-Id: I243b5d49837455c0ce07802e32e4d7e809286cfd
2018-01-17 19:24:31 -08:00
Rahul Frias
674a748f39 Compilation errors on taimen
This adds an include path to system core properties.h to
OEMCrypto L3 makefiles.

Bug: 72004865
Test: Verified by unit/integration tests on taimen.
      Verified playback using Play Movies (streaming/offline)
            and Netflix.

Change-Id: I73c21f2751b34b6b58d92ed5177951a6397b5bf7
2018-01-17 00:11:18 -08:00