Allow license renewals after expiry

Licenses could be renewed uptil the point of expiry. After that point
we expected that the session would have to be closed and a new one
opened with a new license loaded. Clank requested that we support
renewal of sessions past expiry.

In addition, the error returned on decryption, if OEMCrypto
determines that the KCB duration has expired, is NEED_KEY rather than
KEY_ERROR.

Merge of https://widevine-internal-review.googlesource.com/#/c/8240
from the widevine cdm repo.

b/11390539

Change-Id: I023320f3f25514cd07b368701a92100429ce1c04
This commit is contained in:
Rahul Frias
2013-10-31 12:07:28 -07:00
parent 49e593d127
commit 774a078f1d
5 changed files with 165 additions and 86 deletions

13
libwvdrmengine/cdm/core/src/crypto_session.cpp Executable file → Normal file
View File

@@ -588,10 +588,15 @@ CdmResponseType CryptoSession::Decrypt(const CdmDecryptionParameters& params) {
params.is_encrypted, &(*params.iv).front(), params.block_offset,
&buffer_descriptor, params.subsample_flags);
if (OEMCrypto_ERROR_INSUFFICIENT_RESOURCES == sts) {
return INSUFFICIENT_CRYPTO_RESOURCES;
} else if (OEMCrypto_SUCCESS != sts) {
return UNKNOWN_ERROR;
switch (sts) {
case OEMCrypto_SUCCESS:
break;
case OEMCrypto_ERROR_INSUFFICIENT_RESOURCES:
return INSUFFICIENT_CRYPTO_RESOURCES;
case OEMCrypto_ERROR_KEY_EXPIRED:
return NEED_KEY;
default:
return UNKNOWN_ERROR;
}
return NO_ERROR;
}