Don't Validate Crypto Mode for Unencrypted Decrypt
(This is a merge of http://go/wvgerrit/17661) Because Widevine core always has a decrypt mode set, even on unencrypted calls where we potentially do not know the crypto mode, it will reject unencrypted decrypt calls for sessions that have been flagged as AES-CBC, since the crypto mode defaults to AES-CTR. The fix is to not validate the crypto mode on unencrypted decrypt calls, as the data won't be getting decrypted anyway. Bug: 28423928 Change-Id: If848834dd498ca96983a2b69d448b8d81d50e0a4
This commit is contained in:
@@ -678,7 +678,7 @@ CdmResponseType CryptoSession::Decrypt(const CdmDecryptionParameters& params) {
|
||||
params.encrypt_buffer, params.encrypt_length,
|
||||
&buffer_descriptor, params.subsample_flags);
|
||||
}
|
||||
if (params.cipher_mode != cipher_mode_) {
|
||||
if (params.is_encrypted && params.cipher_mode != cipher_mode_) {
|
||||
return INCORRECT_CRYPTO_MODE;
|
||||
}
|
||||
if (params.is_encrypted || sts == OEMCrypto_ERROR_NOT_IMPLEMENTED) {
|
||||
|
||||
Reference in New Issue
Block a user