1) Change return type to WvCasStatus for functions in wv_cas_types.cc.

2) Add a binary wv_cas_types_example.
3) Surface wv_cas_key_fetcher *source code* to partner to serve as an example of how they would make a HTTP request to acquire an entitlement key from license server.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=229953562
This commit is contained in:
Widevine Buildbot
2019-01-18 18:45:45 +00:00
parent 9d9765afbb
commit a12e1b6ff3
10 changed files with 404 additions and 19 deletions

View File

@@ -14,7 +14,7 @@
namespace widevine {
namespace cas {
const char kTestChannelSetup[] = {
const char kTestEcmgChannelSetup[] = {
'\x03', // protocol_version
'\x00', '\x01', // message_type - Channel_setup
'\x00', '\x0e', // message_length
@@ -26,7 +26,7 @@ const char kTestChannelSetup[] = {
'\x4a', '\xd4', '\x00', '\x00' // parameter_value
};
const char kTestChannelStatus[] = {
const char kTestEcmgChannelStatus[] = {
'\x03', // protocol_version
'\x00', '\x03', // message_type - Channel_status
'\x00', '\x39', // message_length
@@ -62,7 +62,7 @@ const char kTestChannelStatus[] = {
'\x00', '\x64' // parameter_value
};
const char kTestStreamSetup[] = {
const char kTestEcmgStreamSetup[] = {
'\x03', // protocol_version
'\x01', '\x01', // message_type - Stream_setup
'\x00', '\x18', // message_length
@@ -80,7 +80,7 @@ const char kTestStreamSetup[] = {
'\x00', '\x64' // parameter_value
};
const char kTestStreamStatus[] = {
const char kTestEcmgStreamStatus[] = {
'\x03', // protocol_version
'\x01', '\x03', // message_type - Stream_status
'\x00', '\x17', // message_length
@@ -98,7 +98,7 @@ const char kTestStreamStatus[] = {
'\x01' // parameter_value
};
const char kTestCwProvision[] = {
const char kTestEcmgCwProvision[] = {
'\x03', // protocol_version
'\x02', '\x01', // message_type - CW_provision
'\x00', '\x44', // message_length
@@ -126,7 +126,7 @@ const char kTestCwProvision[] = {
'\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f'};
// CW is encrypted using hardcoded fixed entitlement key.
const char kTestEcmResponse[] = {
const char kTestEcmgEcmResponse[] = {
'\x03', // protocol_version
'\x02', '\x02', // message_type - ECM_response
'\x00', '\xd2', // message_length
@@ -164,7 +164,7 @@ const char kTestEcmResponse[] = {
'\xff', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff',
'\xff', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff'};
const char kTestStreamCloseRequest[] = {
const char kTestEcmgStreamCloseRequest[] = {
'\x03', // protocol_version
'\x01', '\x04', // message_type - Stream_close_request
'\x00', '\x0c', // message_length
@@ -176,7 +176,7 @@ const char kTestStreamCloseRequest[] = {
'\x00', '\x01' // parameter_value
};
const char kTestStreamCloseResponse[] = {
const char kTestEcmgStreamCloseResponse[] = {
'\x03', // protocol_version
'\x01', '\x05', // message_type - Stream_close_response
'\x00', '\x0c', // message_length
@@ -188,7 +188,7 @@ const char kTestStreamCloseResponse[] = {
'\x00', '\x01' // parameter_value
};
const char kTestChannelClose[] = {
const char kTestEcmgChannelClose[] = {
'\x03', // protocol_version
'\x00', '\x04', // message_type - Channel_close
'\x00', '\x06', // message_length