Commit Graph

209 Commits

Author SHA1 Message Date
Fred Gylys-Colwell
a4506542df Merge "Source and destination buffers may point to same buffer" 2017-03-02 04:44:11 +00:00
John W. Bruce
df0dad5311 Enable 64-bit Android Builds
(This is a merge of go/wvgerrit/23686)

This patch removes the makefile lines that previously prevented the
Widevine DRM Plugin from being built as 64-bit on Android. 64-bit
builds are now fully supported.

Only one piece of CDM code has had to change. Due to a bug in
libprotobuf before v3.0, int64 values from protobufs are technically a
different type from int64_t values in code on some 64-bit
architectures. Both have the same in-memory representation at runtime
but are seen as distinct types by the compiler. The compiler will
automatically convert in most places, but template instantiation is
not one of them, so a few places that passed a Protobuf int64 directly
into a template had to be modified.

Please note that tweaks to the mediadrmserver (not covered by this
patch) are needed in order for it to run as 64-bit and load 64-bit DRM
Plugins. Please also note that, as we have no 64-bit L1 OEMCrypto on
any devices, using the 64-bit mediadrmserver and Widevine library will
make your device fall back to L3 for the time being.

Bug: 18949752
Test: OEMCrypto unit tests
Test: Widevine unit tests
Test: Google Play (on Marlin)
Test: Widevine GTS Tests (on Marlin)
Change-Id: Ib6cdf2dd1ff75a1c473cacdc5e22397caa0a656c
2017-03-02 02:58:56 +00:00
Fred Gylys-Colwell
848d851441 Merge "Clean up oemcrypto dynamic adapter and add level 3 libraries" 2017-03-02 02:48:43 +00:00
Fred Gylys-Colwell
4025322185 Source and destination buffers may point to same buffer
Merge from Widevine repo of http://go/wvgerrit/23581

This CL adds some unit tests to oemcrypto to verify that DecryptCENC
and the generic encrypt and decrypt functions behave correctly when
the input and output buffer is the same. i.e. decrypt in place.

The mock and haystack are also updated to pass the tests.

b/34080119

Change-Id: Ie295bdaddbb8058bebb36f6dab092d307f249ecd
2017-03-01 18:27:38 -08:00
Fred Gylys-Colwell
27c01e82b5 Clean up oemcrypto dynamic adapter and add level 3 libraries
Merge from Widevine repo of http://go/wvgerrit/24043

This CL simplifies the way the oemcrypto dynamic adapter handles
backwards compatibility while looking up old function pointers.

It also puts in guards for functions that do not have pointers.

Current Level 3 libraries merged from http://go/wvgerrit/23686/

level3/arm64/libwvlevel3.a  Level3 Library 7283 Feb 15 2017 13:39:10
level3/mips64/libwvlevel3.a  Level3 Library 7285 Feb 15 2017 13:51:12
level3/arm/libwvlevel3.a  Level3 Library 4445 Feb 15 2017 14:20:04
level3/x86_64/libwvlevel3.a  Level3 Library 7284 Feb 15 2017 13:43:04
level3/x86/libwvlevel3.a  Level3 Library 4464 Feb 15 2017 14:14:55
level3/mips/libwvlevel3.a  Level3 Library 4465 Feb 15 2017 14:10:04

Test: OEMCrypto Unit tests pass on bullhead, fugu, and all 
six emulators.  A bullhead was crippled to use L3 only, and 
Play Movies worked OK.  ExoPlayer tests were also run on the 
bullhead.  L1 was re-installed on the bullhead, and Play Movies and 
ExoPlayer tests were repeated with no problems.

Bug: 18949752
Bug: 31458046

Change-Id: I8668fde1ce8a045c71bf33c566f3ff86e11821c5
2017-03-02 01:49:52 +00:00
Fred Gylys-Colwell
3b7b2c91c1 Merge "Clean Up OEMCrypto Header" 2017-03-01 18:40:51 +00:00
Fred Gylys-Colwell
7112a5eec3 Add more slack to timing tests
Merge from Widevine repo of http://go/wvgerrit/24042

This CL adjusts the tolerance in tests that check the license_received
time.  This was periodically failing because a nonce flood might delay
the test by 1 second, which was being rounded up to 2.  The tolerance
is now 3.  The time is explicily used when it is available.  Some
extra logging is also added to the mock.

bug:31458046

Change-Id: I450880cb3cd8bd5ef66cba13b94dd963d2663d9a
2017-03-01 06:30:43 +00:00
Fred Gylys-Colwell
3a9c9ce498 Clean Up OEMCrypto Header
Merge from Widevine repo of http://go/wvgerrit/23482

