Commit Graph

850 Commits

Author SHA1 Message Date
Fred Gylys-Colwell
92958a0e6a Protect OEMCrypto Mock and Level 3 From Null Pointers
Merge from widevine repo of http://go/wvgerrit/14502

If any OEMCrypto session call is made after Terminate is called, then
there was a null pointer access.  This is protected by the oemcrypto
adapter, but could still be a problem in unit tests which by-pass the
adapter.

bug: 21642892

Level 3 versions:
level3/arm/libwvlevel3.a  Level3 Library May 29 2015 14:03:11
level3/x86/libwvlevel3.a  Level3 Library May 29 2015 14:03:12

Change-Id: I84fd098c2faea71a79bc21658485593e22a8e994
2015-06-04 15:54:08 -07:00
Fred Gylys-Colwell
9dfa85ae2a Replace some arrays with vectors and initialize
Merge from widevine side of http://go/wvgerrit/14462

This cleans up some tests in oemcrypto_test.cpp so that they use
vectors instead of arrays.  The two reasons this is needed are that
arrays are more likely to use up stack space, and that arrays on the
stack are not initialized.

The lack of initialization caused some negative tests to fail because
buffers that were reused from unencrypted data still contained values
that the test expected not to be there.

Change-Id: Ic1705b6bc581084a9fe3cd573adf34d8219a1a45
2015-05-29 13:53:08 -07:00
Fred Gylys-Colwell
994a7fc4c1 Update OEMCrypto Offset Tests
Merge from widevine repo of http://go/wvgerrit/14321

It is expected that OEMCrypto will only be given subsamples with a
block offset when there are multiple subsamples, so that the entire
sample may be decrypted after all calls are made.  This CL modifies
the existing tests so that the result of DecryptCTR is only checked
after all subsamples have been decrypted.

Also, the QueryKeyControl test has been modified so that failure does
not require a specific error code.

bug: 20757848
bug: 21063276
Change-Id: Ie2b12b287b0c9c661cd14111b2ae9eab004cd8b8
2015-05-29 13:50:20 -07:00
Fred Gylys-Colwell
6639965d30 Update padding scheme in mock
Merge from widevine repo of http://go/wvgerrit/14370

In order to run on android, we need the mock to compile with
BoringSSL, which uses a different function call for
RSA_padding_add_PKCS1_PSS.

Change-Id: I9cad4e7d5c1d4a3117fe7c0fc1e27590809a7ac3
2015-05-19 21:05:29 -07:00
Fred Gylys-Colwell
7fffdcdbd9 Print values in host byte order
Merge from widevine of http://go/wvgerrit/14361

In oemcrypto_test, we look at some control duration and control
bits. These are stored in network byte order.  However, it is easier
to read error messages if they are converted to host byte order before
printing them.

Change-Id: I116b5f43957351b0e40e05331c282c248128903c
2015-05-14 15:54:38 -07:00
Chih-Hung Hsieh
1c6b675f0c Use gcc to build unit tests until vendor code is fixed.
BUG: 20893039
Change-Id: I649dae16bbc748defc8eb92c879140fe950fe936
2015-05-06 16:44:47 -07:00
Fred Gylys-Colwell
48e84580e9 Close Unused Sessions in NonceFlood Unit Test
Merge from widevine of http://go/wvgerrit/14263

The unit test PreventNonceFlood3 opens 8 sessions and floods the nonce
table.  It then opens one more session after a pause to verify that it
can still request nonces.  However, there is no requirement that we
can open more than 8 sessions.  This CL reuses one of the already open
sessions to verify that we can continue generating nonces.

Change-Id: If35f146477bd21e381ec5375dde7ec7fdbe8f366
2015-05-01 15:55:34 -07:00
Fred Gylys-Colwell
c4d9c1036e Merge "Update unit test make files to use BoringSSL" 2015-04-22 17:35:25 +00:00
Fred Gylys-Colwell
d6da9518ec Merge "Annotate logcat with current running test (oemcrypto)" 2015-04-22 17:34:53 +00:00
Fred Gylys-Colwell
f75fddcdf1 Update unit test make files to use BoringSSL
Merge from widevine of go://wvgerrit/14173

