Commit Graph

2085 Commits

Author SHA1 Message Date
Fred Gylys-Colwell
6d000b5295 OEMCrypto v12 Header
Merge from widevine repo of http://go/wvgerrit/21710

This is the header changes for OEMCrypto v12.  This includes
Provisioning 3.0 changes.

This CL was split off from http://go/wvgerrit//18603 because that
review is now concentrating on clarification and wording issues.

This CL is just for the header, and API changes.

Change-Id: I7cc423726433dcac9fb907246b6b6dd64f5c3367
2016-11-28 21:56:00 -08:00
Fred Gylys-Colwell
a200710d53 Add unit test to verify signature
Merge from widevine repo of http://go/wvgerrit/21521

On devices that use provisioning 3.0, the function
OEMCrypto_GenerateSignature will only be used for a license renewal.
This CL adds a call to OEMCrypto_GenerateSignature to the refresh key
tests.  Otherwise, there would be no coverage at all for that
function.

Change-Id: Icbd568eea3f9f256cc9b0b441f7907b316bb5b69
2016-11-28 21:54:03 -08:00
Fred Gylys-Colwell
47f454839e Unit Test for OEMCrypto_ERROR_KEY_EXPIRED
Merge from widevine repo of http://go/wvgerrit/21141

All of the decrypt calls and the SelectKey call should return
OEMCrypto_ERROR_KEY_EXPIRED on error.  This CL updates the oemcrypto
unit tests, reference mock, and level 3 code.

b/28294273

Change-Id: I7ac6a3652e0b2fe5a46071e1c2eda00daeed7a33
2016-11-28 21:52:11 -08:00
Fred Gylys-Colwell
7214064635 Use fast random for unit tests
Merge from widevine repo of http://go/wvgerrit/21560

For OEMCrypto v12 we explicitly require OEMCrypto_GetRandom to handle
buffers up to 32 bytes long.  This CL relaces the use of GetRandom
with openssl's RAND_psuedo_bytes to fill test vectors.

b/31464102

Change-Id: Ia0006b92bb12b98e9c130068dbb31b5f67281de2
2016-11-28 21:47:44 -08:00
Fred Gylys-Colwell
67b06a70e4 Buffer Size Unit Tests
Merge from widevine repo of http://go/wvgerrit/21260

This CL adds some oemcrypto unit tests for various buffer sizes, as
described in b/28887904 and the OEMCrypto v12 specification.

Encryption and Decryption buffers can be 100k large.  License request
and response messages can be 8k. A provider session token (pst) can be
at most 255 bytes long.

I also passed the code through clang-format.

b/28887904

Change-Id: Ia3e317c0f6466e663461e66b610c9a98a90efb0a
2016-11-28 21:44:36 -08:00
Fred Gylys-Colwell
5228b538f0 Specify units for time based property fields.
Merge from widevine of http://go/wvgerrit/21381

Change-Id: I8b209e1403e94adc7843ff1009c8cd1d5761b917
2016-11-28 21:40:19 -08:00
Fred Gylys-Colwell
f0cee3ad20 Require 20 keys per session and 10 sessions
Merge from widevine repo of http://go/wvgerrit/20981

OMECrypto v12 requires at least 20 keys per session and at least 10
sessions.  This CL updates the unit tests to verify this, and updates
level 3 and mock code to conform.

This CL also updates the level 3 oemcrypto to support 16 sessions and
320 keys total.

b/30140448 Minimum 20 keys per OEMCrypto_Session