Now that the documentation has been approved, it's time to
copy text from http://go/oemcrypto to OEMCryptoCENC.h

This also has all the little tweaks to the documents that have been
requested over the past couple of weeks.

b/31458046

Change-Id: I5b865031eb7945005c06bf1b00ecfaaedcad15f4
2017-02-28 22:26:05 -08:00
Fred Gylys-Colwell
eade07c7a9 Minor build updates
This CL removes some unused variables, and changes some integers to
unsigned integers.  On some platforms, we were getting compiler errors
and unit test failures.

Merge from Widevine repo of http://go/wvgerrit/23840
    Use unsigned integer literals

Merge from Widevine repo of http://go/wvgerrit/23767
    Fix Gyp Files

Merge from Widevine repo of http://go/wvgerrit/23500
    Remove unused variables
    
bug: 31458046

Change-Id: I4dfec95ae49187262552fbbf322f3310ab777826
2017-03-01 01:48:56 +00:00
Fred Gylys-Colwell
582d3237c9 More Usage Table Tests
Merge from Widevine repo of http://go/wvgerrit/23865

This adds the following tests to the oemcrypto usage tables suite:
Forbid shrinking the usage table over open sessions.
Shrinking usage table must make it smaller, not larger.
Forbid creation of new usage table while open sessions using old.

Change-Id: Ia97a3f4d3ef53417c4f8c98f8ed6ef9ea06d7fad
2017-02-18 00:19:08 +00:00
Fred Gylys-Colwell
eeaaf311e1 Correct comments and nits from other reviews
Merge from Widevine repo of http://go/wvgerrit/23436

This change is just comment changes: minor rewording and grammar
fixes.

Change-Id: I4cb2ef77715623fdb2567f5b504ffaceb937a480
2017-01-30 15:26:43 -08:00
Fred Gylys-Colwell
e4231fea3b More OEMCrypto Usage Table Unit Tests
Merge from widevine repo of http://go/wvgerrit/23421

This CL adds some more unit tests for big usage tables, and corrects a
problem found in the reference code.

Change-Id: Iae9a4406d79a13362223c2b4da7365b845d92382
2017-01-30 15:26:43 -08:00
Fred Gylys-Colwell
49a61f6270 Merge "OEMCrypto Backwards Compatible Usage Table" 2017-01-30 23:24:52 +00:00
Fred Gylys-Colwell
a118988ecf Merge changes I4e4a6a01,I4e360ea5,I6e08e76f
* changes:
  Refactor OEMCrypto Engine
  Add Shared License bit to key control block
  Reference Code for Big Usage Tables
2017-01-30 23:24:39 +00:00
Fred Gylys-Colwell
9e153438db OEMCrypto Backwards Compatible Usage Table
Merge from widevine of http://go/wvgerrit/23283

This CL adds the backwards compatiblity functions to the new usage
tables in the oemcrypto mock reference code.

b/31458046
b/32554171

Change-Id: I04901d95aceb8910406f7c514c26c29c2c575322
2017-01-30 19:27:14 +00:00
Fred Gylys-Colwell
afb006f960 Merge "Add Unit Tests for Big RSA Keys" 2017-01-30 19:11:10 +00:00
Aaron Vaage
edb9f00df7 Widevine Metrics System
This change is the complete Widevine metrics system. It will
measure and record runtime information about what is happening
in the CDM - such as errors and throughput.

Bug: 33745339
Bug: 26027857
Change-Id: Ic9a82074f1e2b72c72d751b235f8ae361232787d
2017-01-27 16:59:17 -08:00
Fred Gylys-Colwell
d06fa606c7 Refactor OEMCrypto Engine
Merge from widevine repo of http://go/wvgerrit/23280

This CL moves some of the oemcrypto mock classes into their own
files.  There are no real code changes.

Change-Id: I4e4a6a01d8e75051bc0eb2a5d58361c438c7f41b
2017-01-27 15:21:08 -08:00
Fred Gylys-Colwell
650a0fdead Add Shared License bit to key control block
Merge from widevine of http://go/wvgerrit/23184

This adds the shared license bit to the key control block for the
reference code and the unit tests.

b/31458046

Change-Id: I4e360ea5dd2e6cee145663d4ab4f384b65cac427
2017-01-27 15:20:03 -08:00
Fred Gylys-Colwell
3d977d999c Reference Code for Big Usage Tables
Merge from widevine of http://go/wvgerrit/23283

This CL adds some big usage table functionality to the oemcrypto
mock and unit tests.

Still missing are: backwards compatibility, defragging the table,
haystack code, and lots of new unit tests.

