Add cipher mode and pattern encryption support

[ Merge of http://go/wvgerrit/16364 ]

http://go/wvgerrit/16249 changed the name of the encryption pattern
structure from OEMCrypto_PatternDesc to OEMCrypto_CENCEncryptPatternDesc
to remove ambiguity. These are matching changes to CDM core.

[ Merge of http://go/wvgerrit/16340 ]

This CL passes the cipher mode in the license to OEMCrypto when
keys are loaded and specifies the pattern encryption scheme to
OEMCrypto_DecryptCENC.

b/20630275

Change-Id: I86b82bbdc891fd0100beb9fad385ca2082176271
This commit is contained in:
Rahul Frias
2016-01-07 15:31:08 -08:00
parent 355471c408
commit 97e826412d
6 changed files with 42 additions and 2 deletions

View File

@@ -106,6 +106,9 @@ static std::vector<CryptoKey> ExtractContentKeys(const License& license) {
key.set_key_control(license.key(i).key_control().key_control_block());
key.set_key_control_iv(license.key(i).key_control().iv());
}
// TODO(rfrias): Set cipher mode when the license protocol provides
// it (b/26190665). Set to default for now.
key.set_cipher_mode(kCipherModeCtr);
key_array.push_back(key);
break;
case License_KeyContainer::KEY_CONTROL: