Add support for Widevine ECM v3
Widevine ECM v3 is redesigned mainly based on protobuf, and supports new features including carrying fingerprinting and service blocking information. Existing clients must upgrade the Widevine CAS plugin to use the new ECM v3.
This commit is contained in:
@@ -34,6 +34,18 @@ using widevine::cas::WvCasEcmgClientHandler;
|
||||
constexpr int kServerPortNumber = 1234;
|
||||
constexpr int kListenQueueSize = 20;
|
||||
constexpr int kBufferSizeBytes = 2048;
|
||||
constexpr unsigned char kTestECPrivateKey2Secp256r1[] = {
|
||||
0x30, 0x77, 0x02, 0x01, 0x01, 0x04, 0x20, 0x34, 0x9a, 0xf2, 0x95,
|
||||
0x94, 0xd4, 0xca, 0xb9, 0xa0, 0x81, 0xe4, 0x1c, 0xf5, 0xde, 0x8d,
|
||||
0x23, 0xf6, 0x79, 0xba, 0x3c, 0x6e, 0xc9, 0x0b, 0x56, 0x0f, 0x07,
|
||||
0x5e, 0x9f, 0xe9, 0x38, 0x18, 0xfc, 0xa0, 0x0a, 0x06, 0x08, 0x2a,
|
||||
0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0xa1, 0x44, 0x03, 0x42,
|
||||
0x00, 0x04, 0x7b, 0x2a, 0x61, 0x59, 0xe5, 0x1b, 0xb6, 0x30, 0x7b,
|
||||
0x59, 0x98, 0x42, 0x59, 0x37, 0xfb, 0x46, 0xfe, 0x53, 0xfe, 0x32,
|
||||
0xa1, 0x5c, 0x93, 0x36, 0x11, 0xb0, 0x5a, 0xae, 0xa4, 0x48, 0xe3,
|
||||
0x20, 0x12, 0xce, 0x78, 0xa7, 0x7f, 0xfd, 0x73, 0x5e, 0x09, 0x77,
|
||||
0x53, 0x77, 0x8f, 0xd6, 0x1b, 0x26, 0xfa, 0xc4, 0x2c, 0xc4, 0x11,
|
||||
0xfa, 0x72, 0x6a, 0xbe, 0x94, 0x78, 0x4d, 0x74, 0x20, 0x27, 0x86};
|
||||
|
||||
void BuildEcmgConfig(EcmgConfig* config) {
|
||||
config->delay_start = 200; // in milliseconds.
|
||||
@@ -43,6 +55,9 @@ void BuildEcmgConfig(EcmgConfig* config) {
|
||||
config->access_criteria_transfer_mode = 0;
|
||||
config->number_of_content_keys = 2;
|
||||
config->crypto_mode = widevine::cas::CryptoMode::kAesCtr;
|
||||
config->ecc_private_signing_key.assign(
|
||||
std::begin(kTestECPrivateKey2Secp256r1),
|
||||
std::end(kTestECPrivateKey2Secp256r1));
|
||||
}
|
||||
|
||||
void PrintMessage(const std::string& description, const char* const message,
|
||||
|
||||
Reference in New Issue
Block a user