The haystack now reports it doesn't support usage tables, so that
the unit tests will pass.  This will be fixed in a future CL.

b/31458046
b/32554171
b/34173776
b/34174907

Change-Id: I6e08e76f7612ffb77e413151e00f830339298c62
2017-01-27 00:11:52 +00:00
Fred Gylys-Colwell
1c5b4175aa Add Unit Tests for Big RSA Keys
Merge from widevine of http://go/wvgerrit/22958/

This adds unit tests for OEMCrypto to check 3072 bit RSA keys.  It
also adds indicates that the mock supports them.

b/32776334

Change-Id: I68a3ff56969a860602e6c230558478dc3577c8f5
2017-01-25 18:21:01 -08:00
Fred Gylys-Colwell
a24acfa928 Clang Format some OEMCrypto Files
Merge from Widevine repo of http://go/wvgerrit/23240

This CL runs clang format on some OEMCrypto test and mock files,
so it is easier to see what really changed in the next CL.

Change-Id: I0abf98fc8d312d5b94ad51c3ef2caae820b931de
2017-01-25 16:30:09 -08:00
Fred Gylys-Colwell
407c06a8da Add New Parameters to CreateUsageTableHeader
Merge from Widevine repo of http://go/wvgerrit/23166

This changes OEMCrypto_CreateUsageTableHeader so that the new header
is passed back in a buffer to the cdm layer.

I hacked out the haystack call and just stubbed out the mock call.
This should still build and run with previous liblevel3.a builds.

I also removed from the header some function names that are no longer
part of OEMCrypto v13.

bug:31458046

Change-Id: Ie490c482fe2457076f9026369f4b4b9491a4eb81
2017-01-25 16:28:26 -08:00
Fred Gylys-Colwell
2afe783ce0 Unit Test Updates for v13
Merge from widevine of http://go/wvgerrit/23042

This updates unit tests to account for key control block changes for
OEMCrypto v13.  There are two new bits, restricting SRM version and
restricting analog output.  The verification string is also updated.

Part of this is to include some simple unit tests for the SRM
functions.

b/33815454
b/28955520

Change-Id: I7cc2ce508688fded2b67fc2a4379c7a8d59d8d22
2017-01-23 20:34:13 -08:00
Fred Gylys-Colwell
7152957e42 Replace PST Report with buffer
Merge from Widevine repo of http://go/wvgerrit/23044

On some platforms, the compiler will not pack structures.  This CL
replaces the OECrypto_PST_Report packed structure with a simple buffer
of uint8_t.  This changes the signature of OEMCrypto_ReportUsage as
part of OEMCrypto v13.

There is also a new wrapper class that test code, the mock, and debug
code can use to access data in the report.

The old packed structure definition is moved to the level 3, where we
use a compiler that packs sructs when asked nicely.

arm/libwvlevel3.a  Level3 Library 4445 Jan 20 2017 11:29:15
x86/libwvlevel3.a  Level3 Library 4464 Jan 20 2017 11:10:49
mips/libwvlevel3.a  Level3 Library 4465 Jan 20 2017 10:56:08

b/32180083

Change-Id: Ie138f034cb12780a2f8636888cebf022c52169e5
2017-01-23 19:53:45 +00:00
Fred Gylys-Colwell
a494eeafdc Add InactiveUnused to Usage Report status
Merge from Widevine repo of http://go/wvgerrit/22963

This change kInactive to kInactiveUsed and adds kInactiveUnused to the
possible values for the status field in the Usage Report.  This CL
updates the header, the unit tests, and haystack and reference code.

b/32714323

Change-Id: If8d8e32ea1e3dc18da34e5fae35f578b027de9c7
2017-01-23 19:53:24 +00:00
Fred Gylys-Colwell
b2a3921b37 OEMCrypto v13 Header and Stubs
Merge from Widevine repo of http://go/wvgerrit/22899

This is most of the header changes for OEMCrypto v13.  This updates
just enough of the code that existing unit tests build and pass.

The documentation will be reviewed in http://go/wvgerrit/22887.  When
that CL has been approved, comments in the code will be updated to
match.

Real code will be broken into several other CLs.

bug:31458046

arm/libwvlevel3.a  Level3 Library 4445 Jan 17 2017 20:01:26
x86/libwvlevel3.a  Level3 Library 4464 Jan 17 2017 19:00:37
mips/libwvlevel3.a  Level3 Library 4465 Jan 17 2017 19:24:35

Change-Id: I0318c53235c0b33afb623cba933365e09dec4e61
2017-01-23 03:28:28 +00:00
Fred Gylys-Colwell
5748860679 Rename oemcrypto's CryptoEngine configuration functions.
Merge from Widevine repo of http://go/wvgerrit/22797

CryptoEngine has a number of functions that return constants that
control the configuration of mock OEMCrypto.  Give all the functions
a common prefix (config_) so their intent is more clear.

Change-Id: Idf9d3e9e8941fa0e793b0eb17a3f89bf634d9ed5
2017-01-20 17:02:12 -08:00
Fred Gylys-Colwell
3164194908 Move keybox and root certificate handling into new class.
Merge from Widevine repo of http://go/wvgerrit/22804

Create a class, AuthenticationRoot, to encapsulate the objects and
logic for managing either keyboxes or certificates as the device's
root of trust.

Currently the class provides the existing keybox-related functions
needed by oemcrypto's CryptoEngine. It will be extended to provide
both keybox and certificate related functions, and the logic to
determine whether keybox or certificate based authentication should
be performed.

Change-Id: I792d1bfc8e9a81bbfd2baec20e3b3d182f0392f7
2017-01-20 16:57:32 -08:00
Fred Gylys-Colwell
a0c1f218c5 Test OEMCrypto with backwards compatible verification
Merge from Widevine repo of http://go/wvgerrit/22571

This adds unit tests to verify that OEMCrypto accepts all key control
block verification strings kctl, kc09, kc10, ....   This is needed now
that the unit tests use the current API for all other unit tests.

b/33253872

Change-Id: Ie6b556fc91cd6cb6e07141bd50da3dbfa1681fec
2017-01-20 16:40:23 -08:00
John W. Bruce
d30c5f8d33 Break Decrypt Buffers Into 100KiB Blocks As Needed
(This is a merge of go/wvgerrit/22949)

Starting with OEMCrypto v12, we are guaranteeing to integration partners
that the buffers passed to OEMCrypto_DecryptCENC and
OEMCrypto_CopyBuffer will not be more than 100KiB (102400 bytes) in
size. For requests larger than this, we will first try to send the
buffer to OEMCrypto anyway. (in case the integration supports buffers
larger than the minimum) In the event that the buffer is rejected, we
will break it up into 100KiB chunks and send them down individually for
decryption.

Breaking a subsample into smaller subsamples necessitates knowledge of
how to update other decryption parameters (like the offsets and the IV)
that previously the CDM Core has not needed to know about. Until now,
this knowledge lived in the glue layer on the Android CDM and nowhere
on the CE CDM. Now, the CryptoSession has a subset of this knowledge, in
order to break up buffers successfully.

For testing purposes, the Mock OEMCrypto has been modified to only
support the smallest buffer size. In order to make sure the chunking
code was being exercised by them, the CE CDM tests had to have the
amount of data they decrypt increased by several orders of magnitude. To
contain this growth, I have moved the test data to its own file.

Bug: 31381719
Test: Ran the updated CE CDM integration tests
Test: Modified the OEMCrypto dynamic adapter to pretend both L3 and L1
only support 100KiB buffers on a Marlin and a Ryu. Confirmed that the
GTS H.264 tests (which have subsamples over 100KiB) passed still. A
similar test was attempted on Fugu but Fugu cannot pass these tests even
without this change present.
Change-Id: Iabe7db3d87554cd1352f10a7524cd55352818397
2017-01-17 16:07:45 -08:00
Fred Gylys-Colwell
50fe997cf2 OEMCrypto_GetDeviceID should return Not Implemented for Prov 3.0
Merge from Widevine repo of http://go/wvgerrit/22402

This CL updates the oemcrypto reference implementation (mock) to
return OEMCrypto_ERROR_NOT_IMPLEMENTED from OEMCrypto_GetDeviceID when
the device is configured to use provisioning 3.0.

This CL also moves unit test for OEMCrypto_GetDeviceID to the section
that is run only for keybox using devices.

b/33178932

Change-Id: Ie4f9346132ce305bdbd47474dc4c0f6268f3d444
2016-11-30 15:54:00 -08:00
Fred Gylys-Colwell
1d5a03cb40 OEMCrypto Refresh License Tests with PST
Merge from widevine repo of http://go/wvgerrit/22409

This CL adds unit tests for refreshing online and offline licenses
that have usage table entries.

b/32609464

Change-Id: I5166a43525ebb324bc2f253cee6b6f34da697cec
2016-11-30 15:52:29 -08:00
Fred Gylys-Colwell
7fc037f1a9 Update Key Control Verification String
Merge from widevine repo of http://go/wvgerrit/22382

This updates the key control verification string in the haystack, in
the reference oemcrypto (mock), and in the oemcrypto unit tests.

