Commit Graph

2720 Commits

Author SHA1 Message Date
android-build-team Robot
272d2660c0 Snap for 4784261 from d615d66cca to pi-release
am: 1aefef76ad

Change-Id: Ic7af54366e2b0d28a4af19658128da256ebc3211
2018-05-16 00:47:49 -07:00
android-build-team Robot
1aefef76ad Snap for 4784261 from d615d66cca to pi-release
Change-Id: I19a82c3d50709dac3c02c706f2b85637eae535c8
2018-05-16 07:23:05 +00:00
Rahul Frias
d615d66cca Merge changes I30a3ede3,I6008ddba,I869c22a2 into pi-dev
* changes:
  Protect sessions from concurrent access.
  Address concurrency failures between calls to decrypt and periodic timer
  Revert of "Prevent race conditions between decrypt and close session"
2018-05-15 23:21:04 +00:00
Fred Gylys-Colwell
bd6bbce86f Unit test for kInactiveUnused usage reports
Merge from Widevine repo of http://go/wvgerrit/50422

This CL adds unit tests to verify that a usage report can have the status
kInactiveUnused.

bug: 79556142
test: unit test code only
Change-Id: I10f71ac2e585ef33727aa8f80d867d80fe156ab8
2018-05-15 13:23:30 -07:00
Rahul Frias
e8c3a4afac Protect sessions from concurrent access.
Locks in earlier releases controlled access to sessions and the list
of sessions for each CdmEngine instance. This guarded against
concurrent access between session management (OpenSession,
CloseSession, etc), periodic timer calls and calls to Decrypt.

The list of sessions and locking was moved to a separate class
CdmSessionMap. This left open the possibility that a session
might be destructed, while being called to decrypt or invoked through the
timer. An attempt was made to add per-session locks in b/73781703
but this was found insufficient.

Per-session locks will be introduced in a future changelist, but for
now the coarser locks will be reintroduced.

Bug: 73781703
Bug: 79158083
Bug: 79262108
Bug: 79436509

Test: WV unit/integration tests, GTS GtsMediaTestCases tests and
      24 hours of continuous Netflix playback.

Change-Id: I30a3ede340192370dfe5c92c01b1c76df16b7123
2018-05-15 11:51:17 -07:00
android-build-team Robot
28c10c8e06 Snap for 4781566 from aa536ec97f to pi-release
am: 9eb713e3d8