This CL updates the android makefiles to use the libcrypto_static.

Change-Id: I74567ff880ebdce366766a9ab44c92cc9540b8db
2015-04-22 07:47:51 -07:00
Fred Gylys-Colwell
39a86c688a Simplify Nonce Flood Test
Merge from widevine of http://go/wvgerrit/14134

This CL adjusts the nonce flood test so that the timing is more
explicit.  Also, if the test fails, the error message should tell us
exactly how many nonces were generated and the duration of the test.
Thus we'll be able to tell if the test almost passed.

b/19081206

Change-Id: I2c59755466b017910b86f6b02f2883a771d0ccb7
2015-04-20 11:38:59 -07:00
Fred Gylys-Colwell
a745387c20 Annotate logcat with current running test (oemcrypto)
Merge from widevine repo of http://go/wvgerrit/14125

This copies code from http://go/wvgerrit/13847 to the oemcrypto unit
tests.  It puts the test name in the log file.

I also commented out some unused function parameters to avoid compiler
warnings.

Change-Id: I3ba259de2f408ec60e90db7f0ea1524d5aa8f8a4
2015-04-17 12:51:20 -07:00
Kyle Alexander
7cb708b8ad Merge "Fix compatibility for tests to execute on older OS versions" 2015-04-10 17:14:06 +00:00
Kyle Alexander
1e87ad760f Fix compatibility for tests to execute on older OS versions
Change-Id: I7b2554d097901cd5880b6cd3ddbe66c9b127dcfd
2015-04-10 09:15:23 -07:00
Fred Gylys-Colwell
2527f77201 OEMCrypto Unit Tests
This is a merge from the Widevine repository of
http://go/wvgerrit/14024
Add Level 3 Oemcrypto Unit Tests To Run All Tests Script

This CL adds the ability to restrict the oemcrypto unit tests to only
use the fall back level 3.  This restriction is per-process, and is
only used while running the unit tests.  This allows us to automate
running the unit tests on an android device as both level 1 and level
3 without modifying files in /system/lib.  To turn on the restriction,
set the environment variable: FORCE_LEVEL3_OEMCRYPTO=yes.

New level 3 library versions are:
level3/arm/libwvlevel3.a  Level3 Library Apr  8 2015 13:09:05
level3/x86/libwvlevel3.a  Level3 Library Apr  8 2015 13:15:42

http://go/wvgerrit/14055
Remove Redundant Tests

This CL modifies the UsageTableTests in oemcrypto_test.cpp so that
they are not all parameterized by new_mac_keys_.  This parameter is
used when testing signatures.  In particular, we do not need to verify
timing twice.

Also, I modified the run_all_unit_tests.sh script so that the
environment variable GTEST_FILTER is passed down to the android
process.  This allows us to use the script to run a limited list of
tests while debugging.

http://go/wvgerrit/14054
Filter Out API Version 10 Tests

This CL updates the OEMCrypto tests so that all but one test will pass
for a device that implements the version 9 API.

Android LMP devices should pass tests with
        GTEST_FILTER="*-*MNC*:*CanLoadTestKeys*"

http://go/wvgerrit/13886
Update Documentation about Optional Features

The intergration guide has been updated to include reference to
OEMCrypto_LoadTestRSAKey.  It also now discusses optional features.

The Delta 10 document now mentions OEMCrypto_LoadTestRSAKey.
The android supplement warns that most optional features are required.

This also adds clarification about which functions should save the
usage table, in answer to:

b/16799904 OEMCrypto v9 ambiguous about saving usage table information

