Commit Graph

4135 Commits

Author SHA1 Message Date
Fred Gylys-Colwell
fa1b891b8f Add unit test for preloaded license am: ca404aae6f am: 6bd4b47612 am: 64e528dc99 am: 6e12c64da2
Change-Id: I3b27162ccd394fe33526b1588ddcb045f4b2cebe
2020-03-27 20:05:36 +00:00
Fred Gylys-Colwell
9265752bce Add unit test for preloaded license am: ca404aae6f am: ab82b4b78f am: d8ea3672c4 am: 3cdcf12c20
Change-Id: I0ed6e8f8d26afa3e7eb9e81fcc06e480ff958803
2020-03-27 20:01:37 +00:00
Fred Gylys-Colwell
c5dcb0dbca Add unit test for preloaded license am: ca404aae6f am: ab82b4b78f am: f2c24373a6 am: e3f5c1ae3f
Change-Id: Ibf9ab418251b97b2bb15d69d7fc7c37949d14804
2020-03-27 19:47:01 +00:00
Fred Gylys-Colwell
6e12c64da2 Add unit test for preloaded license am: ca404aae6f am: 6bd4b47612 am: 64e528dc99
Change-Id: I080c5f4fab3947d4e910e9e2472dac389c9a54fb
2020-03-27 19:36:08 +00:00
Fred Gylys-Colwell
3cdcf12c20 Add unit test for preloaded license am: ca404aae6f am: ab82b4b78f am: d8ea3672c4
Change-Id: Icf7f0036654ae5609bbe3c653fc8447c265567b0
2020-03-27 19:34:53 +00:00
Fred Gylys-Colwell
e3f5c1ae3f Add unit test for preloaded license am: ca404aae6f am: ab82b4b78f am: f2c24373a6
Change-Id: I092fdbd44330551134a6bb98511858cc9cbef0dc
2020-03-27 19:31:36 +00:00
Fred Gylys-Colwell
64e528dc99 Add unit test for preloaded license am: ca404aae6f am: 6bd4b47612
Change-Id: I0ce97c01bceaa48a5ea8fce2870f8c072eca3fbe
2020-03-27 19:21:28 +00:00
Fred Gylys-Colwell
f2c24373a6 Add unit test for preloaded license am: ca404aae6f am: ab82b4b78f
Change-Id: Icfcfda4c1410426ba3364907594a513052b04455
2020-03-27 19:21:27 +00:00
Fred Gylys-Colwell
d8ea3672c4 Add unit test for preloaded license am: ca404aae6f am: ab82b4b78f
Change-Id: I650eec69db450862ca645b1cab0f55c20926a635
2020-03-27 19:21:04 +00:00
Fred Gylys-Colwell
ab82b4b78f Add unit test for preloaded license am: ca404aae6f
Change-Id: I68c4098513de8313f7ecd9b30958c5b05a620703
2020-03-27 19:05:44 +00:00
Fred Gylys-Colwell
6bd4b47612 Add unit test for preloaded license am: ca404aae6f
Change-Id: Ieeff31dfb52a182da5217ab26ddd168d39e44381
2020-03-27 19:05:43 +00:00
Fred Gylys-Colwell
ca404aae6f Add unit test for preloaded license
Merge from Widevine repo of http://go/wvgerrit/96508

This adds a unit test for to verify that a preloaded license may be
loaded into OEMCrypto. A preloaded license is a license that does not
have a nonce, and for which there is no license request. This is used
in CAS and ATSC.

I also updated the test version string to
OEMCrypto unit tests for API 16.2. Tests last updated 2020-03-27

