(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
This is the source code for the Widevine Content Decryption Module (CDM) for the Android OS. It provides the libwvdrmengine plugin for DRM. Partners who are integrating a device should be familiar with the documents in the docs directory. This source code is NOT open source, and is not part of AOSP. However, it is released to partners external to Google after official Android releases. For this reason, partners should look for bug fixes and software updates on the widevine branches: +------------------------------+------------------------------+ |Android Version |Branch | +------------------------------+------------------------------+ |Android L |lmp-mr1-widevine-release | +------------------------------+------------------------------+ |Android M MR1 |mnc-mr1-widevine-release | +------------------------------+------------------------------+ |Android N MR2 |nyc-mr2-widevine-release | +------------------------------+------------------------------+ |Android OC |oc-widevine-release | +------------------------------+------------------------------+ |Android OC MR1 |oc-mr1-widevine-release | +------------------------------+------------------------------+ |Android Pi |pi-widevine-release | +------------------------------+------------------------------+