Change-Id: Ifb517d58952c9b332b2958ca99af64bc293b985f
2015-04-09 16:19:17 -07:00
Fred Gylys-Colwell
6d5be4fddf Enable OEMCrypto Unit Tests
This is a merge from the widevine repository of
http://go/wvgerrit/13923 Switch openssl to use the EVP interface for aes-ctr-128
http://go/wvgerrit/13979 Add Test Certificate to OEMCrypto Mock
http://go/wvgerrit/13978 Add Test Keybox to Level 3 OEMCrypto
http://go/wvgerrit/13873 Enable OEMCrypto Unit Tests

This CL adds a main program to oemcrypto_test.cpp, which filters out
tests that are not supported on the specified platform. It also adds
LoadTestKeybox to the mock. This allows oemcrypto unit tests to be run
on devices that have production keybox.  It also allows the same set
of unit tests to work on Android and on non-Android platforms.

b/18962381 Use test certificate (partial fix)
b/19867990 Separate cast receiver tests

Change-Id: If89c31530103ed85aa37d7379bd5b4dc2a927f38
2015-04-07 15:24:10 -07:00
Edwin Wong
229fb48f83 Merge "Add VerifyUsageTimes() test." 2015-04-07 20:17:35 +00:00
John Bruce
71ccb7f032 Merge "widevine: update to work with BoringSSL." 2015-04-07 19:14:34 +00:00
Edwin Wong
cc189d0461 Add VerifyUsageTimes() test.
Merge from Widevine: http://go/wvgerrit/14022

This test will be called by GTS test to verify secure stops
are reporting the correct time during online playback.

bug: 18625670
Change-Id: Ieb2b9ad860d796eea3c63c4fb349f4e3c6ac8f34
2015-04-07 12:09:30 -07:00
Adam Langley
4f01ef23d1 widevine: update to work with BoringSSL.
This change:

1) Switches the Makefiles over to using LOCAL_STATIC_LIBRARIES, which I
understand is the new hotness, rather than setting a -I flag directly.

2) Switches to the non-deprecated _ex versions for EVP_EncryptFinal.

3) Uses the EVP_PKEY interface for checking PSS signatures. This is the
only supported interface in OpenSSL: the PSS padding check functions are
only exported in upstream OpenSSL because it's a library from the 90s
and they don't have a concept of "unexported". Also, by using the EVP
functions, OpenSSL/BoringSSL can do a better job of being constant-time.

Since there aren't any obvious tests for checking that the signtaure
verification still works, I tested with the code in the referenced
paste, which includes both the old and new verification functions and
checks that they both work on a sample signature. (And I also checked
that they both fail when a bit in the signature is changed.)

https://paste.googleplex.com/5747976139964416

Change-Id: Iae7409c53eeea9c3892a32c180d7181d72467dcb
2015-04-01 15:46:54 -07:00
Fred Gylys-Colwell
42f7458cfc Fix Memory Leak In OEMCrypto Level 3 Haystack
Merge from Widevine repo of http://go/wvgerrit/10308

There was a memory leak in the oemcrypto RSA code.

Also, when saving the usage table, some session variables were
allocated twice.  This results in session data  being lost.

There were also some leaks and uninitialized values in oemcrypto_test.

I added some checks and profiling to the debug runtime for the
haystack.  It will warn if a variable is left unencrypted or is
unencrypted twice.  I also added the profile code.

Versions of L3 library:
android/level3/arm/libwvlevel3.a  Level3 Library Apr  1 2015 11:40:06
android/level3/x86/libwvlevel3.a  Level3 Library Apr  1 2015 12:44:32

b/19950814

Change-Id: Ic752e36c09fce121dcaf92f9209591e74f3eb070
2015-04-01 12:52:29 -07:00
Fred Gylys-Colwell
ae1711acc0 Add backward compatibility to OEMCrypto_CopyBuffer
Merge from Widevine repository of http://go/wvgerrit/13912

This CL falls back to OEMCrypto_DecryptCTR if the oemcrypto library
does not implement OEMCrypto_CopyBuffer.  This allows devices with
oem crypto version 9 to function as they previously did.

