OEMCrypto Mock should not downgrade SRM
Merge from Widevine repo of http://go/wvgerrit/26560 With this CL, the modifiable oemcrypto mock will only update the SRM version number if the new number is greater than or equal to the current one. b/37744957 Change-Id: I10721146ca0ce24b1087657e18569a434e5d53b8
This commit is contained in:
@@ -374,6 +374,11 @@ class AndroidModifiableCryptoEngine : public CryptoEngine {
|
||||
}
|
||||
int new_version = GetOption("srm_load_version", -1);
|
||||
if (new_version >= 0) {
|
||||
if (new_version < srm_version_) {
|
||||
LOGE("New SRM version is lower than existing SRM version: %d < %d",
|
||||
new_version, srm_version_);
|
||||
return OEMCrypto_ERROR_INVALID_CONTEXT;
|
||||
}
|
||||
srm_version_ = new_version;
|
||||
LOGI("OEMCrypto mock told to change SRM version to %d.", srm_version_);
|
||||
srm_loaded_ = true;
|
||||
|
||||
Reference in New Issue
Block a user