Change-Id: Idd38d8f2cdfd6acde6fa7622b5912372bee9e488
2016-11-28 21:36:03 -08:00
Jeff Tinker
97c2c74556 Removing widevine classic
bug:30505334
Change-Id: I312f83c0a13b28d0d98bb8003cabc09a63717ce3
2016-11-16 02:14:32 +00:00
Rahul Frias
3380679886 Address test network issues
[ Merge of http://go/wvgerrit/22140 ]

There are occasional issues when trying to connect to
http://widevine-proxy.appspot.com/proxy . This changes introduces upto
3 retry attempts. The UAT server on appspot is being replaced by UAT on borg
and so it is not worth our while to debug these issues furthur.

b/30022298

Change-Id: I76c1421e93c7c14b5d2bcd7ad07119a705245922
2016-11-10 18:40:10 -08:00
Fred Gylys-Colwell
f248bbb9ee Merge "File util, generic crypto, and key query" 2016-10-25 17:40:54 +00:00
John "Juce" Bruce
a7c4880777 Update Expected Version Number in Canary am: 2201d52b4c am: 2cbe56b613
am: ef03c6795e

Change-Id: I134e9c8f587b666b19debf8517a589208b256ed7
2016-10-19 23:53:06 +00:00
John "Juce" Bruce
ef03c6795e Update Expected Version Number in Canary am: 2201d52b4c
am: 2cbe56b613

Change-Id: I8356adb3b46e1b137fd21a6594c34e2180527386
2016-10-19 23:47:17 +00:00
John "Juce" Bruce
2cbe56b613 Update Expected Version Number in Canary
am: 2201d52b4c

Change-Id: I237cf5e36eca0da53ea6507d4e8e1f070884b61d
2016-10-19 23:30:37 +00:00
John "Juce" Bruce
2201d52b4c Update Expected Version Number in Canary
(This is a merge of go/wvgerrit/21580)

The version number for N-MR1 has been increased to 7.1.1, which
triggered our version number canary. Since this is still N-MR1, no
Widevine version number update is necessary as we already updated it for
N-MR1, but the canary needs to be updated.

Bug: 32018966
Change-Id: Ia1d673f837d9c6a5935f26beec7372b25ea3a6b9
2016-10-19 13:36:01 -07:00
Fred Gylys-Colwell
69ea0b7ed2 Merge "Update oemcrypto_test.cpp" 2016-10-11 00:13:33 +00:00
Fred Gylys-Colwell
3b4e1d80bb Update oemcrypto_test.cpp
This is a merge from the Widevine repo of these three CLs:

http://go/wvgerrit/18008 Update OEMCrypto Performance Unit Test

http://go/wvgerrit/17901 Remove static initialization for member variable

http://go/wvgerrit/17214 Lengthen allowed time for simultaneous decrypt

There's also some code cleanup from http://go/wvgerrit/17971.

Change-Id: I81e1366594e1dbe65260aad96d9c8f77a116f508
2016-10-07 13:09:52 -07:00
Edwin Wong
37b82101ec DO NOT MERGE Update Classic Widevine libs to 4.5.0.10142. am: 0d1787e5a1 am: 5d4184e85e am: 428a960884 am: 5b8ce1cd64 -s ours am: 2ea811a508 am: 2f58b776ff am: c71446e166 am: 8c259382b8
am: 6c23b47497  -s ours

Change-Id: If4d223e4a7f4b3549ef5f97bda445e91757cdb1b
2016-09-23 02:16:53 +00:00
Edwin Wong
0de98c73b4 DO NOT MERGE Update Classic Widevine libs to 4.5.0.10142. am: 0d1787e5a1 am: 5d4184e85e am: 428a960884 am: 5b8ce1cd64 -s ours am: 2ea811a508 am: a46fb6b378
am: 01b2534aec  -s ours

Change-Id: I6300c797f54e70ec0df042d670ba6ceebca40d0f
2016-09-23 02:16:39 +00:00
Edwin Wong
6c23b47497 DO NOT MERGE Update Classic Widevine libs to 4.5.0.10142. am: 0d1787e5a1 am: 5d4184e85e am: 428a960884 am: 5b8ce1cd64 -s ours am: 2ea811a508 am: 2f58b776ff am: c71446e166
am: 8c259382b8

Change-Id: I54cf5fa260b6aec0cd66007feccce7421fb8881e
2016-09-23 00:42:54 +00:00
Edwin Wong
8c259382b8 DO NOT MERGE Update Classic Widevine libs to 4.5.0.10142. am: 0d1787e5a1 am: 5d4184e85e am: 428a960884 am: 5b8ce1cd64 -s ours am: 2ea811a508 am: 2f58b776ff
am: c71446e166

Change-Id: I386bd00bf5e0aa5151ab9b9f001d01d1e94a9ee8
2016-09-22 23:40:12 +00:00
Edwin Wong
01b2534aec DO NOT MERGE Update Classic Widevine libs to 4.5.0.10142. am: 0d1787e5a1 am: 5d4184e85e am: 428a960884 am: 5b8ce1cd64 -s ours am: 2ea811a508
am: a46fb6b378

Change-Id: I20f503141af9d0348ded43089dd3ea911662afd2
2016-09-22 23:20:16 +00:00
Edwin Wong
c71446e166 DO NOT MERGE Update Classic Widevine libs to 4.5.0.10142. am: 0d1787e5a1 am: 5d4184e85e am: 428a960884 am: 5b8ce1cd64 -s ours am: 2ea811a508
am: 2f58b776ff

Change-Id: Ifa52d677cb2245f91e45108801a735f7e1b3f481
2016-09-22 21:58:14 +00:00
Edwin Wong
2f58b776ff DO NOT MERGE Update Classic Widevine libs to 4.5.0.10142. am: 0d1787e5a1 am: 5d4184e85e am: 428a960884 am: 5b8ce1cd64 -s ours
am: 2ea811a508

Change-Id: If3714615668b5cad40782f5bff25e5e728633269
2016-09-22 18:09:03 +00:00
Edwin Wong
a46fb6b378 DO NOT MERGE Update Classic Widevine libs to 4.5.0.10142. am: 0d1787e5a1 am: 5d4184e85e am: 428a960884 am: 5b8ce1cd64 -s ours
am: 2ea811a508

Change-Id: I501c199f50fd8856c164bc74f7e38cd0b926477a
2016-09-22 13:14:16 +00:00
Edwin Wong
2ea811a508 DO NOT MERGE Update Classic Widevine libs to 4.5.0.10142. am: 0d1787e5a1 am: 5d4184e85e am: 428a960884
am: 5b8ce1cd64  -s ours

Change-Id: Iffe795854a4cd89f5793746bb84d86ec3b38f2fc
2016-09-22 12:00:46 +00:00
Edwin Wong
5b8ce1cd64 DO NOT MERGE Update Classic Widevine libs to 4.5.0.10142. am: 0d1787e5a1 am: 5d4184e85e
am: 428a960884

Change-Id: If7ecda8b5c07d27da0bf66eb928da5a321890d6d
2016-09-22 11:58:03 +00:00
Edwin Wong
428a960884 DO NOT MERGE Update Classic Widevine libs to 4.5.0.10142. am: 0d1787e5a1
am: 5d4184e85e

Change-Id: I3788141d668dbfd0d3ede873f15589f08fd261bb
2016-09-22 08:14:08 +00:00
Edwin Wong
5d4184e85e DO NOT MERGE Update Classic Widevine libs to 4.5.0.10142.
am: 0d1787e5a1

Change-Id: Ieb5d758c6061dc1d2fbaf78b6ab629064da0f5c7
2016-09-22 00:30:50 +00:00
Edwin Wong
0d1787e5a1 DO NOT MERGE Update Classic Widevine libs to 4.5.0.10142.
Remove openssl external symbols from libssl.a and libcrypto.a.

Widevine repo reference:
https://widevine-internal-review.googlesource.com/#/c/17990/
https://widevine-internal-review.googlesource.com/#/c/18004/

bug: 28013024
Change-Id: I8a6dd5a17f896a65da8209680ef200a953b21e80
2016-09-19 15:17:46 -07:00
Fred Gylys-Colwell
eb3f8b786a File util, generic crypto, and key query
This CL merges several CLs from the widevine repo:

http://go/wvgerrit/18012 Add support for querying allowed usage for key.
http://go/wvgerrit/17971 Add per-origin storage.
http://go/wvgerrit/18152 Add OEMCrypto's generic crypto operations to CDM.
http://go/wvgerrit/17911 QueryKeyControlInfo => QueryOemCryptoSessionId

Note: numbering in wv_cdm_types.h was added in this CL and will be
back ported to wvgerrit in a future CL.

Change-Id: Idb9e9a67e94f62f25dc16c5307f75a08b3430b64
2016-09-14 16:43:07 -07:00
Fred Gylys-Colwell
24124ea6e3 Pull cache flush out of Haystack am: 84d7185e5f am: 6304a242ae
am: 4354c9182a

Change-Id: I826e93e08dc046b52aea97a3619e73dae98fb2db
2016-09-12 17:30:52 +00:00
Fred Gylys-Colwell
4354c9182a Pull cache flush out of Haystack am: 84d7185e5f
am: 6304a242ae

Change-Id: I31e77cbedbf877b82ab5e444f095030433b8fa28
2016-09-12 17:17:02 +00:00
Fred Gylys-Colwell
6304a242ae Pull cache flush out of Haystack
am: 84d7185e5f

Change-Id: I1e477c7ed114b97a5fa3d9cccb0bbb427cce2a56
2016-09-12 17:13:32 +00:00
Fred Gylys-Colwell
84d7185e5f Pull cache flush out of Haystack
Merge of http://go/wvgerrit/20924

This CL pulls the cache flush code out of the haystack code and into
the adapter level.  This is so it will be built with processor
specific compiler flags instead of as part of the precompiled binary.

level3/mips/libwvlevel3.a  Level3 Library 4465 Sep 10 2016 21:44:37
level3/arm/libwvlevel3.a  Level3 Library 4445 Sep 10 2016 21:30:01
level3/x86/libwvlevel3.a  Level3 Library 4464 Sep 10 2016 21:49:53

b/30550782 Battery Problems

Change-Id: I8967da498a43cabe82e78345162705dc2fcdb859
2016-09-10 21:55:52 -07:00
Fred Gylys-Colwell
41c20425a8 Merge "Extract Session class from oemcrypto_test." 2016-09-08 18:01:57 +00:00
Fred Gylys-Colwell
626a416e5f Extract Session class from oemcrypto_test.
This allows the OEMCrypto session state to be accessed by
tests in other modules.  For example, keys can be added for testing
encryption and decryption operations in CDM-level tests.

Merge from Widevine repo of http://go/wvgerrit/18127,
http://go/wvgerrit/18591, http://go/wvgerrit/18581 and
http://go/wvgerrit/20802.

Change-Id: Ie0d071a2da610c0856ae6356a0abf054013a1b87
2016-09-07 17:10:09 -07:00
Fred Gylys-Colwell
ed3d0807bc Don't Increment IV for Partial Blocks in Unit Tests am: 3f040e0a9d am: 4b380dfb1b
am: dfd6df5cf9

Change-Id: I2fa15c7971020a7e9c0beed5400450d0206e412a
2016-09-07 18:48:00 +00:00
Fred Gylys-Colwell
dfd6df5cf9 Don't Increment IV for Partial Blocks in Unit Tests am: 3f040e0a9d
am: 4b380dfb1b

Change-Id: Icd56b2b88a9efda4e5ed6167edc7cfd35472167d
2016-09-07 18:42:50 +00:00
Fred Gylys-Colwell
4b380dfb1b Don't Increment IV for Partial Blocks in Unit Tests
am: 3f040e0a9d

Change-Id: I394b1a905ef15ab1f2160d9340d6b92f4d377fdc
2016-09-07 18:39:50 +00:00
Fred Gylys-Colwell
3f040e0a9d Don't Increment IV for Partial Blocks in Unit Tests
Merge from widevine repo of http://go/wvgerrit/20660

For CTR encryption mode, when a subsample ends with partial block that
is continued on the next subsample, both blocks should have the same
IV.  This allows an implementation of OEMCrypto to optimize their
decryption algorithm.

b/31114392

Change-Id: I29a998b00f3bfb12c4bbbcb1fa1ebc371473fefd
2016-09-02 15:51:05 -07:00
John Bruce
c764294a3b Merge "Widevine Version Number for NYC-MR1" into nyc-mr1-dev am: 3fbc2106d8 am: d649905cd6
am: bfa2f87268

Change-Id: I914f3aaecc5d110eff8e35782eb3f3cc37b73ee8
2016-09-02 20:50:23 +00:00
John "Juce" Bruce
38eb094433 Widevine Version Number for NYC-MR1 am: 15ca8148a8 am: 08a706f1b0
am: 3778d8218a

Change-Id: Ic91ea69f4e7c9e809ba8bba649540d1c04cd2485
2016-09-02 20:50:23 +00:00
John Bruce
bfa2f87268 Merge "Widevine Version Number for NYC-MR1" into nyc-mr1-dev am: 3fbc2106d8
am: d649905cd6

Change-Id: I28ca4e390cf3bc31bea860c8b52ca292f55ca1a1
2016-09-02 20:18:02 +00:00
John "Juce" Bruce
3778d8218a Widevine Version Number for NYC-MR1 am: 15ca8148a8
am: 08a706f1b0

Change-Id: Ifb971fe3afc80865403b1fbed9408c10a14971cb
2016-09-02 20:18:02 +00:00
John Bruce
d649905cd6 Merge "Widevine Version Number for NYC-MR1" into nyc-mr1-dev
am: 3fbc2106d8

Change-Id: I910b131db94dd9764bda98019fe37c4569172900
2016-09-02 20:15:01 +00:00
John "Juce" Bruce
08a706f1b0 Widevine Version Number for NYC-MR1
am: 15ca8148a8

Change-Id: I6faba922cc7b02cf4e2a7a274cdd554bc294deb1
2016-09-02 20:15:01 +00:00
John Bruce
3fbc2106d8 Merge "Widevine Version Number for NYC-MR1" into nyc-mr1-dev 2016-09-02 20:09:55 +00:00
John Bruce
54be950b55 Merge "Fix cens Mode in Android CDM" into nyc-mr1-dev am: bf53608a4e am: 73a39a6551
am: 10236f49fd

Change-Id: I968feb40e6b2e7c78853f92c7b474877490b3c67
2016-08-30 05:06:49 +00:00
John "Juce" Bruce
eb153e78fc Fix cens Mode in Android CDM am: e0f4942b8f am: 442099fb15
am: 67682ddf1a

Change-Id: Idb1f713da3002733152544dd6eae2da06119dbdb
2016-08-30 05:06:47 +00:00
John Bruce
10236f49fd Merge "Fix cens Mode in Android CDM" into nyc-mr1-dev am: bf53608a4e
am: 73a39a6551

Change-Id: I26e2c39509e9c2b4b139da80a4280c72766a54b7
2016-08-29 21:31:34 +00:00