Change-Id: I4ad333e49a6fa8adfabfe5daccc6182ebc62be72
2018-05-15 00:57:53 -07:00
android-build-team Robot
9eb713e3d8 Snap for 4781566 from aa536ec97f to pi-release
Change-Id: Id8f9e40b40c1d03565ebec7ac36ec6284c20e009
2018-05-15 07:21:34 +00:00
Rahul Frias
dcab2b1355 Address concurrency failures between calls to decrypt and periodic timer
[ http://go/wvgerrit/50341 ]

The shared_ptr implementation was taken from a google3 implementation.
Updates to the reference counter needed to be atomic and were
platform dependent in the original code. These were not carried
over to this codebase. Race conditions between calls to decrypt and
the periodic timer, led to incorrect reference count values.
CdmSession objects were then destructed while references to
them still existed. Segfaults occurred when they were referenced.

Bug: 79431096

Test: WV unit/integration tests, GTS GtsMediaTestCases tests and
      24 hours of continuous Netflix playback.

Change-Id: I6008ddba869efcc58972e5ea8644a204f91410ab
2018-05-14 16:38:38 -07:00
Rahul Frias
0163607fa3 Revert of "Prevent race conditions between decrypt and close session"
[ Original CL http://ag/3890635,
  Merge of http://go/wvgerrit/50340 ]

The original fix was not sufficient to address all race conditions.
A subsequent CL will address them.

Bug: 73781703
Bug: 79158083
Bug: 79262108
Test: WV unit/integration tests, GTS GtsMediaTestCases tests and
      24 hours of continuous Netflix playback.

Change-Id: I869c22a250e2467b3d49935815e4157dc012fff5
2018-05-14 15:45:54 -07:00
Rahul Frias
aa536ec97f Merge "Address Cdm Extended Duration Test failures" into pi-dev 2018-05-14 22:30:40 +00:00
android-build-team Robot
0106f4a33a Snap for 4778776 from a6ad2933fb to pi-release
am: 7afdeaabf5

Change-Id: I113214e64bb4276eef5cf9718d5043ba0fdaa39b
2018-05-13 00:57:48 -07:00
android-build-team Robot
7afdeaabf5 Snap for 4778776 from a6ad2933fb to pi-release
Change-Id: I06c8d6d49fc46528fc3ebd7a972599c86602276d
2018-05-13 07:20:34 +00:00
Rahul Frias
184e0d0559 Address Cdm Extended Duration Test failures
[ Merge of http://go/wvgerrit/49980 ]

This CL
* corrects some of the test expectations
* switches test content used to test streaming with provider session tokens.
  The policy of the earlier test content had changed.
* adds some more information to log messages

Bug: 63819720
Test: WV unit, integration tests, WvCdmExtendedDuraionTest,
      GtsMediaDrmTest

Change-Id: I8fdbc9c38d6018cc6e884e1b95b2e9d26e7aa536
2018-05-11 14:27:45 -07:00
Adam Stone
a6ad2933fb Merge "Fix API support for Widevine vendor metrics" into pi-dev 2018-05-10 17:00:24 +00:00
android-build-team Robot
0eceb4aaec Snap for 4773106 from aa183af75b to pi-release
am: 8f7051dc89

Change-Id: Ie83040816f05c398ed7b3fdeb4de7f30a488f8d9
2018-05-10 00:54:42 -07:00
android-build-team Robot
8f7051dc89 Snap for 4773106 from aa183af75b to pi-release
Change-Id: I25aa6a580009425436e3854ded753fa11e15b78a
2018-05-10 07:22:26 +00:00
Adam Stone
e7edb5d2e2 Fix API support for Widevine vendor metrics
This fixes Widevine's getMetrics call so that it will return vendor
metrics through the Drm plugin 1.1 interface.

Bug: 73724453
Test: New and existing unit tests. Updated and existing GTS. Google Play manual.

Change-Id: Ie35128dc80bd6eabf9e1f3b9c1800256af77bc51
2018-05-09 15:31:34 -07:00
Rahul Frias
aa183af75b Merge "Close CDM sessions only if opened" into pi-dev 2018-05-09 21:59:29 +00:00
TreeHugger Robot
f29901e310 Merge "Use 128 bit AES for key control block" into pi-dev 2018-05-09 21:57:29 +00:00
Fred Gylys-Colwell
a313985174 Add unit test for nonce sharing
Merge from Widevine repo of http://go/wvgerrit/49302

This CL adds some unit tests to verify that several OEMCrypto sessions
do not share nonce tables.

bug: 64850992
test: unit tests run on sailfish, taimen, and walleye.
Change-Id: I06cf3fdafb84f8b09cf2f0e58c1866bac511a293
2018-05-08 14:30:37 -07:00
Fred Gylys-Colwell
98532d313b Use 128 bit AES for key control block
Merge from Widevine repo of http://go/wvgerrit/49805

This aligns the oemcrypto reference code and unit tests to match the
API design doc: http://go/oemcrypto

bug: 79375509
test: unit tests pass
Change-Id: I13761a7384a17e99d88e61aaf80b4a22941fd172
2018-05-08 14:01:45 -07:00
Rahul Frias
9c95aba4f5 Close CDM sessions only if opened
[ Merge of http://go/wvgerrit/49822 ]

This avoids logging an unnecessary error, when the session is not found.

Bug: 79210873
Test: Wv unit/integration test, GtsMediaDrmTest, playback with Play
      Movies and Netflix.

Change-Id: Ifef99d1380d763670ad0fa89c885fb5fd41567e2
2018-05-08 00:30:46 -07:00
android-build-team Robot
90bd3ccc8d Snap for 4765094 from 5b169b1722 to pi-release
am: e8246d77cd

Change-Id: I438e3cc58664f564db8d8182ac1a18b65a984100
2018-05-06 00:39:54 -07:00
android-build-team Robot
e8246d77cd Snap for 4765094 from 5b169b1722 to pi-release
Change-Id: Id6c1ffeb5c68ab814cb5f74b319ab2e2feff3a47
2018-05-06 07:20:23 +00:00
android-build-team Robot
8e2b7cc3bf Snap for 4759746 from 734b6b819e to pi-release
am: 322afc58ad

Change-Id: I6b857bc0dbcc0406b0a162b63854c2c8fb53a993
2018-05-03 00:44:00 -07:00
android-build-team Robot
322afc58ad Snap for 4759746 from 734b6b819e to pi-release
Change-Id: I3e72ad57627b8b6e61fe0ad06b0296e8a449a224
2018-05-03 07:25:01 +00:00
Rahul Frias
5b169b1722 Avoid race conditions between periodic timer and close sessions
[ Merge of http://go/wvgerrit/49402 ]

Bug: 78912546
Test: WV unit/integration tests, GtsMediaTestCases, Aupt tests
Change-Id: Ic2016e8b557cd2dd45d5d3bbaa28be16e58dab8b
2018-05-02 23:56:17 -07:00
Rahul Frias
734b6b819e Merge "Allow a service certificate to be specified for provisioning" into pi-dev 2018-05-02 21:51:54 +00:00
android-build-team Robot
580787e353 Snap for 4751833 from 81ce8b4601 to pi-release
am: c443b72914

Change-Id: I635492ad63f7aa994ec59e5c5f258d0287d779a8
2018-04-29 00:41:16 -07:00
android-build-team Robot
c443b72914 Snap for 4751833 from 81ce8b4601 to pi-release
Change-Id: I4268093c35f4f4c710176801f85856ede49a569b
2018-04-29 07:20:40 +00:00
android-build-team Robot
81ce8b4601 Merge "Share Widevine DRM Device Provisioning Models doc" into pi-dev 2018-04-27 23:38:05 +00:00
Fred Gylys-Colwell
530c77bffb Share Widevine DRM Device Provisioning Models doc
Merge from Widevine repo of http://go/wvgerrit/47760

This CL adds a pdf of the document Widevine DRM Device Provisioning
Models, which explains the difference between Provisioning 2.0 and
3.0.

bug: http://b/74242000 Update Integration Guide
test: documentation only.
Change-Id: I64026ab4e93931adaa168d99939ee71d760e5862
2018-04-27 13:30:22 -07:00
Rahul Frias
9ba6493e1b Save usage information before closing a session
[ Merge of http://go/wvgerrit/48640 ]

Usage information is saved periodically, in order to avoid excessive
flash writes. This limits our session usage accuracy to
within a usage save period. Saving usage information when
closing a session is an improvement and addresses some failures
seen with Netflix compliance tests.

Bug: 74015553
Test: WV unit/integration tests
Change-Id: I680aad05922f334df0611ff3933082a512f7c002
2018-04-26 14:14:51 -07:00
Rahul Frias
40b1131c13 Merge "Remove duplicate information from client identification" into pi-dev 2018-04-26 20:29:36 +00:00
android-build-team Robot
6006de50fc Snap for 4745538 from 6d3dbfca83 to pi-release
am: 4722db26ce

Change-Id: I5b924f46434e2052197eba19aec76e0ea239c983
2018-04-26 00:41:47 -07:00
android-build-team Robot
4722db26ce Snap for 4745538 from 6d3dbfca83 to pi-release
Change-Id: Ife01ea37fb0ab1941d179de725abbdc0c738aede
2018-04-26 07:23:13 +00:00
Rahul Frias
d7e0a3562c Remove duplicate information from client identification
[ Merge of http://go/wvgerrit/48720 ]

The device ID does not need to be sent in the client identification
information as it is either present in other fields or ignored
by the license service.

This also allows for build information to be reported during
provisioning for devices with OEM certificates.

Bug: 78578351
Test: WV unit/integration tests. GtsMediaTestCases.
Change-Id: I708c63d34f0e2df7e465154d12096a394a1b23d7
2018-04-25 17:21:40 -07:00
Adam Stone
6d3dbfca83 Merge "Remove a spammy log message from metrics collections." into pi-dev 2018-04-26 00:08:33 +00:00
Srujan Gaddam
04ad84a533 Merge "Address offline playback with rollbacked time" into pi-dev 2018-04-25 17:34:31 +00:00
Rahul Frias
816f00e533 Allow a service certificate to be specified for provisioning
[ Merge of http://go/wvgerrit/48400 ]

Client identification information has recently been enabled in
provisioning messages. For privacy concerns this information
is being encrypted with a default service certificate.
Apps need to be able to override the default one to allow
for provisioning with third party provisioning services.

Bug: 78420508
Test: WV unit, integration tests
      New WvCdmRequestLicenseTest.ProvisioningTestWithServiceCertificate test
      GTS MediaDrmTestCases

Change-Id: Iee61ad47d33ce011efbea4eb90f7e4b1f032d15f
2018-04-24 11:14:35 -07:00
android-build-team Robot
d9b29a68df Snap for 4739962 from e3e437a6eb to pi-release
am: 0ecd120cb8

Change-Id: I5c2630d17a1bcde4b3f744176a7c15cbb39800a2
2018-04-24 00:39:04 -07:00
android-build-team Robot
0ecd120cb8 Snap for 4739962 from e3e437a6eb to pi-release
Change-Id: I8056c1a7fdbe13680d64f232c60bec8b18dd813c
2018-04-24 07:24:57 +00:00
John Bruce
e3e437a6eb Merge "Update OS Version in Version Canary" into pi-dev 2018-04-24 01:02:59 +00:00
Srujan Gaddam
73c3007c24 Address offline playback with rollbacked time
Merge from http://go/wvgerrit/47640

Test: unit/integration tests

Bug: b/62058202

The usage table keeps track of license duration by using the current
system time. However, if a user were to rollback the time, they can
effectively continue offline playback indefinitely. This changes the way
we compute time by computing offsets by which the user rollbacked the
time and adding it to the current time. This change also includes a test
to verify protection against rollback for usage entries that is only run
when the user is root.

Change-Id: I97c430e1443747b0f9759ae5390b8f5d06bdebf1
2018-04-23 15:44:26 -07:00
Rahul Frias
d873f40d80 Merge "Enable encryption of client ID for provisioning" into pi-dev 2018-04-23 22:03:53 +00:00
Rahul Frias
c171d024d9 Enable encryption of client ID for provisioning
[ Merge of http://go/wvgerrit/46760 ]

This enables encryption of client ID for provisioning requests for
devices with keyboxes as root of trust. Client ID will not be
provided for those devices with OEM device certificates as root of
trust. That will be addressed in b/78303730.

Bug: 77607585
Test: WV unit/integration tests. Tests with L3 using OEM certs
Change-Id: Id9bd697aa049bd5659ab80714e141dbc50408f6a
2018-04-22 10:52:51 -07:00
Rahul Frias
07bb4de042 Prevent race conditions between decrypt and close session
[ Merge of http://go/wvgerrit/47520 ]

Bug: 73781703
Test: WV unit/integration tests, GTS GtsMediaTestCases tests and AUPT tests.
Change-Id: I618ed8ca38855aecdb31e829a7f4041cbd505a02
2018-04-19 23:41:27 -07:00
android-build-team Robot
43cdf34128 Snap for 4728508 from 5c71603e8c to pi-release
am: 4b26955a76

Change-Id: Ied36c32fbf5b3ed0fd9dae1e35eb672cacc9ffcb
2018-04-18 00:44:05 -07:00
android-build-team Robot
4b26955a76 Snap for 4728508 from 5c71603e8c to pi-release
Change-Id: I5d7fc92a841f71013980a217ec58cb598edfc0f8
2018-04-18 07:24:56 +00:00
John W. Bruce
a6aab24d91 Update OS Version in Version Canary
(This is a merge of http://go/wvgerrit/47990)

This is a test-only change.

Bug: 78117686
Test: VersionNumberTest.*
Change-Id: I4f53358fd6eacd498ddd1df7324084d0d4ae67fe
2018-04-17 18:29:57 -07:00