Change-Id: Id3a4a94b1fd559f426ee260cfbf7077fa9101d8b
2015-03-31 20:33:11 -07:00
Fred Gylys-Colwell
a7d2f57bfb Clear Content Copy
Copy from Widevine repository of http://go/wvgerrit/13841

This CL adds a nonblocking CopyBuffer to OEMCrypto, its unit tests,
and plumbs it up to the cdm CryptoSession and CdmEngine.

b/19543782

Change-Id: I4c88bd2f8d7f67ecccb549c1934b7c0da15a8429
2015-03-31 09:15:38 -07:00
Fred Gylys-Colwell
582eb32661 OEMCrypto Query Key Control Block
Merge from Widevine repo http://go/wvgerrit/13818

This CL adds the ability to query OEMCrypto about the key control
block and duration of a key that has been loaded.  There are unit
tests and implementation in the level 3 and reference implementation.

b/18503541

Change-Id: I8e40d90a3c64c1ce030af6fef9e98c8eac0df1a5
2015-03-30 15:38:52 -07:00
Fred Gylys-Colwell
10cc0a5ddb Require Features for Android OEMCrypto
Merge from Widevine repo if http://go/wvgerrit/13781

This CL adds several unit tests that are specifically designed to test
features that are required for Android CDM but not other platforms.

Once this CL has been merged, future CLs will modify the main
oemcrypto test file so that some tests are skipped if their features
are not implemented.

Change-Id: I55b8cbb9c13d2db88bd4f56bba31a4aab3306067
2015-03-30 11:27:01 -07:00
John "Juce" Bruce
7b262e1d02 Alphabetize & Googleize Header Inclusions
(This is a merge of http://go/wvgerrit/13761 from the Widevine
repository.)

This cleans up our includes to be in Google Style Guide order and in
alphabetic order, for the parts of the code that are expected to
follow Google Style.

This also converts places in our code that were including C headers
in the C++ style (i.e. <cstring> instead of <string.h>) to use C style
instead. This is because, although it was not causing problems for us
yet, on Android these actually include different headers. (<cstring>
is provided by libcxx, while <string.h> is provided by Bionic)

Lastly, this change puts all headers that do not come from within our
project in <brackets> instead of "quotes," which was not being done
consistently.

This change is explicitly NOT trying to standardize the spacing of our
header includes. I have tried to respect, in each file, the spacing
style already present.

Change-Id: If3dc06532ab9b68010285d64518ef21dce3d6354
2015-03-26 15:02:02 -07:00
Fred Gylys-Colwell
69d7ffb22d Update key control block verification
This is a merge of http://go/wvgerrit/13752

Replace the mock's macro with a memcmp because that is
even cleaner.

Change-Id: Ie402689ca9e14a67736db7eea928204f067427ac
2015-03-19 20:49:14 -07:00
Fred Gylys-Colwell
047f543e7c Improve OEMCrypto unit tests
This is a merge of http://go/wvgerrit/13701 and http://go/wvgerrit/13780.

I added a new set of engine properties for the mock oemcrypto.  This
set pretends to be level 1. This allows the widevine build bot to test
the dual security level path: a level 1 liboemcrypto.so and a fall
back to L3.

I also adjusted the failing test in oemcrypto_test.cpp.  A correct fix
requires us to rewrite some of the oemcrypto mock code so that it
returns real error codes instead of just 'false' on error.

Change-Id: I9cdbfc23c87ad2fb6068eac1394ce4c5b6a32dae
2015-03-19 15:08:10 -07:00
Fred Gylys-Colwell
d2ba3a3f91 Allow selective removal of Usage Table Entries by PST
This is a merge of http://go/wvgerrit/13693 in the Widevine
repository.

This adds level 3 and mock implementation and unit tests for the
OEMCrypto function OEMCrypto_ForceDeleteUsageEntry.  It also plumbs
this function up into CdmEngine, CdmSession, and CryptoSession so that
deleting all usage information for a given app id will now delete the
entries in OEMCrypto, too.