Bug: 144105097
Test: ran oemcrypto unit tests on taimen and with v16 modmock.
Change-Id: I6a4926917f36a084d15defa7b908d067612c4dcf
2020-03-26 15:38:38 -07:00
John W. Bruce
d21d70f533 Restore OpenSSL Compatibility
(This is a merge of http://go/wvgerrit/96226.)

This patch does a number of different things in order to re-enable the
CDM to use OpenSSL 1.1.0+ out of the box, instead of just BoringSSL:

* To support https://cryptography.io/, BoringSSL has reimplemented just
  enough of the OpenSSL PKCS7 API that we can fulfill our purposes with
  code that works on either library. This patch replaces code in
  privacy_crypto_boringssl.cpp and oec_session_util.cpp that was only
  compatible with BoringSSL with code that also works in OpenSSL.

* Replaces code in oec_session_util.cpp that used the deprecated OpenSSL
  1.0.0 API with OpenSSL 1.1.0-compatible code. This code previously
  worked on BoringSSL because they have not yet removed the OpenSSL
  1.0.0 functions, even though they also implemented the 1.1.0 API.

* Replaces openssl/mem.h (which does not work in OpenSSL 1.1.0 and
  higher) with openssl/crypto.h. (which works in all OpenSSL and
  BoringSSL releases) This does not require any function code changes.

* The OID-comparison code in privacy_crypto_boringssl.cpp was using
  BoringSSL-exclusive functions to convert OBJ-format OIDs to text.
  Conversion functions that work on either library exist. However, the
  new code uses a different technique instead, pre-converting the
  passed-in OID to OBJ format. This allows it to be compared to the
  certificate directly, avoiding converting every certificate extension
  OID to text.

* Allows the selection of "openssl" as the privacy_crypto_impl and adds
  a variable to configure OpenSSL. More will follow in future patches
  as more configurations of OpenSSL are supported.

Bug: 140053043
Test: CE CDM Unit Tests
Test: CE CDM Unit Tests w/ the x86-64 Platform Reconfigured to OpenSSL
Test: Android Unit Tests
Change-Id: I57cebbbfb59e0bcab85b589b98fb9ffd18885415
2020-03-26 13:20:15 -07:00
Cong Lin
c0d7f16b78 Merge "Use unique_ptr in oemcrypto ref" into rvc-dev am: a55244025b am: 0abb41845e am: b9ef42f7a6 am: f42fbe6394 am: 0b792d2ebd
Change-Id: I841580a755f44d47e2d52b1503304ac4b806c354
2020-03-26 19:05:08 +00:00
Cong Lin
cf08d26e84 Merge "Use unique_ptr in oemcrypto ref" into rvc-dev am: a55244025b am: 275b896d9c am: a87dafc5ba am: 7ede55d7c1
Change-Id: I355bfeb702c6f0df6cbf4cbbf9bdd9067de4426c
2020-03-26 19:04:16 +00:00
Cong Lin
71d7045bf5 Merge "Use unique_ptr in oemcrypto ref" into rvc-dev am: a55244025b am: 0abb41845e am: b651eb3278 am: 63ad1466ee
Change-Id: I4e44901202141a42f882159483e84a82575f9803
2020-03-26 19:03:24 +00:00
Cong Lin
0b792d2ebd Merge "Use unique_ptr in oemcrypto ref" into rvc-dev am: a55244025b am: 0abb41845e am: b9ef42f7a6 am: f42fbe6394
Change-Id: I15603c179e59e65d60e8060ef037ef3a2b3f0d2a
2020-03-26 19:02:47 +00:00
Cong Lin
7ede55d7c1 Merge "Use unique_ptr in oemcrypto ref" into rvc-dev am: a55244025b am: 275b896d9c am: a87dafc5ba
Change-Id: Ib185969162dc4ff2ba950995094b440f2f0bb60d
2020-03-26 18:54:04 +00:00
Cong Lin
63ad1466ee Merge "Use unique_ptr in oemcrypto ref" into rvc-dev am: a55244025b am: 0abb41845e am: b651eb3278
Change-Id: I15b7d558abe8ee52f9894fd0c7beab1df00639ee
2020-03-26 18:53:50 +00:00
Cong Lin
f42fbe6394 Merge "Use unique_ptr in oemcrypto ref" into rvc-dev am: a55244025b am: 0abb41845e am: b9ef42f7a6
Change-Id: I18dbb965ac53cff45ed75d4f0040c3db83cfa68d
2020-03-26 18:53:20 +00:00
Cong Lin
a87dafc5ba Merge "Use unique_ptr in oemcrypto ref" into rvc-dev am: a55244025b am: 275b896d9c
Change-Id: I871b21d3aabccbb70c271748332b145f56ebdca9
2020-03-26 18:42:56 +00:00
Cong Lin
b9ef42f7a6 Merge "Use unique_ptr in oemcrypto ref" into rvc-dev am: a55244025b am: 0abb41845e
Change-Id: I1b05161d7fe15f573a70a58768b186ef87c7188f
2020-03-26 18:42:34 +00:00
Cong Lin
b651eb3278 Merge "Use unique_ptr in oemcrypto ref" into rvc-dev am: a55244025b am: 0abb41845e
Change-Id: I1fef37738bf914471a412e199643874983ee9b1e
2020-03-26 18:42:25 +00:00
Cong Lin
275b896d9c Merge "Use unique_ptr in oemcrypto ref" into rvc-dev am: a55244025b
Change-Id: I266de93e39d6754539b562da6b24ce42892b294d
2020-03-26 18:28:22 +00:00
Cong Lin
0abb41845e Merge "Use unique_ptr in oemcrypto ref" into rvc-dev am: a55244025b
Change-Id: If9fd5ca1143cf3372cf70a7d3627c8e98514a3a8
2020-03-26 18:28:10 +00:00
Cong Lin
a55244025b Merge "Use unique_ptr in oemcrypto ref" into rvc-dev 2020-03-26 18:15:33 +00:00
Cong Lin
a53a6bf355 Use unique_ptr in oemcrypto ref
Merge from Widevine repo of http://go/wvgerrit/95945

The reference oemcrypto and testbed still use old style pointers, even
though we now require a more modern C++ compiler. Updated a few places
where smart pointer would be appropriate.

Bug: 141393616
Test: Ran unit tests
Change-Id: I8b1e155bce241075928e373478d6f8e1001233f9
2020-03-26 16:15:24 +00:00
Alex Dale
3f41d19575 Merge "Usage table header operations no longer need an open session." into rvc-dev am: 73f301a66c am: ef31c865f2 am: a983f577b1 am: 228075d3f5 am: 547ef61575
Change-Id: I41c4cfa235ae9732aaec2a1387fa31206c533174
2020-03-26 04:26:31 +00:00
Alex Dale
410d4693ea Merge "New CDM error codes for usage table errors." into rvc-dev am: 8d45d93d0e am: b587f64cac am: c75f01f7c9 am: 819f20e6aa am: 9ae6ffd1db
Change-Id: I6f9690abb0a721d9e9ac35d38ce9a139d0d27869
2020-03-26 04:26:24 +00:00
Alex Dale
e9f3e3a2ce Merge "Usage table header operations no longer need an open session." into rvc-dev am: 73f301a66c am: d650718c27 am: 970ceb343a am: 21561e45dc
Change-Id: I1bd12128385912e164234cbad8f246a3913118a6
2020-03-26 04:26:17 +00:00
Automerger Merge Worker
3599bf02a4 Merge "Merge "New CDM error codes for usage table errors." into rvc-dev am: 8d45d93d0e am: 4188d4478b" into rvc-d1-dev-plus-aosp am: 72eebd9d75 am: b5996adea3
Change-Id: Ib23b929e090bd296c6798eb9de740cef4a522cf0
2020-03-26 04:26:10 +00:00
Alex Dale
1ee536a480 Merge "Usage table header operations no longer need an open session." into rvc-dev am: 73f301a66c am: ef31c865f2 am: 8aff059243 am: 7402eb8f0f
Change-Id: I9002c7764c1b6c5ad57491ba20e7ada41e89b289
2020-03-26 04:25:55 +00:00
Alex Dale
547ef61575 Merge "Usage table header operations no longer need an open session." into rvc-dev am: 73f301a66c am: ef31c865f2 am: a983f577b1 am: 228075d3f5
Change-Id: I6ce1d33eba4b2d754ead1da916d7c245be459add
2020-03-26 04:25:47 +00:00
Alex Dale
d878496af2 Merge "New CDM error codes for usage table errors." into rvc-dev am: 8d45d93d0e am: b587f64cac am: 4e22b2253c am: efc12c3cef
Change-Id: I39cb171d6e36ce6fc4eb650f8c9e8f384171b927
2020-03-26 04:25:37 +00:00
Alex Dale
9ae6ffd1db Merge "New CDM error codes for usage table errors." into rvc-dev am: 8d45d93d0e am: b587f64cac am: c75f01f7c9 am: 819f20e6aa
Change-Id: Ic55ed4932c977caa23a6f6ac90453ddf0c0d013b
2020-03-26 04:25:26 +00:00
Alex Dale
21561e45dc Merge "Usage table header operations no longer need an open session." into rvc-dev am: 73f301a66c am: d650718c27 am: 970ceb343a
Change-Id: I13bf21d6405c9f8205bd82dbaf2f8a274040543c
2020-03-26 04:14:19 +00:00
Automerger Merge Worker
b5996adea3 Merge "Merge "New CDM error codes for usage table errors." into rvc-dev am: 8d45d93d0e am: 4188d4478b" into rvc-d1-dev-plus-aosp am: 72eebd9d75
Change-Id: I1e488e37b7bf9829e7e9a0219ba80dc069cbb661
2020-03-26 04:14:14 +00:00
Alex Dale
7402eb8f0f Merge "Usage table header operations no longer need an open session." into rvc-dev am: 73f301a66c am: ef31c865f2 am: 8aff059243
Change-Id: I97780666cdeb31aa93b4c219a1d65023acc3bb87
2020-03-26 04:14:07 +00:00
Alex Dale
228075d3f5 Merge "Usage table header operations no longer need an open session." into rvc-dev am: 73f301a66c am: ef31c865f2 am: a983f577b1
Change-Id: Idb46a4220146d271be1c25974445a17cfcb8c37c
2020-03-26 04:13:36 +00:00
Alex Dale
efc12c3cef Merge "New CDM error codes for usage table errors." into rvc-dev am: 8d45d93d0e am: b587f64cac am: 4e22b2253c
Change-Id: Id31e8bd535de82aad9434382c912298bff9222e7
2020-03-26 04:13:35 +00:00
Alex Dale
819f20e6aa Merge "New CDM error codes for usage table errors." into rvc-dev am: 8d45d93d0e am: b587f64cac am: c75f01f7c9
Change-Id: I32bcb618b47891f83fb49dd87ddb2938341c5a3c
2020-03-26 04:13:30 +00:00
Alex Dale
a983f577b1 Merge "Usage table header operations no longer need an open session." into rvc-dev am: 73f301a66c am: ef31c865f2
Change-Id: Ifa3470a582eb45437e98e25c49043cc08b6ffce7
2020-03-26 03:57:31 +00:00
Alex Dale
970ceb343a Merge "Usage table header operations no longer need an open session." into rvc-dev am: 73f301a66c am: d650718c27
Change-Id: I5b122e382a37fa977ae6f5e661fc64beff34eaa5
2020-03-26 03:57:26 +00:00
Alex Dale
c75f01f7c9 Merge "New CDM error codes for usage table errors." into rvc-dev am: 8d45d93d0e am: b587f64cac
Change-Id: Ic3bbf3ed9662db105921e68a2edaf54e035d1fc5
2020-03-26 03:57:26 +00:00
Automerger Merge Worker
72eebd9d75 Merge "Merge "New CDM error codes for usage table errors." into rvc-dev am: 8d45d93d0e am: 4188d4478b" into rvc-d1-dev-plus-aosp 2020-03-26 03:57:15 +00:00
Alex Dale
84e758c3e4 Merge "New CDM error codes for usage table errors." into rvc-dev am: 8d45d93d0e am: 4188d4478b
Change-Id: I329bd2e415818e7b8d410de424a0df769f3eb2e1
2020-03-26 03:57:11 +00:00
Alex Dale
8aff059243 Merge "Usage table header operations no longer need an open session." into rvc-dev am: 73f301a66c am: ef31c865f2
Change-Id: Ib3008c8544f885190ab5645fd64181abd9aee971
2020-03-26 03:57:10 +00:00
Alex Dale
4e22b2253c Merge "New CDM error codes for usage table errors." into rvc-dev am: 8d45d93d0e am: b587f64cac
Change-Id: I8652c63f22c9f71bc548c0af07cc4071ac48904b
2020-03-26 03:56:56 +00:00
Alex Dale
d650718c27 Merge "Usage table header operations no longer need an open session." into rvc-dev am: 73f301a66c
Change-Id: I2853ab3f534c8f1c3d7a5597bfc69a4685574d19
2020-03-26 03:45:43 +00:00
Alex Dale
ef31c865f2 Merge "Usage table header operations no longer need an open session." into rvc-dev am: 73f301a66c
Change-Id: Ifa6a1bc17ceb2dded06cb4f6547c6bc7d4478983
2020-03-26 03:45:34 +00:00