run android/copy_files from cdm repo to sync files in Android tm-widevine-release. Changes include: 1. Update ODK to 17.1 2. update in license_protocol.proto 3. updates in oemcrypto unit tests 4. A few cdm and util test updates 5. Prov4 unit test fixes Originating CLs: https://widevine-internal-review.googlesource.com/c/cdm/+/155289/ https://widevine-internal-review.googlesource.com/c/cdm/+/155429/ https://widevine-internal-review.googlesource.com/c/cdm/+/155430/ https://widevine-internal-review.googlesource.com/c/cdm/+/154415/ https://widevine-internal-review.googlesource.com/c/cdm/+/156457/ https://widevine-internal-review.googlesource.com/c/cdm/+/156878/ https://widevine-internal-review.googlesource.com/c/cdm/+/156879/ https://widevine-internal-review.googlesource.com/c/cdm/+/156425/ https://widevine-internal-review.googlesource.com/c/cdm/+/156486/ https://widevine-internal-review.googlesource.com/c/cdm/+/156539/ https://widevine-internal-review.googlesource.com/c/cdm/+/156542/ Test: ran oemcrypto unit tests and ODK tests Test: ran gts media test cases Bug: 239201888 Change-Id: Iad9aff72aec5ba42296582837f34dd704bc11810
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
#include <assert.h>
|
|
#include <openssl/aes.h>
|
|
#include <openssl/rand.h>
|
|
#include <algorithm>
|
|
#include <iostream>
|
|
|
|
#include "OEMCryptoCENC.h"
|
|
#include "oec_session_util.h"
|
|
#include "oec_test_data.h"
|
|
|
|
namespace wvoec {
|
|
|
|
class SessionUtil {
|
|
public:
|
|
SessionUtil()
|
|
: encoded_rsa_key_(kTestRSAPKCS8PrivateKeyInfo2_2048,
|
|
kTestRSAPKCS8PrivateKeyInfo2_2048 +
|
|
sizeof(kTestRSAPKCS8PrivateKeyInfo2_2048)) {}
|
|
|
|
// Create a new wrapped DRM Certificate.
|
|
void CreateWrappedRSAKey();
|
|
|
|
// This is used to force installation of a keybox. This overwrites the
|
|
// production keybox -- it does NOT use OEMCrypto_LoadTestKeybox.
|
|
void InstallKeybox(const wvoec::WidevineKeybox& keybox, bool good);
|
|
|
|
// This loads the test keybox or the test RSA key, using LoadTestKeybox or
|
|
// LoadTestRSAKey as needed.
|
|
void EnsureTestKeys();
|
|
|
|
void InstallTestRSAKey(Session* s);
|
|
|
|
std::vector<uint8_t> encoded_rsa_key_;
|
|
std::vector<uint8_t> wrapped_rsa_key_;
|
|
OEMCrypto_PrivateKeyType key_type_;
|
|
std::vector<uint8_t> drm_public_key_;
|
|
wvoec::WidevineKeybox keybox_;
|
|
};
|
|
|
|
} // namespace wvoec
|