b/18194071

Change-Id: Iaea4034a507b323878657215784edfe95876386a
2015-03-18 18:09:37 -07:00
Edwin Wong
a7887f60fc Add OEMCrypto_IsAntiRollbackHwPresent API for OEMCrypto v10.
Merge from WV CDM repo: https://widevine-internal-review.googlesource.com/#/c/13660/.

bug: 18948905
Change-Id: I1ffe72baaac9abf05c06139de790236e763f89a8
2015-03-18 17:53:17 -07:00
KongQun Yang
a8243b75fe Merge changes Id261ab16,I0aca81b9
* changes:
  Make GetMaxNumberOfSessions and GetNumberOfOpenSessions security level aware
  Add test for OEMCrypto_ERROR_TOO_MANY_SESSIONS
2015-03-18 23:53:28 +00:00
KongQun Yang
ef04608109 Merge "Use requested_security_level_ in SupportsUsageTable" 2015-03-18 22:40:17 +00:00
KongQun Yang
fa055673d5 Add test for OEMCrypto_ERROR_TOO_MANY_SESSIONS
Also restore the requirement that OEMCrypto shall support at least
8 sessions.

Bug: 19641109

Merged from Widevine CDM repo:
https://widevine-internal-review.googlesource.com/#/c/13570/

Change-Id: I0aca81b9fe1f4f6505ddf91bcf399ac910b654aa
2015-03-17 17:25:53 -07:00
KongQun Yang
46f26fe6ae Implement OEMCrypto_GetNumberOfOpenSessions
Merged from Widevine CDM repo:
https://widevine-internal-review.googlesource.com/#/c/13560/

Change-Id: Ie19bf3e57d0c4b1621b95bd5912a751ccfbaaa7b
2015-03-17 17:25:33 -07:00
Fred Gylys-Colwell
bd2ac27684 Add backwards compatibility for OEMCrypto version 9
This is a merge of http://go/wvgerrit/13710

The oemcrypto adapter loads a version 8, 9 or 10 library and adds
backwards compatibility for version 8 or 9.

The only function whose signature has changed from v9 to v10 is
OEMCrypto_GetHDCPCability. This CL adds backwards compatibility for
that function.

Level 3 libraries are now:
level3/arm/libwvlevel3.a  Level3 Library Mar 17 2015 14:33:34
level3/x86/libwvlevel3.a  Level3 Library Mar 17 2015 14:30:23

b/19785099 L1 Widevine missing/broken on master (Fugu)
b/19789909 L1 Widevine missing on master (AAY75B)

Change-Id: I9bd716f5cdffaf1bfbdfcd8ed067af3f5d0ac9ba
2015-03-17 15:35:56 -07:00
KongQun Yang
9ee523a3cd Use requested_security_level_ in SupportsUsageTable
Also fix a build warning from an earlier CL.

Merged from Widevine CDM repo:
https://widevine-internal-review.googlesource.com/#/c/13669/

Change-Id: I87f161afac76e622869e5370e4f63476cb3ea97f
2015-03-16 14:59:13 -07:00
KongQun Yang
7e5d016531 Reorder OEMCrypto definitions according to OEMCryptoCENC.h
Merged from Widevine CDM repo:
https://widevine-internal-review.googlesource.com/#/c/13510/

Change-Id: I0ce612a5ff2167704a87e3b3b650beaddf095c61
2015-03-12 09:21:40 -07:00
Fred Gylys-Colwell
68034dd900 OEMCrypto Version 10 API
This is a merge of http://go/wvgerrit/13391 from the Widevine repository.

This CL adds the OEMCrypto version 10 API to the header, and changes
just enough code so that code still compiles.  There are no unit tests
or implementation.

The level 3 libraries are just stubs so that tests will compile.
level3/arm/libwvlevel3.a  Level3 Library Mar 11 2015 13:33:21
level3/x86/libwvlevel3.a  Level3 Library Mar 11 2015 15:20:27

