Decouple key fetcher; Update ECMG API
This commit is contained in:
@@ -27,43 +27,44 @@ constexpr char kTestEcmgChannelSetup[] = {
|
||||
};
|
||||
|
||||
constexpr char kTestEcmgChannelSetupWithPrivateParameters[] = {
|
||||
'\x03', // protocol_version
|
||||
'\x00', '\x01', // message_type - Channel_setup
|
||||
'\x00', '\x70', // message_length
|
||||
'\x00', '\x0e', // parameter_type - ECM_channel_id
|
||||
'\x00', '\x02', // parameter_length
|
||||
'\x00', '\x01', // parameter_value
|
||||
'\x00', '\x01', // parameter_type- SUPER_CAS_ID
|
||||
'\x00', '\x04', // parameter_length
|
||||
'\x4a', '\xd4', '\x00', '\x00', // parameter_value
|
||||
'\x80', '\x00', // parameter_type - AGE_RESTRICTION
|
||||
'\x00', '\x01', // parameter_length
|
||||
'\x00', // parameter_value
|
||||
'\x80', '\x01', // parameter_type - CRYPTO_MODE
|
||||
'\x00', '\x07', // parameter_length
|
||||
'A', 'e', 's', 'S', 'c', 't', 'e', // parameter_value
|
||||
'\x80', '\x04', // parameter_type - TRACK_TYPES
|
||||
'\x00', '\x02', // parameter_length
|
||||
'S', 'D', // parameter_value
|
||||
'\x80', '\x04', // parameter_type - TRACK_TYPES
|
||||
'\x00', '\x02', // parameter_length
|
||||
'H', 'D', // parameter_value
|
||||
'\x80', '\x02', // parameter_type - CONTENT_ID
|
||||
'\x00', '\x09', // parameter_length
|
||||
'C', 'a', 's', 'T', 's', 'F', 'a', 'k',
|
||||
'e', // parameter_value - CasTsFake
|
||||
'\x80', '\x03', // parameter_type - CONTENT_PROVIDER
|
||||
'\x00', '\x0d', // parameter_length
|
||||
'w', 'i', 'd', 'e', 'v', 'i', 'n', 'e',
|
||||
'_', 't', 'e', 's', 't', // parameter_value - widevine_test
|
||||
'\x80', '\x06', // parameter_type - CONTENT_IV
|
||||
'\x00', '\x10', // parameter_length
|
||||
'\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07',
|
||||
'\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f',
|
||||
'\x80', '\x06', // parameter_type - CONTENT_IV
|
||||
'\x00', '\x10', // parameter_length
|
||||
'\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17',
|
||||
'\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f'};
|
||||
'\x03', // protocol_version
|
||||
'\x00', '\x01', // message_type - Channel_setup
|
||||
'\x00', '\x8c', // message_length
|
||||
'\x00', '\x0e', // parameter_type - ECM_channel_id
|
||||
'\x00', '\x02', // parameter_length
|
||||
'\x00', '\x01', // parameter_value
|
||||
'\x00', '\x01', // parameter_type- SUPER_CAS_ID
|
||||
'\x00', '\x04', // parameter_length
|
||||
'\x4a', '\xd4', '\x00', '\x00', // parameter_value
|
||||
'\x80', '\x00', // parameter_type - AGE_RESTRICTION
|
||||
'\x00', '\x01', // parameter_length
|
||||
'\x00', // parameter_value
|
||||
'\x80', '\x01', // parameter_type - CRYPTO_MODE
|
||||
'\x00', '\x07', // parameter_length
|
||||
'A', 'e', 's', 'S', 'c', 't', 'e', // parameter_value
|
||||
'\x80', '\x04', // parameter_type - TRACK_TYPES
|
||||
'\x00', '\x02', // parameter_length
|
||||
'S', 'D', // parameter_value
|
||||
'\x80', '\x07', // parameter_type - ENTITLEMENT_ID_KEY_COMBINATION
|
||||
'\x00', '\x30', // parameter_length
|
||||
// parameter_value - ENTITLEMENT_ID (16 bytes)
|
||||
'\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', //
|
||||
'\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', //
|
||||
// parameter_value (continued) - ENTITLEMENT_KEY (32 bytes)
|
||||
'\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', //
|
||||
'\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', //
|
||||
'\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', //
|
||||
'\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', //
|
||||
'\x80', '\x07', // parameter_type - ENTITLEMENT_ID_KEY_COMBINATION
|
||||
'\x00', '\x30', // parameter_length
|
||||
// parameter_value - ENTITLEMENT_ID (16 bytes)
|
||||
'\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', '\x68', //
|
||||
'\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', '\x68', //
|
||||
// parameter_value (continued) - ENTITLEMENT_KEY (32 bytes)
|
||||
'\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', '\x68', //
|
||||
'\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', '\x68', //
|
||||
'\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', '\x68', //
|
||||
'\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', '\x68'};
|
||||
|
||||
constexpr char kTestEcmgChannelTest[] = {
|
||||
'\x03', // protocol_version
|
||||
@@ -74,6 +75,18 @@ constexpr char kTestEcmgChannelTest[] = {
|
||||
'\x00', '\x01', // parameter_value
|
||||
};
|
||||
|
||||
constexpr char kTestEcmgChannelError[] = {
|
||||
'\x03', // protocol_version
|
||||
'\x00', '\x05', // message_type - Stream_error
|
||||
'\x00', '\x0c', // message_length
|
||||
'\x00', '\x0e', // parameter_type - ECM_channel_id
|
||||
'\x00', '\x02', // parameter_length
|
||||
'\x00', '\x01', // parameter_value
|
||||
'\x70', '\x00', // parameter_type - Error_status
|
||||
'\x00', '\x02', // parameter_length
|
||||
'\x70', '\x00', // parameter_value (UNKNOWN_ERROR)
|
||||
};
|
||||
|
||||
constexpr char kTestEcmgChannelStatus[] = {
|
||||
'\x03', // protocol_version
|
||||
'\x00', '\x03', // message_type - Channel_status
|
||||
@@ -113,7 +126,7 @@ constexpr char kTestEcmgChannelStatus[] = {
|
||||
constexpr char kTestEcmgStreamSetupWithPrivateParameters[] = {
|
||||
'\x03', // protocol_version
|
||||
'\x01', '\x01', // message_type - Stream_setup
|
||||
'\x00', '\x1e', // message_length
|
||||
'\x00', '\x46', // message_length
|
||||
'\x00', '\x0e', // parameter_type - ECM_channel_id
|
||||
'\x00', '\x02', // parameter_length
|
||||
'\x00', '\x01', // parameter_value
|
||||
@@ -129,7 +142,14 @@ constexpr char kTestEcmgStreamSetupWithPrivateParameters[] = {
|
||||
'\x80', '\x05', // parameter_type - STREAM_TRACK_TYPE
|
||||
'\x00', '\x02', // parameter_length
|
||||
'S', 'D', // parameter_value
|
||||
};
|
||||
'\x80', '\x06', // parameter_type - CONTENT_IV
|
||||
'\x00', '\x10', // parameter_length
|
||||
'\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07',
|
||||
'\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f',
|
||||
'\x80', '\x06', // parameter_type - CONTENT_IV
|
||||
'\x00', '\x10', // parameter_length
|
||||
'\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17',
|
||||
'\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f'};
|
||||
|
||||
constexpr char kTestEcmgStreamSetup[] = {
|
||||
'\x03', // protocol_version
|
||||
@@ -179,6 +199,24 @@ constexpr char kTestEcmgStreamStatus[] = {
|
||||
'\x01' // parameter_value
|
||||
};
|
||||
|
||||
constexpr char kTestEcmgStreamError[] = {
|
||||
'\x03', // protocol_version
|
||||
'\x01', '\x06', // message_type - Stream_error
|
||||
'\x00', '\x1a', // message_length
|
||||
'\x00', '\x0e', // parameter_type - ECM_channel_id
|
||||
'\x00', '\x02', // parameter_length
|
||||
'\x00', '\x01', // parameter_value
|
||||
'\x00', '\x0f', // parameter_type - ECM_stream_id
|
||||
'\x00', '\x02', // parameter_length
|
||||
'\x00', '\x01', // parameter_value
|
||||
'\x70', '\x00', // parameter_type - Error_status
|
||||
'\x00', '\x02', // parameter_length
|
||||
'\x70', '\x00', // parameter_value (UNKNOWN_ERROR)
|
||||
'\x70', '\x01', // parameter_type - Error_information
|
||||
'\x00', '\x04', // parameter_length
|
||||
'i', 'n', 'f', 'o' // parameter_value
|
||||
};
|
||||
|
||||
constexpr char kTestEcmgCwProvision[] = {
|
||||
'\x03', // protocol_version
|
||||
'\x02', '\x01', // message_type - CW_provision
|
||||
@@ -209,7 +247,7 @@ constexpr char kTestEcmgCwProvision[] = {
|
||||
constexpr char kTestEcmgCwProvisionWithAccessCriteria[] = {
|
||||
'\x03', // protocol_version
|
||||
'\x02', '\x01', // message_type - CW_provision
|
||||
'\x00', '\xaa', // message_length
|
||||
'\x00', '\xf4', // message_length
|
||||
'\x00', '\x0e', // parameter_type - ECM_channel_id
|
||||
'\x00', '\x02', // parameter_length
|
||||
'\x00', '\x01', // parameter_value
|
||||
@@ -225,43 +263,55 @@ constexpr char kTestEcmgCwProvisionWithAccessCriteria[] = {
|
||||
'\x00', '\x14', // parameter_type - CP_CW_Combination
|
||||
'\x00', '\x12', // parameter_length
|
||||
'\x00', '\x00', // parameter_value - CP (2 bytes) then CW next (16 bytes)
|
||||
'\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07',
|
||||
'\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f',
|
||||
'\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', //
|
||||
'\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', //
|
||||
'\x00', '\x14', // parameter_type - CP_CW_Combination
|
||||
'\x00', '\x12', // parameter_length
|
||||
'\x00', '\x01', // parameter_value - CP (2 bytes) then CW next (16 bytes)
|
||||
'\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17',
|
||||
'\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f',
|
||||
'\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', //
|
||||
'\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', //
|
||||
'\x00', '\x0d', // parameter_type - access_criteria
|
||||
'\x00', '\x62', // parameter_length
|
||||
'\x00', '\xac', // parameter_length
|
||||
'\x80', '\x00', // access_criteria parameter_type - AGE_RESTRICTION
|
||||
'\x00', '\x01', // parameter_length
|
||||
'\x00', // parameter_value
|
||||
'\x80', '\x01', // access_criteria parameter_type - CRYPTO_MODE
|
||||
'\x00', '\x07', // parameter_length
|
||||
'A', 'e', 's', 'S', 'c', 't', 'e', // parameter_value
|
||||
'A', 'e', 's', 'S', 'c', 't', 'e', // parameter_value
|
||||
'\x80', '\x04', // access_criteria parameter_type - TRACK_TYPES
|
||||
'\x00', '\x02', // parameter_length
|
||||
'S', 'D', // parameter_value
|
||||
'S', 'D', // parameter_value
|
||||
'\x80', '\x05', // access_criteria parameter_type - STREAM_TRACK_TYPE
|
||||
'\x00', '\x02', // parameter_length
|
||||
'S', 'D', // parameter_value
|
||||
'\x80', '\x02', // access_criteria parameter_type - CONTENT_ID
|
||||
'\x00', '\x09', // parameter_length
|
||||
'C', 'a', 's', 'T', 's', 'F', 'a', 'k',
|
||||
'e', // parameter_value - CasTsFake
|
||||
'\x80', '\x03', // access_criteria parameter_type - CONTENT_PROVIDER
|
||||
'\x00', '\x0d', // parameter_length
|
||||
'w', 'i', 'd', 'e', 'v', 'i', 'n', 'e',
|
||||
'_', 't', 'e', 's', 't', // parameter_value - widevine_test
|
||||
'S', 'D', // parameter_value
|
||||
'\x80', '\x06', // access_criteria parameter_type - CONTENT_IV
|
||||
'\x00', '\x10', // parameter_length
|
||||
'\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07',
|
||||
'\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f',
|
||||
'\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', //
|
||||
'\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', //
|
||||
'\x80', '\x06', // access_criteria parameter_type - CONTENT_IV
|
||||
'\x00', '\x10', // parameter_length
|
||||
'\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17',
|
||||
'\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f'};
|
||||
'\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', //
|
||||
'\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', //
|
||||
'\x80', '\x07', // parameter_type - ENTITLEMENT_ID_KEY_COMBINATION
|
||||
'\x00', '\x30', // parameter_length
|
||||
// parameter_value - ENTITLEMENT_ID (16 bytes)
|
||||
'\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', //
|
||||
'\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', //
|
||||
// parameter_value (continued) - ENTITLEMENT_KEY (32 bytes)
|
||||
'\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', //
|
||||
'\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', //
|
||||
'\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', //
|
||||
'\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', //
|
||||
'\x80', '\x07', // parameter_type - ENTITLEMENT_ID_KEY_COMBINATION
|
||||
'\x00', '\x30', // parameter_length
|
||||
// parameter_value - ENTITLEMENT_ID (16 bytes)
|
||||
'\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', '\x68', //
|
||||
'\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', '\x68', //
|
||||
// parameter_value (continued) - ENTITLEMENT_KEY (32 bytes)
|
||||
'\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', '\x68', //
|
||||
'\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', '\x68', //
|
||||
'\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', '\x68', //
|
||||
'\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', '\x68'};
|
||||
|
||||
constexpr char kTestEcmgCwProvisionSingleKey[] = {
|
||||
'\x03', // protocol_version
|
||||
@@ -303,25 +353,25 @@ constexpr char kTestEcmgEcmResponse[] = {
|
||||
'\x00', '\xbc', // parameter_length
|
||||
// parameter_value - ECM_datagram
|
||||
'\x47', '\x40', '\x00', '\x10', '\x00', '\x80', '\x70', '\xa5', '\x4a',
|
||||
'\xd4', '\x02', '\x0b', '\xc0', '\x66', '\x61', '\x6b', '\x65', '\x5f',
|
||||
'\x6b', '\x65', '\x79', '\x5f', '\x69', '\x64', '\x31', '\x2e', '\x2e',
|
||||
'\x2e', '\x2e', '\xef', '\x40', '\x57', '\x48', '\xa7', '\xad', '\xdd',
|
||||
'\xd4', '\x02', '\x0b', '\xc0', '\x30', '\x31', '\x32', '\x33', '\x34',
|
||||
'\x35', '\x36', '\x37', '\x30', '\x31', '\x32', '\x33', '\x34', '\x35',
|
||||
'\x36', '\x37', '\xef', '\x40', '\x57', '\x48', '\xa7', '\xad', '\xdd',
|
||||
'\x34', '\x73', '\xfe', '\x5d', '\x1c', '\x65', '\xa0', '\xbf', '\x93',
|
||||
'\xfe', '\x01', '\x4b', '\x1d', '\xcd', '\x9e', '\x1d', '\x3a', '\x36',
|
||||
'\x99', '\x8f', '\x47', '\xa1', '\x3b', '\x46', '\xf1', '\xde', '\x9e',
|
||||
'\xc2', '\x88', '\xf8', '\x27', '\x2f', '\xea', '\xa1', '\x63', '\x9b',
|
||||
'\x1b', '\x6a', '\x56', '\x2d', '\x26', '\x31', '\x32', '\x33', '\x34',
|
||||
'\x35', '\x36', '\x37', '\x38', '\x66', '\x61', '\x6b', '\x65', '\x5f',
|
||||
'\x6b', '\x65', '\x79', '\x5f', '\x69', '\x64', '\x32', '\x2e', '\x2e',
|
||||
'\x2e', '\x2e', '\xf4', '\x71', '\x2a', '\x4b', '\x6d', '\x6d', '\x14',
|
||||
'\x4d', '\x2e', '\x53', '\xe7', '\x4b', '\x9f', '\x4b', '\x0a', '\x34',
|
||||
'\xb4', '\xfd', '\xbe', '\x86', '\x21', '\x35', '\x1e', '\xda', '\x81',
|
||||
'\x89', '\x6f', '\x70', '\xd3', '\xd2', '\xb2', '\x79', '\xf2', '\xcd',
|
||||
'\xeb', '\xc5', '\xaf', '\x89', '\xab', '\xeb', '\xf0', '\x1b', '\xd0',
|
||||
'\xd3', '\xe9', '\x7d', '\x81', '\x8a', '\x31', '\x32', '\x33', '\x34',
|
||||
'\x35', '\x36', '\x37', '\x38', '\xff', '\xff', '\xff', '\xff', '\xff',
|
||||
'\xff', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff',
|
||||
'\xff', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff',
|
||||
'\x90', '\x04', '\x1a', '\xab', '\x1a', '\x46', '\x00', '\xdb', '\xdb',
|
||||
'\x2f', '\xcb', '\xa5', '\x10', '\x2a', '\x3b', '\x73', '\xf1', '\xfe',
|
||||
'\x9d', '\x28', '\x2a', '\x3c', '\x0a', '\x5c', '\x58', '\xbc', '\x97',
|
||||
'\x1d', '\x81', '\x5b', '\x5b', '\xf7', '\x00', '\x01', '\x02', '\x03',
|
||||
'\x04', '\x05', '\x06', '\x07', '\x08', '\x09', '\x0a', '\x0b', '\x0c',
|
||||
'\x0d', '\x0e', '\x0f', '\x61', '\x62', '\x63', '\x64', '\x65', '\x66',
|
||||
'\x67', '\x68', '\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67',
|
||||
'\x68', '\xf4', '\x71', '\x2a', '\x4b', '\x6d', '\x6d', '\x14', '\x4d',
|
||||
'\x2e', '\x53', '\xe7', '\x4b', '\x9f', '\x4b', '\x0a', '\x34', '\x84',
|
||||
'\xe7', '\xe8', '\xf5', '\x02', '\x39', '\x1f', '\x62', '\x43', '\xb5',
|
||||
'\xca', '\xb0', '\xee', '\x77', '\xaf', '\xe9', '\x84', '\x41', '\x0a',
|
||||
'\x16', '\x45', '\x23', '\x6c', '\x1d', '\xe7', '\xdb', '\xfd', '\x91',
|
||||
'\x91', '\xac', '\x47', '\xbc', '\x10', '\x11', '\x12', '\x13', '\x14',
|
||||
'\x15', '\x16', '\x17', '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d',
|
||||
'\x1e', '\x1f', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff',
|
||||
'\xff', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff', '\xff'};
|
||||
|
||||
constexpr char kTestEcmgStreamClose[] = {
|
||||
|
||||
Reference in New Issue
Block a user