The unit tests now set the key control block to be kc12 for all
licenses if the API is set to version 12.  Previously, we only used
the more recent verification codes if the key control block used
recent features.

This should help prevent future incidents like b/32830469.

Change-Id: I6c215b4058445a6d807610af94457598f26d591a
2016-11-29 16:10:13 -08:00
Fred Gylys-Colwell
08ad98cad9 Implement provisioning 3.0 functionality in oemcrypto mock
Merge from widevine repo of http://go/wvgerrit/21684

This CL adds provisioning 3.0 functionality to the OEMCrypto reference
implementation.

Change-Id: I60c1fd88f246d443e0ae59ad56862c2ea9d95445
2016-11-29 16:07:00 -08:00
Fred Gylys-Colwell
3e525dfdd3 OEMCrypto rewrap rsa key 3.0 unit tests
Merge from widevine repo of http://go/wvgerrit/21683

This CL adds unit tests for OEMCrypto_RewrapDeviceRSAKey30 for devices
that use provisioning 3.0.

Change-Id: Ib1a5566de343365b2ae3531f375ac2cc6d86ee53
2016-11-29 15:18:19 -08:00
Fred Gylys-Colwell
053ff5bd3c OEMCrypto Tests Provisioning Method
Merge from widevine repo of http://go/wvgerrit/21682

This CL updates oemcrypto/test/oec_device_features.cpp to figure out
the provisioning method and filter out tests that are not relevant to
the device's method.

This CL also introduces unit tests for GetOEMPublicCertificate.

Unit tests for RewrapDeviceRSAKey30 will be in a future CL.

Change-Id: Ib7065ce866d1171ca61b9aa08188fa2ac8d90fc2
2016-11-29 15:15:08 -08:00
Fred Gylys-Colwell
0fb76d5c1b Refactor OEMCrypto Unit Tests
Merge from widevine repo of http://go/wvgerrit/21681

This CL refactors some oemcrypto unit tests in preparation for adding
Provisioning 3.0 tests.

- The signature GenerateNonce has changed.  Instead of the caller
  passing in a pointer for the nonce, we store the nonce in a member
  variable of Session.

- GenerateDerivedKeys is being replaced by InstallTestSessionKeys.
  This sets up and calls the appropriate derive keys method.  This
  function is in the test class, instead of the session class so that
  multiple sessions in a class can share the same wrapped rsa key.
  This will be modified for provisioning 3.0 in a future CL.

- Rename tests that require a keybox.  Some tests are specific for
  using a keybox to request a DRM cert. These tests are renamed so we
  can filter them out on devices that use an OEM Cert.  Corresponding
  tests for devices using provisioning 3.0 will be in a future CL.

- Some member variables and methods in the class Session were not
  used.  They are removed.

- Added openssl smart pointer.

- Comments.  I added comments.

- clang format.

Change-Id: Ib579a322858e0ef92652a42167241b35cf85a041
2016-11-29 15:05:23 -08:00
Fred Gylys-Colwell
4cac936b10 OEMCrypto v12 Haystack and Adapter
Merge of several CLs from the widevine repo.

Merge from widevine repo of http://go/wvgerrit/22440
Build OEMCrypto v12 Haystacks with cache flush

level3/mips/libwvlevel3.a  Level3 Library 4465 Nov 29 2016 13:34:45
level3/arm/libwvlevel3.a  Level3 Library 4445 Nov 29 2016 14:02:08
level3/x86/libwvlevel3.a  Level3 Library 4464 Nov 29 2016 14:22:21

Merge from widevine repo of http://go/wvgerrit/22403
Pull cache flush out of Haystack

Merge from widevine repo of http://go/wvgerrit/21145
OEMCrypto v12 stubs -- just the header file changes.

Merge from widevine repo of http://go/wvgerrit/21146
Add OEMCrypto v12 functions to profiler

This CL adds the new oemcrypto v12 functions for provision 3.0 to the
list of profiler functions.

Merge from widevine repo of http://go/wvgerrit/21143
OEMCrypto v12 adapter

This CL updates the oemcrypto dynamic and static adpaters to include
oemcrypto v12 funtionality.  It adds the three new Provisioning 3.0
functions.

It also adds code in the initialization routine to null out all of
the function pointers if any of them fail to load.  It is better to
fall back to level 3 than to use an inconsistent level 1.

b/31528025

Change-Id: I3579dc93e00ad7e7c743beecdd8291eac557d4e4
2016-11-29 14:56:36 -08:00
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
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
Fred Gylys-Colwell
f248bbb9ee Merge "File util, generic crypto, and key query" 2016-10-25 17:40:54 +00: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
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