Change-Id: I41de753a2a60da29b756c3327341ece72069d8bb
2015-03-11 15:29:45 -07:00
KongQun Yang
23c95a1251 Merge MaxNumberOfSessions changes from CDM
Bug: 18377675

Implement new OEMCrypto function to get max number of sessions
https://widevine-internal-review.googlesource.com/#/c/12980/

Add oemcrypto static adapter for v9
https://widevine-internal-review.googlesource.com/#/c/13022/

Support new property to query MaxNumberOfSessions in CDM
https://widevine-internal-review.googlesource.com/#/c/13020/

Fix GetHdcpCapabilities incorrect return if not initialized
https://widevine-internal-review.googlesource.com/#/c/13210/

Change-Id: I02738c543cedd6e38d8826f845fec6cb2b1ede3c
2015-03-09 13:05:21 -07:00
Fred Gylys-Colwell
87ea4f6ad4 Merge OEMCrypto changes from CDM to android repository
This is a merge of the following CLs:

Style clean up in oemcrypto/mock
https://widevine-internal-review.googlesource.com/#/c/10660

Split off default keybox.
https://widevine-internal-review.googlesource.com/#/c/10661/

Split off several properties from CryptoEngine.
https://widevine-internal-review.googlesource.com/#/c/10662/

Split off Keybox installation.
https://widevine-internal-review.googlesource.com/#/c/10680/

Wii-U build compatibility fixes.
https://widevine-internal-review.googlesource.com/#/c/10720/

Fix style issues in oemcrypto_logging_test.
https://widevine-internal-review.googlesource.com/#/c/10824/

Correct OEMCrypto error codes in the mock.
https://widevine-internal-review.googlesource.com/#/c/10821/

Enable logging during OEMCrypto unit tests.
https://widevine-internal-review.googlesource.com/#/c/10833/

Wait to create usage table path until needed.
https://widevine-internal-review.googlesource.com/#/c/10831/

Allow keybox installation to be unimplemented.
https://widevine-internal-review.googlesource.com/#/c/10850/

Minor clean up in the OEMCrypto header.
https://widevine-internal-review.googlesource.com/#/c/10921/

Add usage table device property to the mock oemcrypto
https://widevine-internal-review.googlesource.com/#/c/11092/

Change-Id: I02a818a620bcd4bd2291f1b3c0ac9308ae444319
2015-03-02 16:45:43 -08:00
Dan Albert
723d67c88f Remove Widevine CDM Dependency on STLPort
* Replace an stlport static assert with a C++11 static_assert.
 * Move some libraries that were being built with the NDK but
   statically included into platform code off the NDK.
 * Rebuild the obfuscated binaries to use the new STL.
 * Remove MIPS support temporarily due to an inability to generate
   obfuscated binaries for it. (To be fixed in b/19482469.)

Bug: 15193147
Change-Id: Icc166583b0c6af68550baf17ab8c33076a1179d3
2015-02-25 15:53:36 -08:00
Kyle Alexander
8e31c7f445 Makefile to support building XtsOEMCryptoTestCases module
This makefile will be linked to from the vendor/xts project,
and defines how to build the oemcrypto_unittest executable into
an xts compatible native test.

Bug: 18952052
Change-Id: I8158cad703b558b88070cc46dafcf109699ecc77
2015-02-20 14:48:34 -08:00
Dan Albert
de4bc34719 Fix build.
This project is still using stlport (without telling the build system
about it), which was causing (broken) stlport headers to override
libc++ headers, leading to a broken copy of std::enable_if, which in
turn caused <atomic> to fail to compile. Since this project has
prebuilts that will need to be updated before this project can
actually move away from stlport, tell the build system that it is
still using stlport for now.

Bug: 18433002
Change-Id: I38b356428977ed2184eb28a07bd5e7424a4ace8d
2014-11-25 13:41:47 -08:00
Fred Gylys-Colwell
2ca704e5c0 Adjust PreventNonceFlood tests
The OEMCrypto library should prevent too many nonces from occuring in
a row. Previously, we tested that GenerateNonce generated an error if
there were too many nonce requests.

This CL makes it possible for OEMCrypto to delay the return from
GenerateNonce if there are too many requests.  This is an equally
valid solution to the nonce flood attack.

This is a unit test change only.  No production code is affected.

This is a merge from the widevine repository of:
https://widevine-internal-review.googlesource.com/#/c/11604/

bug: 17630253
Change-Id: Ie97f712d70230cd8e7ea7089da0aa18039673bb4
2014-11-06 22:12:51 -08:00
Fred Gylys-Colwell
457998d677 Correctly handle missing entry in DeactivateUsageEntry
This is a copy of
https://widevine-internal-review.googlesource.com/#/c/11110/

The level 3 oemcrypto library version of DeactivateUsageEntry now
returns OEMCrypto_ERROR_INVALID_CONTEXT if there is no entry in the
usage table.

Current Library Version:
arm:  Level3 Library Sep  3 2014 18:13:47

b/17373630

Change-Id: Iaeb65b4ad4b2b9f3c6733a2c9c8d96e2be263d09
2014-09-05 14:21:07 -07:00
Fred Gylys-Colwell
e51f8ba7a1 Catch null pst in OEMCrypto
This is a copy of
https://widevine-internal-review.googlesource.com/#/c/11030

It is an error for the key control block to have a nonzero replay
control flag and a null pst.  This CL adds unit tests to
oemcrypto_test to verify that oemcrypto checkes this.  A unit test is
also added for verifying that an offline license has a valid nonce the
first time it is loaded.

It also updates the reference implementation (mock) to check that the
pst is not empty when the replay control flag is nonzero.

It also updates the level 3 implementation to check that the pst is
not empty when the replay control flag is nonzero.

This change is compiled into the arm library, but because of
compilation errors, is not included in x86 or mips.

    Current Library Version:
    arm:  Level3 Library Aug 27 2014 18:42:40

bug: 16525204 OEMCrypto unit test for reloading offline license
bug: 16844305 Mock OEMCrypto does not catch null pst
Change-Id: Icdb090e80fc92522c187b26f30e5ba082f26363b
2014-09-03 11:46:10 -07:00
Jeff Tinker
fbe0994902 Fix widevine unit test builds on 64-bit devices
bug: 17080975
Change-Id: Ic54d484e18fe0416855264ca073474f3d597e1a3
2014-08-16 12:11:05 -07:00
Fred Gylys-Colwell
157afc627a Merge "Integers encoded with PKCS#8 binary DER should have sign bit" into lmp-dev 2014-08-12 23:14:33 +00:00
Fred Gylys-Colwell
909887923d OEMCrypto_DeleteUsageTable now returns OEMCrypto_SUCCESS
Copy of widevine change:
https://widevine-internal-review.googlesource.com/#/c/10911/

OEMCrypto_DeleteUsageTable used to return an error on every call
because UsageTable::Clear always returned false.  Since there is no
error checking that Clear can do, its return type has been changed to
void, and DeleteUsageTable now returns OEMCrypto_SUCCESS for all
calls.

bug: 16799906
Change-Id: Iaa2f572e4b0feb554877579596a7f43a64d20954
2014-08-12 14:14:46 -07:00
Fred Gylys-Colwell
24c2ca2f9b Integers encoded with PKCS#8 binary DER should have sign bit
Copy of widevine change:
https://widevine-internal-review.googlesource.com/#/c/10910/

This CL adds a leading 0 to integers in the RSA test key in
oemcrypt_test.cpp.  Before this CL, versions of OEMCrypto that
correctly interpret the encoding were treating some large
integers as negative.

bug: 16876126
Change-Id: I1990fdb09509c15566d12d4cfcd055e9d200e08a
2014-08-12 14:12:23 -07:00